> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Example representation: Data model with a list values control

> Example Sigma code representation of a data model with a list values control.

This is an example representation of a data model, created using the [get a data model representation](/reference/getdatamodelspec) endpoint. Representations like this one can be used to create a data model from code using the [create a data model from a representation](/reference/createdatamodelspec) endpoint. Each page in this example library includes the code representation of the data model and step-by-step instructions to create it in the Sigma UI.

Consult this example and others in the [Data model representation example library](/docs/data-model-representation-example-library) to:

* Troubleshoot the formatting of a particular feature in 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

This example representation cannot be used as-is. All identifying details, such as IDs, names, and URLs, have been replaced with randomized ID values or generic substitutions. The format of these contents, like the length of ID values, is preserved for demonstrative purposes. However, this representation cannot be directly used without modification to the base URL, connection details, and more. For more information, see [Create and manage data models from code](/docs/manage-data-models-as-code).

## System and user requirements

To complete the steps in this example, you must meet the user requirements listed below for creating the data model in the UI and creating it from code.

The ability to create this data model in the Sigma UI requires the following:

* You must be assigned an [account type](/docs/account-type-and-license-overview) with the **Create, edit, and publish data models** permissions enabled.
* You must have access to a connection to a data platform.

The ability to create a data model from code requires the following:

* You must be assigned the **Admin** [account type](/docs/account-type-and-license-overview).
* You must have developer credentials for the Sigma API. For more information, see [Get started with the Sigma REST API](/reference/get-started-sigma-api).

This example uses a table from the [Sigma Sample Connection](/docs/sigmas-sample-connection). Your organization might have disabled access to the Sigma sample connection. If so, you can contact an admin to enable it, or use a table from another connection to follow along with this example.

## Create the example data model in the Sigma UI

This example shows a simple data model with a single table element, sourced from a warehouse table, and a list values control.

To create this data model in the Sigma UI:

1. Go to the **Home** page.

2. Select <img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Icons/button-add.svg" alt="" /> **Create New** > **Data model**.

   A new data model opens.

3. From the **Add element** bar, select **Data** > **Table**.

4. In the **Select source** modal, search for the table `FLIGHTS` in the `EXAMPLES.FAA` schema.

5. Select the table to add it to the data model.

   The table appears in the data model.

6. Select the table element.

7. Select <img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Icons/filter.svg" alt="filter" /> **Filters** > <img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Icons/add.svg" alt="" /> **Add filter...**.

8. In the **Select column** modal, select the *Airline* column.

9. Select **Filter options** > **Convert to page control**.

   A list values control appears above the table.

10. Select **Publish**.

## Get a JSON representation of this data model

To get a JSON representation of this data model, follow the steps in [Get the code representation of a data model](/docs/get-the-code-representation-of-a-data-model).

The JSON representation of this data model appears like the following:

#### JSON representation

