Edit a Dataset

How to modify Superset datasets

After you create a virtual or physical dataset, you can edit the dataset to customize its definition or behavior. For example, you can configure column properties to add some controls and customization for how those columns are used or treated within the Superset charts and dashboards.

To edit a dataset, you can use the Edit icon on the Datasets page, or you can access the editor from the Charts editor in the field for the associated data set for the chart.

The Edit Dataset window appears:


On the default Source tab, click the lock icon to edit the basic information about the dataset, such as changing its type (virtual or physical), or specifying updated information such as the database, schema, and table name (for a physical dataset) or an updated SQL statement (virtual dataset).


Be careful with changes

USE CAUTION before saving any dataset changes because changes could break the charts and dashboards that reference the data set.

You can use the dataset editor to specify the following types of column characteristics:

  • Does the column contain temporal data that could be used for time/date values? Which temporal column do you want to be the default date/time column?

  • Can the column be used for filters?

  • Does the column contain dimension data?

Superset Semantic Layer​

Superset includes a thin semantic layer that provides some analytics options for metrics and calculated columns. The Superset semantic layer supports virtual metrics and virtual columns for the dataset:

  • With virtual metrics, you can write SQL statements that aggregate values from multiple columns (SUM(sales) / SUM(orders)) and make them available as columns (such as fulfillment_rate) for use in charts. You can also certify metrics as a way to approve them for your team in this view.

  • With virtual calculated columns, you can write SQL statements that customize the appearance and behavior of a specific column (for example, CAST(fulfillment_rate) as float). Aggregate functions are not allowed in calculated columns.


Datasets and views

A physical dataset for a view and the actual Refinery view are related, but they are not the same thing. For example, if you create custom metrics and calculations for a dataset, those metrics and columns can be used only in the charts and dashboards that reference the dataset. SQL queries use the Refinery view, and thus cannot "see" or use the custom metrics and columns of a dataset.