# Apache Superset

> Get Superset chart data and run SQL in a workflow: send a report, copy rows to a sheet, find dashboards and charts. Start a workflow when a dashboard changes, a chart has a new row, or a number crosses a threshold.

App · 9 actions. Web page: https://docs.lodol.com/docs/integrations/apache-superset

## Actions

### Download chart as CSV

Save a chart's data as a CSV file in Lodol, as Superset's Export to .CSV makes it, to attach to an email or upload.

**Inputs**

- Chart (`chart`, text, required): The chart. Pick one, or give its number, link or name.
- Skip the cache (`fresh`, true/false): Read the database now rather than use the results Superset has kept from the chart's last run. Default: `false`.

**Outputs**

- `chart_id` (number): The chart's number
- `chart_name` (text): Its name
- `content_type` (text): text/csv, or application/zip for a chart of several queries
- `csv` (text): The CSV's text, up to its first 200,000 characters
- `document_ref` (text): The CSV file, for a later step that takes one, such as an email's attachments or a drive upload
- `filename` (text): The file's name, such as Orders-by-region.csv
- `link` (text): A link to the chart in Superset
- `row_count` (number): How many rows the CSV has
- `size_bytes` (number): The file's size in bytes

**Example output**

```json
{
  "chart_id": 1,
  "chart_name": "Orders by region",
  "content_type": "text/csv",
  "csv": "region,COUNT(*),Revenue\nSouth,30,3280.00\nEast,30,3250.00\nWest,30,3030.00\nNorth,30,3000.00\n",
  "document_ref": "doc_7f3a9c2e1b",
  "filename": "Orders-by-region.csv",
  "link": "https://superset.example.com/explore/?slice_id=1",
  "row_count": 4,
  "size_bytes": 87
}
```

### Find charts

Find charts by words in their names, on one dashboard or anywhere, with their links.

**Inputs**

- Words (`query`, text): Words in the charts' names. Leave blank to list them all.
- Dashboard (`dashboard`, text): Only charts on this dashboard. Leave blank to look everywhere.
- How many (`limit`, number): The most to list, up to 100. Defaults to 25. From 1 to 100.

**Outputs**

- `charts` (list): The charts found
- `count` (number): How many are listed
- `total` (number): How many match in all

**Example output**

```json
{
  "charts": [
    {
      "changed_on": "2026-11-07T01:13:22.894921Z",
      "dashboards": [
        "Sales overview"
      ],
      "dataset": "public.orders",
      "dataset_id": 1,
      "description": "",
      "id": 1,
      "link": "https://superset.example.com/explore/?slice_id=1",
      "name": "Orders by region",
      "type": "table"
    }
  ],
  "count": 1,
  "total": 1
}
```

### Find dashboards

Find dashboards by words in their titles, most recently changed first, with their links.

**Inputs**

- Words (`query`, text): Words in the dashboards' titles. Leave blank to list them all.
- How many (`limit`, number): The most to list, up to 100. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many are listed
- `dashboards` (list): The dashboards found
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "dashboards": [
    {
      "changed_by": "Ada Admin",
      "changed_on": "2026-11-07T01:13:22.791518Z",
      "id": 1,
      "link": "https://superset.example.com/superset/dashboard/sales-overview/",
      "owners": [
        "Ada Admin"
      ],
      "slug": "sales-overview",
      "status": "published",
      "title": "Sales overview"
    }
  ],
  "total": 1
}
```

### Find datasets

Find datasets (the tables and SQL charts are built on) by words in their names, in one database or all.

**Inputs**

- Words (`query`, text): Words in the datasets' names. Leave blank to list them all.
- Database (`database`, text): Only datasets in this database. Leave blank for all of them.
- How many (`limit`, number): The most to list, up to 100. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many are listed
- `datasets` (list): The datasets found
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "datasets": [
    {
      "changed_on": "2026-11-07T01:12:59.137447Z",
      "database": "Shop",
      "database_id": 1,
      "description": "",
      "id": 1,
      "kind": "physical",
      "link": "https://superset.example.com/explore/?datasource_type=table&datasource_id=1",
      "name": "orders",
      "schema": "public"
    }
  ],
  "total": 1
}
```

### Get chart data

Run a chart's query and get its rows, to send as a report or copy to a sheet.

**Inputs**

- Chart (`chart`, text, required): The chart. Pick one, or give its number, link or name.
- Row limit (`limit`, number): The most rows to return, up to 10,000. Defaults to 100. From 1 to 10000.
- Skip the cache (`fresh`, true/false): Read the database now rather than use the results Superset has kept from the chart's last run. Default: `false`.

**Outputs**

- `chart_id` (number): The chart's number
- `chart_name` (text): Its name
- `chart_type` (text): Its kind, such as table, pie or big_number_total
- `columns` (list): The columns, in order
- `has_more` (true/false): True when the chart had more rows than returned
- `link` (text): A link to the chart in Superset
- `row_count` (number): How many rows are returned
- `rows` (list): The rows, each an object keyed by column name; times are ISO 8601
- `total_rows` (number): How many rows the chart's query gave

**Example output**

