Customizing Datasets

Datasets are a collection of views and the information about the relationships between them. These make up the tables that users see when constructing queries from the semantic layer.

Schema

The schema displays a list of available customization options you can use in the dataset YAML file.

nameThe name of the dataset. This must be unique within the catalog. Defaults to the file name. Optional.
labelA user-friendly label for the dataset. This is what is displayed in the UI, and defaults to the name. Optional.
descriptionA description of the dataset. Optional.
fromThe name of the base view of the dataset.
joinA list of joins that are applied to the base view. Optional.
join[*].viewThe name of the view that is being joined to the base view.
join[*].constraintThe condition that the join is made on. This is defined in the dialect detailed here.
join[*].relationshipThe relationship between the base view and the joined view. This can be one of one_to_one, one_to_many, many_to_one or many_to_many.
join[*].typeThe type of join. This can be one of inner, left, right, or full. Optional.
join[*].aliasThe alias to use for the joined view. Optional.
join[*].label A user-friendly label to use for the joined view. Defaults to the view's label. Optional.

Example uses

A full YAML example

Loading code...

Using name, description and label

Loading code...
  • Choose a system name and a user friendly label for your dataset. The system name must be unique among the datasets of this catalog.
  • You have more freedom in your choice of label, but keep in mind that datasets with similar or the same label may be confusing for your catalog users.
  • Dataset descriptions will appear in the catalog homepage.

Using join

Loading code...
  • relationship contains the cardinality of the relationship between the views being joined.
  • Join type can be any one of: left, right, inner, or full
  • Defining multiple joins in a dataset is as simple as adding an additional view to the join list.
Loading...