Data model representation example library
The Sigma programmatic data model API endpoints, including Create a data model from a code representation, Update a data model from a code representation, and Get the code representation of a data model require a specific format for the representation of the data model. This example library shows examples of data model representations for various configurations, using different element types and features in Sigma.
Consult these examples to:
- Troubleshoot the formatting of a particular feature in a code representation
- Relate a feature from the Sigma UI to its representation in code
- Provide context to AI tools used to create data models from code
Example representations
To review a specific representation, search or browse the following examples:
| Feature | Link |
|---|---|
| Data model with a single table | View example |
| Data model with a table and a calculated column | View example |
| Data model with a table and a metric | View example |
| Data model with a metric timeline | View example |
| Data model with a table and a relationship | View example |
| Data model with a custom SQL element | View example |
To see the representation for a specific configuration or combination of features, you can create the data model in the UI and then retrieve the representation using the Get the code representation of a data model endpoint.
Updated about 9 hours ago