```json
{
  "chart_id": 1,
  "chart_name": "Orders by region",
  "chart_type": "table",
  "columns": [
    {
      "name": "region",
      "type": "text"
    },
    {
      "name": "COUNT(*)",
      "type": "number"
    },
    {
      "name": "Revenue",
      "type": "number"
    }
  ],
  "has_more": false,
  "link": "https://superset.example.com/explore/?slice_id=1",
  "row_count": 2,
  "rows": [
    {
      "COUNT(*)": 30,
      "Revenue": 3280.0,
      "region": "South"
    },
    {
      "COUNT(*)": 30,
      "Revenue": 3250.0,
      "region": "East"
    }
  ],
  "total_rows": 2
}
```

### Get dashboard

Get a dashboard's details, its filters and the charts on it, to get each chart's data.

**Inputs**

- Dashboard (`dashboard`, text, required): The dashboard. Pick one, or give its number, link or title.

**Outputs**

- `changed_by` (text): Who changed it last
- `changed_on` (text): When it last changed (ISO 8601)
- `chart_count` (number): How many charts are on it
- `charts` (list): The charts on it, in its layout's order
- `filters` (list): Its filters, by name
- `id` (number): Its number
- `link` (text): A link to it in Superset
- `owners` (list): Who owns it
- `slug` (text): Its short name in links; blank when it has none
- `status` (text): published or draft
- `title` (text): Its title

**Example output**

```json
{
  "changed_by": "Ada Admin",
  "changed_on": "2026-11-07T01:13:22.791518Z",
  "chart_count": 2,
  "charts": [
    {
      "chart_id": 2,
      "link": "https://superset.example.com/explore/?slice_id=2",
      "name": "Revenue (all orders)",
      "type": "big_number_total"
    },
    {
      "chart_id": 1,
      "link": "https://superset.example.com/explore/?slice_id=1",
      "name": "Orders by region",
      "type": "table"
    }
  ],
  "filters": [
    "Region"
  ],
  "id": 1,
  "link": "https://superset.example.com/superset/dashboard/sales-overview/",
  "owners": [
    "Ada Admin"
  ],
  "slug": "sales-overview",
  "status": "published",
  "title": "Sales overview"
}
```

### List databases

List the databases connected to Superset that Lodol's user can use.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `databases` (list): The databases

**Example output**

```json
{
  "count": 1,
  "databases": [
    {
      "allows_changes": false,
      "backend": "postgresql",
      "id": 1,
      "in_sql_lab": true,
      "name": "Shop",
      "runs_async": false
    }
  ]
}
```

### Run SQL query

Run SQL in SQL Lab on a database connected to Superset and get the rows. Superset runs only what the database allows from SQL Lab: reads, unless it's set to allow changes.

**Inputs**

- Database (`database`, text, required): The database. Pick one, or type its name.
- SQL (`sql`, text, required): The SQL to run, written for that database, such as SELECT * FROM orders.
- Schema (`schema`, text): The schema table names are looked up in, such as public. Leave blank for the database's default.
- Row limit (`limit`, number): The most rows to return, up to 10,000. Defaults to 100. From 1 to 10000.

**Outputs**

- `columns` (list): The columns, in order
- `database_id` (number): The database's number
- `executed_sql` (text): The SQL Superset ran, with the row limit it added
- `has_more` (true/false): True when the query had more rows than returned
- `row_count` (number): How many rows are returned
- `rows` (list): The rows, each an object keyed by column name; times are ISO 8601

**Example output**

```json
{
  "columns": [
    {
      "name": "id",
      "type": "number"
    },
    {
      "name": "total",
      "type": "number"
    },
    {
      "name": "created_at",
      "type": "time"
    }
  ],
  "database_id": 1,
  "executed_sql": "SELECT id, total, created_at FROM orders ORDER BY id DESC LIMIT 3",
  "has_more": true,
  "row_count": 2,
  "rows": [
    {
      "created_at": "2026-10-30T00:09:36.921923+00:00",
      "id": 120,
      "total": 80.0
    },
    {
      "created_at": "2026-10-31T01:09:36.921923+00:00",
      "id": 119,
      "total": 43.0
    }
  ]
}
```

### Sync dataset columns

Update a dataset's columns from its table, as Superset's Sync columns from source does, after a column is added or changed. Lodol's user must be one of the dataset's owners.

**Inputs**

- Dataset (`dataset`, text, required): The dataset. Pick one, or give its number or table name.

**Outputs**

- `changed_on` (text): When it last changed (ISO 8601)
- `column_count` (number): How many columns it has
- `columns` (list): Its columns after the sync
- `database` (text): The database it reads
- `database_id` (number): That database's number
- `description` (text): Its description
- `id` (number): Its number
- `kind` (text): physical (a table) or virtual (SQL)
- `link` (text): A link to explore it in Superset
- `name` (text): Its table's name, or its own for a SQL dataset
- `schema` (text): The schema its table is in

**Example output**

```json
{
  "changed_on": "2026-11-07T01:12:59.137447Z",
  "column_count": 3,
  "columns": [
    {
      "is_time": false,
      "name": "id",
      "type": "INTEGER"
    },
    {
      "is_time": false,
      "name": "total",
      "type": "NUMERIC(10, 2)"
    },
    {
      "is_time": true,
      "name": "created_at",
      "type": "TIMESTAMP WITH TIME ZONE"
    }
  ],
  "database": "Shop",
  "database_id": 1,
  "description": "",
  "id": 1,
  "kind": "physical",
  "link": "https://superset.example.com/explore/?datasource_type=table&datasource_id=1",
  "name": "orders",
  "schema": "public"
}
```