```json
{
  "dataModelId": "b157009b-d37b-4a44-b0f9-dd083e47a186",
  "name": "list-values-control",
  "url": "https://aws-api.sigmacomputing.com/org-name/data-model/list-values-control-C0o7T9zIgvYsoOa5Q8q0Bz",
  "documentVersion": 4,
  "latestDocumentVersion": 4,
  "ownerId": "fOsrWKBxSMe8HqLmT0nXESkGLpkIc",
  "folderId": "fcb10706-125c-4a83-83d1-2977c8d963a0",
  "createdBy": "fOsrWKBxSMe8HqLmT0nXESkGLpkIc",
  "updatedBy": "fOsrWKBxSMe8HqLmT0nXESkGLpkIc",
  "createdAt": "2026-01-14T17:41:08.797Z",
  "updatedAt": "2026-01-22T17:58:58.639Z",
  "schemaVersion": 1,
  "pages": [
    {
      "id": "WzzXxAUsbt",
      "name": "Page 1",
      "elements": [
        {
          "kind": "control",
          "controlId": "Airline",
          "id": "mmLwifjfySsQ2",
          "filters": [
            {
              "source": {
                "kind": "table",
                "elementId": "0qt809z17a"
              },
              "columnId": "inode-5JTFzWybwuOJYHt41wNolL/AIRLINE"
            }
          ],
          "controlType": "list",
          "mode": "include",
          "selectionMode": "multiple",
          "values": [],
          "source": {
            "kind": "source",
            "source": {
              "kind": "table",
              "elementId": "0qt809z17a"
            },
            "columnId": "inode-5JTFzWybwuOJYHt41wNolL/AIRLINE"
          }
        },
        {
          "id": "0qt809z17a",
          "kind": "table",
          "source": {
            "connectionId": "9ad28df9-5f5f-4bae-8985-bb12d25829de",
            "kind": "warehouse-table",
            "path": [
              "EXAMPLES",
              "FAA",
              "FLIGHTS"
            ]
          },
          "columns": [
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/YEAR",
              "formula": "[FLIGHTS/Year]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/MONTH",
              "formula": "[FLIGHTS/Month]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/DAY",
              "formula": "[FLIGHTS/Day]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/DAY_OF_WEEK",
              "formula": "[FLIGHTS/Day of Week]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/AIRLINE",
              "formula": "[FLIGHTS/Airline]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/FLIGHT_NUMBER",
              "formula": "[FLIGHTS/Flight Number]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/TAIL_NUMBER",
              "formula": "[FLIGHTS/Tail Number]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/ORIGIN_AIRPORT",
              "formula": "[FLIGHTS/Origin Airport]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/DESTINATION_AIRPORT",
              "formula": "[FLIGHTS/Destination Airport]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/SCHEDULED_DEPARTURE",
              "formula": "[FLIGHTS/Scheduled Departure]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/DEPARTURE_TIME",
              "formula": "[FLIGHTS/Departure Time]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/DEPARTURE_DELAY",
              "formula": "[FLIGHTS/Departure Delay]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/TAXI_OUT",
              "formula": "[FLIGHTS/Taxi Out]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/WHEELS_OFF",
              "formula": "[FLIGHTS/Wheels Off]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/SCHEDULED_TIME",
              "formula": "[FLIGHTS/Scheduled Time]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/ELAPSED_TIME",
              "formula": "[FLIGHTS/Elapsed Time]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/AIR_TIME",
              "formula": "[FLIGHTS/Air Time]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/DISTANCE",
              "formula": "[FLIGHTS/Distance]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/WHEELS_ON",
              "formula": "[FLIGHTS/Wheels On]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/TAXI_IN",
              "formula": "[FLIGHTS/Taxi In]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/SCHEDULED_ARRIVAL",
              "formula": "[FLIGHTS/Scheduled Arrival]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/ARRIVAL_TIME",
              "formula": "[FLIGHTS/Arrival Time]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/ARRIVAL_DELAY",
              "formula": "[FLIGHTS/Arrival Delay]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/DIVERTED",
              "formula": "[FLIGHTS/Diverted]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/CANCELLED",
              "formula": "[FLIGHTS/Cancelled]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/CANCELLATION_REASON",
              "formula": "[FLIGHTS/Cancellation Reason]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/AIR_SYSTEM_DELAY",
              "formula": "[FLIGHTS/Air System Delay]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/SECURITY_DELAY",
              "formula": "[FLIGHTS/Security Delay]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/AIRLINE_DELAY",
              "formula": "[FLIGHTS/Airline Delay]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/LATE_AIRCRAFT_DELAY",
              "formula": "[FLIGHTS/Late Aircraft Delay]"
            },
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/WEATHER_DELAY",
              "formula": "[FLIGHTS/Weather Delay]"
            }
          ],
          "order": [
            "inode-Ayhp5bdwjOj7J3rwU39F9y/YEAR",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/MONTH",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/DAY",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/DAY_OF_WEEK",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/AIRLINE",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/FLIGHT_NUMBER",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/TAIL_NUMBER",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/ORIGIN_AIRPORT",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/DESTINATION_AIRPORT",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/SCHEDULED_DEPARTURE",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/DEPARTURE_TIME",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/DEPARTURE_DELAY",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/TAXI_OUT",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/WHEELS_OFF",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/SCHEDULED_TIME",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/ELAPSED_TIME",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/AIR_TIME",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/DISTANCE",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/WHEELS_ON",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/TAXI_IN",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/SCHEDULED_ARRIVAL",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/ARRIVAL_TIME",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/ARRIVAL_DELAY",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/DIVERTED",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/CANCELLED",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/CANCELLATION_REASON",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/AIR_SYSTEM_DELAY",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/SECURITY_DELAY",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/AIRLINE_DELAY",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/LATE_AIRCRAFT_DELAY",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/WEATHER_DELAY"
          ]
        }
      ]
    }
  ]
}
```

## Representing list values controls

In this representation, the list values control is represented by this object in the `elements` array of the table element:

#### List values control representation

```json
...
{
  "kind": "control",
  "controlId": "Airline",
  "id": "mmLwifjfySsQ2",
  "filters": [
    {
      "source": {
        "kind": "table",
        "elementId": "0qt809z17a"
      },
      "columnId": "inode-5JTFzWybwuOJYHt41wNolL/AIRLINE"
    }
  ],
  "controlType": "list",
  "mode": "include",
  "selectionMode": "multiple",
  "values": [],
  "source": {
    "kind": "source",
    "source": {
      "kind": "table",
      "elementId": "0qt809z17a"
    },
    "columnId": "inode-5JTFzWybwuOJYHt41wNolL/AIRLINE"
  }
}
...
```