Reserved Dimensions
A reserved dimension is a dimension that is used by multiple views. Reserved dimensions enable querying data entities from different views together. They are similar to join keys but can also be used for grouping and filtering your data.
Creating a Reserved Dimension
You can create a reserved dimension on the "Reserved Dimensions" tab of your Catalog. When creating a reserved dimension, you must specify:
- A name. This needs to be unique across all entities.
- A data type. Anytime this dimension is used, the underlying data is expected to be of this type.
- A description.
For example, suppose multiple views have a column that represents the email of the user associated with the record. Then you could create a reserved dimension:
- Names "user_email"
- Data type of
STRING
. - Description of "The email of the user associated with the record."
Upgrading a Local Dimension to a Reserved Dimension
To add a reserved dimension to a view, you have two options:
- Upgrade an existing local dimension on the view to a reserved dimension.
- Create a new local dimension on the view. Then upgrade it to a reserved dimension.
When you upgrade a local dimension to a reserved dimension:
- The local dimension is renamed to be the same as the reserved dimension. This ensures that every view using the reserved dimension calls it the same thing.
FAQ
- Why can I not upgrade my local dimension to a reserved dimension?
- The local dimension must have the same data type as a reserved dimension. For example, if a local dimension has data type of
INTEGER
, then it can only be upgraded to a reserved dimension of data typeINTEGER
.
- The local dimension must have the same data type as a reserved dimension. For example, if a local dimension has data type of
Updated 4 days ago