> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://help.sigmacomputing.com/docs/data-model-representation-example-library/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server. # Data model representation example library > Browse Sigma data model code representation examples to troubleshoot API formatting, map UI features to code, and support AI-assisted modeling. The Sigma programmatic data model API endpoints, including [Create a data model from a code representation](/reference/create-data-model-spec), [Update a data model from a code representation](/reference/update-data-model-spec), and [Get the code representation of a data model](/reference/get-data-model-spec) 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: > **Tip** > > 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](/reference/get-data-model-spec) endpoint. > Official documentation and guidance for using Sigma to build AI apps, dashboards, and agents on governed warehouse data. ## Docs - [Example representation: Data model with a single table](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-single-table.md): Example Sigma code representation of a data model with a single table. - [Example representation: Data model with a CSV table](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-csv-table.md): Example Sigma code representation of a data model with a CSV table. - [Example representation: Data model with a table and a calculated column](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-table-and-a-calculated-column.md): Example Sigma code representation of a data model with a table and a calculated column. - [Example representation: Data model with a table and metric](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-table-and-a-metric.md): Example Sigma code representation of a data model with a table and metric. - [Example representation: Data model with a metric timeline](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-metric-timeline.md): Example Sigma code representation of a data model with a metric timeline. - [Example representation: Data model with a table and relationship](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-table-and-a-relationship.md): Example Sigma code representation of a data model with a table and relationship. - [Example representation: Data model with a custom SQL element](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-custom-sql-element.md): Example Sigma code representation of a data model with a custom SQL element. - [Example representation: Data model with a folder](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-folder.md): Example Sigma code representation of a data model with a folder. - [Example representation: Data model with a grouping](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-grouping.md): Example Sigma code representation of a data model with a grouping. - [Example representation: Data model with filters](https://help.sigmacomputing.com/docs/example-representation-data-model-with-filters.md): Example Sigma code representation of a data model with filters. - [Example representation: Data model with a join](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-join.md): Example Sigma code representation of a data model with a join. - [Example representation: Data model with a union](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-union.md): Example Sigma code representation of a data model with a union. - [Example representation: Data model with a transposed table](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-transposed-table.md): Example Sigma code representation of a data model with a transposed table. - [Example representation: Data model with column-level security](https://help.sigmacomputing.com/docs/example-representation-data-model-with-column-level-security.md): Example Sigma code representation of a data model with column-level security. - [Example representation: Data model with a list values control](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-list-values-control.md): Example Sigma code representation of a data model with a list values control. - [Example representation: Data model with a text input control](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-text-input-control.md): Example Sigma code representation of a data model with a text input control. - [Example representation: Data model with a text area control](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-text-area-control.md): Example Sigma code representation of a data model with a text area control. - [Example representation: Data model with a number input control](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-number-input-control.md): Example Sigma code representation of a data model with a number input control. - [Example representation: Data model with a number range control](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-number-range-control.md): Example Sigma code representation of a data model with a number range control. - [Example representation: Data model with a date control](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-date-control.md): Example Sigma code representation of a data model with a date control. - [Example representation: Data model with a date range control](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-date-range-control.md): Example Sigma code representation of a data model with a date range control. - [Example representation: Data model with a slider control](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-slider-control.md): Example Sigma code representation of a data model with a slider control. - [Example representation: Data model with a range slider control](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-range-slider-control.md): Example Sigma code representation of a data model with a range slider control. - [Example representation: Data model with a segmented control](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-segmented-control.md): Example Sigma code representation of a data model with a segmented control. - [Example representation: Data model with a switch control](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-switch-control.md): Example Sigma code representation of a data model with a switch control. - [Example representation: Data model with a checkbox control](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-checkbox-control.md): Example Sigma code representation of a data model with a checkbox control. - [Example representation: Data model with a top N control](https://help.sigmacomputing.com/docs/example-representation-data-model-with-a-top-n-control.md): Example Sigma code representation of a data model with a top N control.