In the context of creating visualizations, datasets play a crucial role. They serve as the intermediary between your raw data stored in a database and the visual representations on your dashboard. This guide will help you understand what datasets are, how they facilitate the creation of charts, and how to create new datasets in Superset.
What are Datasets?
Datasets are structured collections of information, typically presented in a tabular format (rows and columns), but can also include images, text, audio, or other data types. They serve as the foundation for data analysis, statistical modeling, machine learning, and data visualization.
Creating a New Dataset
- Go to Dashboards >> Superset.
- Click the Datasets tab. This will take you to a screen where you can see the list of all created datasets.
- Click the +Dataset button. This will take you to the 'New Dataset' screen.
- In the Select Database dropdown, choose the database where your data is stored.
- In the Select Schema dropdown, choose the schema you want to use.
- In the Select Table dropdown, choose the table you want to use as a dataset. This will show the tables on the left-hand side.
- Click the Create Dataset and Create Chart button.
When the user clicks the Create Dataset and Create Chart button, a dataset is created, and the user is redirected to the Create a New Chart screen.
The newly created dataset will be listed on the Dataset screen. Clicking the dataset name will navigate the user back to the Create a New Chart screen.
Editing the Dataset
Once a dataset is created, you have the option to customize its properties and behavior. This includes configuring column settings to apply specific controls and customizations for how the columns are utilized within Superset charts and dashboards.
To edit a dataset, hover over the dataset row to reveal the actions icon. Click the pencil () icon to open the Edit Dataset pop-up screen(as shown below). Here, you can make changes like creating a dataset metric, managing dataset columns, adjusting the cache timeout, etc