Skip to content

Commit 2e00018

Browse files
committed
Merge branch 'master' of https://github.com/apache/superset
2 parents cfa955a + 51aad52 commit 2e00018

File tree

119 files changed

+5269
-1278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+5269
-1278
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ little bit helps, and credit will always be given.
2525

2626
All developer and contribution documentation has moved to the Apache Superset Developer Portal:
2727

28-
**[📚 View the Developer Portal →](https://superset.apache.org/docs/developer-portal/)**
28+
**[📚 View the Developer Portal →](https://superset.apache.org/developer_portal/)**
2929

3030
The Developer Portal includes comprehensive guides for:
31-
- [Contributing Overview](https://superset.apache.org/docs/developer-portal/contributing/overview)
32-
- [Development Setup](https://superset.apache.org/docs/developer-portal/contributing/development-setup)
33-
- [Submitting Pull Requests](https://superset.apache.org/docs/developer-portal/contributing/submitting-pr)
34-
- [Contribution Guidelines](https://superset.apache.org/docs/developer-portal/contributing/guidelines)
35-
- [Code Review Process](https://superset.apache.org/docs/developer-portal/contributing/code-review)
36-
- [Development How-tos](https://superset.apache.org/docs/developer-portal/contributing/howtos)
31+
- [Contributing Overview](https://superset.apache.org/developer_portal/contributing/overview)
32+
- [Development Setup](https://superset.apache.org/developer_portal/contributing/development-setup)
33+
- [Submitting Pull Requests](https://superset.apache.org/developer_portal/contributing/submitting-pr)
34+
- [Contribution Guidelines](https://superset.apache.org/developer_portal/contributing/guidelines)
35+
- [Code Review Process](https://superset.apache.org/developer_portal/contributing/code-review)
36+
- [Development How-tos](https://superset.apache.org/developer_portal/contributing/howtos)
3737

3838
Source for the Developer Portal documentation is [located here](https://github.com/apache/superset/tree/master/docs/developer_portal).

docs/docs/configuration/alerts-reports.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,22 @@ To send alerts and reports to Slack channels, you need to create a new Slack App
6565

6666
Note: when you configure an alert or a report, the Slack channel list takes channel names without the leading '#' e.g. use `alerts` instead of `#alerts`.
6767

68+
#### Large Slack Workspaces (10k+ channels)
69+
70+
For workspaces with many channels, fetching the complete channel list can take several minutes and may encounter Slack API rate limits. Add the following to your `superset_config.py`:
71+
72+
```python
73+
from datetime import timedelta
74+
75+
# Increase cache timeout to reduce API calls
76+
# Default: 1 day (86400 seconds)
77+
SLACK_CACHE_TIMEOUT = int(timedelta(days=2).total_seconds())
78+
79+
# Increase retry count for rate limit errors
80+
# Default: 2
81+
SLACK_API_RATE_LIMIT_RETRY_COUNT = 5
82+
```
83+
6884
### Kubernetes-specific
6985

7086
- You must have a `celery beat` pod running. If you're using the chart included in the GitHub repository under [helm/superset](https://github.com/apache/superset/tree/master/helm/superset), you need to put `supersetCeleryBeat.enabled = true` in your values override.

docs/docs/configuration/databases.mdx

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ are compatible with Superset.
4949
| [Apache Pinot](/docs/configuration/databases#apache-pinot) | `pip install pinotdb` | `pinot://BROKER:5436/query?server=http://CONTROLLER:5983/` |
5050
| [Apache Solr](/docs/configuration/databases#apache-solr) | `pip install sqlalchemy-solr` | `solr://{username}:{password}@{hostname}:{port}/{server_path}/{collection}` |
5151
| [Apache Spark SQL](/docs/configuration/databases#apache-spark-sql) | `pip install pyhive` | `hive://hive@{hostname}:{port}/{database}` |
52-
| [Arc (Basekick Labs)](/docs/configuration/databases#arc) | `pip install arc-superset-dialect` | `arc://{api_key}@{hostname}:{port}/{database}` |
52+
| [Arc - Apache Arrow](/docs/configuration/databases#arc-arrow) | `pip install arc-superset-arrow` | `arc+arrow://{api_key}@{hostname}:{port}/{database}` |
53+
| [Arc - JSON](/docs/configuration/databases#arc-json) | `pip install arc-superset-dialect` | `arc+json://{api_key}@{hostname}:{port}/{database}` |
5354
| [Ascend.io](/docs/configuration/databases#ascendio) | `pip install impyla` | `ascend://{username}:{password}@{hostname}:{port}/{database}?auth_mechanism=PLAIN;use_ssl=true` |
5455
| [Azure MS SQL](/docs/configuration/databases#sql-server) | `pip install pymssql` | `mssql+pymssql://UserName@presetSQL:[email protected]:1433/TestSchema` |
5556
| [ClickHouse](/docs/configuration/databases#clickhouse) | `pip install clickhouse-connect` | `clickhousedb://{username}:{password}@{hostname}:{port}/{database}` |
@@ -1259,17 +1260,31 @@ hive://hive@{hostname}:{port}/{database}
12591260

12601261
#### Arc
12611262

1262-
The recommended connector library is [arc-superset-dialect](https://pypi.org/project/arc-superset-dialect/). Install with `pip install arc-superset-dialect`.
1263+
There are two ways to connect Superset to Arc:
1264+
1265+
**1. Arc with Apache Arrow (Recommended)**
1266+
1267+
The recommended connector library for Arc with Apache Arrow support is [arc-superset-arrow](https://pypi.org/project/arc-superset-arrow/).
1268+
1269+
The connection string looks like:
1270+
1271+
```
1272+
arc+arrow://{api_key}@{hostname}:{port}/{database}
1273+
```
1274+
1275+
**2. Arc with JSON**
1276+
1277+
Alternatively, you can use the JSON connector [arc-superset-dialect](https://pypi.org/project/arc-superset-dialect/).
12631278

12641279
The connection string looks like:
12651280

12661281
```
1267-
arc://{api_key}@{hostname}:{port}/{database}
1282+
arc+json://{api_key}@{hostname}:{port}/{database}
12681283
```
12691284

1270-
##### Multi-Database Support
1285+
Arc supports multiple databases (schemas) within a single instance. In Superset, each Arc database appears as a schema in the SQL Lab.
12711286

1272-
Arc supports multiple databases (schemas) within a single instance. In Superset, each Arc database appears as a schema in the SQL Lab, and cross-database queries are supported using `database.table` syntax.
1287+
**Note:** The Arrow dialect (`arc-superset-arrow`) is recommended for production use as it provides 3-5x better performance using Apache Arrow IPC binary format.
12731288

12741289
#### SQL Server
12751290

docs/docs/configuration/sql-templating.mdx

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ version: 1
1212
SQL Lab and Explore supports [Jinja templating](https://jinja.palletsprojects.com/en/2.11.x/) in queries.
1313
To enable templating, the `ENABLE_TEMPLATE_PROCESSING` [feature flag](/docs/configuration/configuring-superset#feature-flags) needs to be enabled in `superset_config.py`.
1414

15-
> #### ⚠️ Security Warning
16-
>
17-
> While powerful, this feature executes template code on the server. Within the Superset security model, this is **intended functionality**, as users with permissions to edit charts and virtual datasets are considered **trusted users**.
18-
>
19-
> If you grant these permissions to untrusted users, this feature can be exploited as a **Server-Side Template Injection (SSTI)** vulnerability. Do not enable `ENABLE_TEMPLATE_PROCESSING` unless you fully understand and accept the associated security risks.
15+
:::warning[Security Warning]
16+
17+
While powerful, this feature executes template code on the server. Within the Superset security model, this is **intended functionality**, as users with permissions to edit charts and virtual datasets are considered **trusted users**.
18+
19+
If you grant these permissions to untrusted users, this feature can be exploited as a **Server-Side Template Injection (SSTI)** vulnerability. Do not enable `ENABLE_TEMPLATE_PROCESSING` unless you fully understand and accept the associated security risks.
20+
21+
:::
2022

2123
When templating is enabled, python code can be embedded in virtual datasets and
2224
in Custom SQL in the filter and metric controls in Explore. By default, the following variables are
@@ -182,7 +184,7 @@ The available validators and names can be found in
182184

183185
In this section, we'll walkthrough the pre-defined Jinja macros in Superset.
184186

185-
**Current Username**
187+
### Current Username
186188

187189
The `{{ current_username() }}` macro returns the `username` of the currently logged in user.
188190

@@ -197,7 +199,7 @@ cache key by adding the following parameter to your Jinja code:
197199
{{ current_username(add_to_cache_keys=False) }}
198200
```
199201

200-
**Current User ID**
202+
### Current User ID
201203

202204
The `{{ current_user_id() }}` macro returns the account ID of the currently logged in user.
203205

@@ -212,7 +214,7 @@ cache key by adding the following parameter to your Jinja code:
212214
{{ current_user_id(add_to_cache_keys=False) }}
213215
```
214216

215-
**Current User Email**
217+
### Current User Email
216218

217219
The `{{ current_user_email() }}` macro returns the email address of the currently logged in user.
218220

@@ -227,7 +229,7 @@ cache key by adding the following parameter to your Jinja code:
227229
{{ current_user_email(add_to_cache_keys=False) }}
228230
```
229231

230-
**Current User Roles**
232+
### Current User Roles
231233

232234
The `{{ current_user_roles() }}` macro returns an array of roles for the logged in user.
233235

@@ -257,15 +259,15 @@ Will be rendered as:
257259
SELECT * FROM users WHERE role IN ('admin', 'viewer')
258260
```
259261

260-
**Current User RLS Rules**
262+
### Current User RLS Rules
261263

262264
The `{{ current_user_rls_rules() }}` macro returns an array of RLS rules applied to the current dataset for the logged in user.
263265

264266
If you have caching enabled in your Superset configuration, then the list of RLS Rules will be used
265267
by Superset when calculating the cache key. A cache key is a unique identifier that determines if there's a
266268
cache hit in the future and Superset can retrieve cached data.
267269

268-
**Custom URL Parameters**
270+
### Custom URL Parameters
269271

270272
The `{{ url_param('custom_variable') }}` macro lets you define arbitrary URL
271273
parameters and reference them in your SQL code.
@@ -299,7 +301,7 @@ Here's a concrete example:
299301
WHERE country_code = 'US'
300302
```
301303

302-
**Explicitly Including Values in Cache Key**
304+
### Explicitly Including Values in Cache Key
303305

304306
The `{{ cache_key_wrapper() }}` function explicitly instructs Superset to add a value to the
305307
accumulated list of values used in the calculation of the cache key.
@@ -311,7 +313,7 @@ in the cache key. You can gain more context
311313
Note that this function powers the caching of the `user_id` and `username` values
312314
in the `current_user_id()` and `current_username()` function calls (if you have caching enabled).
313315

314-
**Filter Values**
316+
### Filter Values
315317

316318
You can retrieve the value for a specific filter as a list using `{{ filter_values() }}`.
317319

@@ -332,7 +334,7 @@ GROUP BY action
332334

333335
There `where_in` filter converts the list of values from `filter_values('action_type')` into a string suitable for an `IN` expression.
334336

335-
**Filters for a Specific Column**
337+
### Filters for a Specific Column
336338

337339
The `{{ get_filters() }}` macro returns the filters applied to a given column. In addition to
338340
returning the values (similar to how `filter_values()` does), the `get_filters()` macro
@@ -394,7 +396,7 @@ Here's a concrete example:
394396
order by lineage, level
395397
```
396398

397-
**Time Filter**
399+
### Time Filter
398400

399401
The `{{ get_time_filter() }}` macro returns the time filter applied to a specific column. This is useful if you want
400402
to handle time filters inside the virtual dataset, as by default the time filter is placed on the outer query. This can
@@ -469,7 +471,7 @@ WHERE
469471
AND dttm < {{ time_filter.to_expr }}
470472
```
471473

472-
**Datasets**
474+
### Datasets
473475

474476
It's possible to query physical and virtual datasets using the `dataset` macro. This is useful if you've defined computed columns and metrics on your datasets, and want to reuse the definition in adhoc SQL Lab queries.
475477

@@ -493,7 +495,7 @@ Since metrics are aggregations, the resulting SQL expression will be grouped by
493495
SELECT * FROM {{ dataset(42, include_metrics=True, columns=["ds", "category"]) }} LIMIT 10
494496
```
495497

496-
**Metrics**
498+
### Metrics
497499

498500
The `{{ metric('metric_key', dataset_id) }}` macro can be used to retrieve the metric SQL syntax from a dataset. This can be useful for different purposes:
499501

@@ -511,7 +513,7 @@ The parameter can be used in SQL Lab, or when fetching a metric from another dat
511513

512514
Superset supports [builtin filters from the Jinja2 templating package](https://jinja.palletsprojects.com/en/stable/templates/#builtin-filters). Custom filters have also been implemented:
513515

514-
**Where In**
516+
### Where In
515517
Parses a list into a SQL-compatible statement. This is useful with macros that return an array (for example the `filter_values` macro):
516518

517519
```
@@ -528,7 +530,7 @@ Dashboard filter without any value applied
528530
{{ filter_values('column')|where_in(default_to_none=True) }} => None
529531
```
530532

531-
**To Datetime**
533+
### To Datetime
532534

533535
Loads a string as a `datetime` object. This is useful when performing date operations. For example:
534536
```

docs/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
},
2929
"dependencies": {
3030
"@ant-design/icons": "^6.1.0",
31-
"@docusaurus/core": "3.9.1",
32-
"@docusaurus/plugin-client-redirects": "3.9.1",
33-
"@docusaurus/preset-classic": "3.9.1",
34-
"@docusaurus/theme-mermaid": "^3.9.1",
31+
"@docusaurus/core": "3.9.2",
32+
"@docusaurus/plugin-client-redirects": "3.9.2",
33+
"@docusaurus/preset-classic": "3.9.2",
34+
"@docusaurus/theme-mermaid": "^3.9.2",
3535
"@emotion/core": "^10.0.27",
3636
"@emotion/react": "^11.13.3",
3737
"@emotion/styled": "^10.0.27",
@@ -49,8 +49,8 @@
4949
"@storybook/preview-api": "^8.6.11",
5050
"@storybook/theming": "^8.6.11",
5151
"@superset-ui/core": "^0.20.4",
52-
"antd": "^5.27.4",
53-
"caniuse-lite": "^1.0.30001750",
52+
"antd": "^5.27.6",
53+
"caniuse-lite": "^1.0.30001751",
5454
"docusaurus-plugin-less": "^2.0.2",
5555
"json-bigint": "^1.0.0",
5656
"less": "^4.4.2",
@@ -63,25 +63,25 @@
6363
"remark-import-partial": "^0.0.2",
6464
"reselect": "^5.1.1",
6565
"storybook": "^8.6.11",
66-
"swagger-ui-react": "^5.29.4",
66+
"swagger-ui-react": "^5.29.5",
6767
"tinycolor2": "^1.4.2",
6868
"ts-loader": "^9.5.4"
6969
},
7070
"devDependencies": {
7171
"@docusaurus/module-type-aliases": "^3.9.1",
72-
"@docusaurus/tsconfig": "^3.9.1",
73-
"@eslint/js": "^9.37.0",
72+
"@docusaurus/tsconfig": "^3.9.2",
73+
"@eslint/js": "^9.38.0",
7474
"@types/react": "^19.1.8",
7575
"@typescript-eslint/eslint-plugin": "^8.37.0",
7676
"@typescript-eslint/parser": "^8.46.0",
77-
"eslint": "^9.37.0",
77+
"eslint": "^9.38.0",
7878
"eslint-config-prettier": "^10.1.8",
7979
"eslint-plugin-prettier": "^5.5.3",
8080
"eslint-plugin-react": "^7.37.5",
8181
"globals": "^16.4.0",
8282
"prettier": "^3.6.2",
8383
"typescript": "~5.9.3",
84-
"typescript-eslint": "^8.46.1",
84+
"typescript-eslint": "^8.46.2",
8585
"webpack": "^5.102.1"
8686
},
8787
"browserslist": {

0 commit comments

Comments
 (0)