Example representation: Data model with a grouping

This is an example representation of a data model, created using the get a data model representation endpoint. Representations like this one can be used to create a data model from code using the create a data model from a representation 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 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.

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 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:

This example uses a table from the Sigma 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

To create this data model in the Sigma UI:

  1. Go to the Home page.

  2. Select 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. In the editor panel, select the Properties tab.

  8. Under Groupings, select Add grouping....

  9. In the Select column modal, select the Airline column.

    The table is grouped by the Airline column.

  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.

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

JSON representation
{
  "dataModelId": "5e08ca45-d9aa-495d-9d2e-aadbbf82c7c9",
  "name": "grouping",
  "url": "https://aws-api.sigmacomputing.com/org-name/data-model/grouping-grcLueAEB2HG4Ia2WMDmsT",
  "documentVersion": 2,
  "latestDocumentVersion": 2,
  "ownerId": "fOsrWKBxSMe8HqLmT0nXESkGLpkIc",
  "folderId": "fcb10706-125c-4a83-83d1-2977c8d963a0",
  "createdBy": "fOsrWKBxSMe8HqLmT0nXESkGLpkIc",
  "updatedBy": "fOsrWKBxSMe8HqLmT0nXESkGLpkIc",
  "createdAt": "2026-01-22T15:31:17.142Z",
  "updatedAt": "2026-01-22T17:58:14.661Z",
  "schemaVersion": 1,
  "pages": [
    {
      "id": "VaKRVNKb42",
      "name": "Page 1",
      "elements": [
        {
          "id": "dldyDYIeub",
          "kind": "table",
          "source": {
            "connectionId": "9ad28df9-5f5f-4bae-8985-bb12d25829de",
            "kind": "warehouse-table",
            "path": [
              "EXAMPLES",
              "FAA",
              "FLIGHTS"
            ]
          },
          "columns": [
            {
              "id": "inode-Ayhp5bdwjOj7J3rwU39F9y/AIRLINE",
              "formula": "[FLIGHTS/Airline]"
            },
            {
              "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/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]"
            }
          ],
          "groupings": [
            {
              "id": "GjNG7TElpF",
              "groupBy": [
                "inode-Ayhp5bdwjOj7J3rwU39F9y/AIRLINE"
              ]
            }
          ],
          "order": [
            "inode-Ayhp5bdwjOj7J3rwU39F9y/YEAR",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/MONTH",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/DAY",
            "inode-Ayhp5bdwjOj7J3rwU39F9y/DAY_OF_WEEK",
            "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 groupings

In this representation, the grouping is represented by this object in the table element:

Grouping representation
...
[
  {
    "id": "GjNG7TElpF",
    "groupBy": [
      "inode-Ayhp5bdwjOj7J3rwU39F9y/AIRLINE"
    ]
  }
]
...