superset_dataset_update
Update Apache Superset datasets: modify table name, SQL, description, columns, or metrics. Only changed fields are needed; replacing all columns requires confirmation.
Instructions
Update a dataset. Only pass the fields you want to change.
Args: dataset_id: ID of the dataset to update. table_name: New table/dataset name. sql: New SQL query (only for virtual datasets). description: Dataset description (displayed in Superset UI). columns: JSON string describing columns. CRITICAL: passing columns REPLACES ALL dataset columns! To update a single column (e.g. verbose_name), pass ALL columns with their IDs. After an error, dataset_refresh_schema will restore columns from SQL. Format: [{"id": 123, "column_name": "id", "type": "INTEGER", ...}] metrics: JSON string describing metrics. Format: [{"metric_name": "count", "expression": "COUNT(*)", "metric_type": "count"}] confirm_columns_replace: Confirmation for replacing ALL columns (REQUIRED when passing columns). always_filter_main_dttm: Force the dataset's main datetime filter on/off. Superset resets this flag to false on any PUT that omits it, which breaks dashboard time filters when only columns/metrics are updated. Pass an explicit value to set it; leave it None and the current value is preserved automatically whenever columns are replaced.
Returns: JSON string with the updated dataset details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | ||
| columns | No | ||
| metrics | No | ||
| dataset_id | Yes | ||
| table_name | No | ||
| description | No | ||
| always_filter_main_dttm | No | ||
| confirm_columns_replace | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |