Connect data
Datasets and metrics
Define the tables, columns and metrics that every visual and every AI answer reuses.
What a dataset is
A dataset is what a visual reads from: a table or a query, with named columns and metrics on top. Datasets live in Data Studio, under Datasets.
There are two kinds.
| Kind | Reads from | Use it when |
|---|---|---|
| Physical | One table in a connected database | The table already has the shape you want to report on. |
| Virtual | A SQL query you write | You need to join tables, filter rows or reshape the data first. |
Create a dataset
In Data Studio, choose Datasets, then Create dataset.
Pick the connection, then either a schema and table, or write the SQL query.
Review the columns Vizset found, then add your metrics.
You can also write a query in SQL Query and save it as a dataset from there.
Columns
For each column you can set:
A display name and a description, so people see Order date instead of
ord_dt.Its type, and whether it is a time column. One time column can be the dataset's default.
Whether it can be used to group, filter and sort.
A calculated column is defined by a SQL expression instead of a column in the source, for example price * quantity.
When the table or query changes, sync the columns from the source so the dataset matches it again.
Metrics
A metric is a named aggregation, such as SUM(amount) or COUNT(DISTINCT customer_id). Each metric has a name, a display name, a SQL expression, an optional description and a number format.
Define a metric once and every visual built on the dataset uses that definition. So does your AI tool: when it builds a chart of Revenue, it uses your Revenue.
Tip
Put the business rule in the metric, not in each chart. If Revenue should exclude refunds, write that into the expression once.
Certification
Datasets, visuals and reports can be certified. A certification records who vouches for the asset and any details they add, so people can tell an agreed source from an experiment.
Business context
Under Data Studio, Business context is where you tell the AI what a dataset means:
A summary of what the data covers.
Instructions for the AI, such as which metric to prefer.
A glossary of your terms.
The business questions the dataset is meant to answer.
The better this is filled in, the less you have to explain in each prompt.
Keep datasets tidy
The dataset list shows how many visuals and reports use each dataset. Check it before you change or delete one.
Duplicate a dataset to try a change without touching the original.
Tag datasets so they are easier to find.
Export datasets to a file, or import them, with Import on the list page.