Example representation: Data model with a CSV table

View as Markdown

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 and Upload CSV permissions enabled.
  • You must have access to a connection with write access enabled. Sigma writes uploaded CSV data to this connection.
  • The CSV upload feature must be enabled for your organization.

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

This example shows a simple data model with a single table element sourced from an uploaded CSV file. The example uses a file named TRIP.csv that contains the 11 columns of the TRIP table in the FUN.BIKES schema. To follow along with the same data, export that table to a CSV file, or upload a CSV file of your own.

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, select CSV.

  5. In the Upload CSV page, select the Connection dropdown and choose a connection to write the CSV data to. You can only choose a connection with write access enabled.

  6. Drag and drop the TRIP.csv file, or click Browse and choose it from the file picker.

    Sigma displays a preview of the data.

  7. In the Results tab, review the parsed data and confirm that all 11 columns are included.

  8. In the header, click Save.

    The CSV data appears as a table element in the data model.

  9. Select Publish.

For more information about uploading CSV data and customizing parsing options, see Upload CSV data.

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:

1{
2 "dataModelId": "16b7560c-735b-4849-9558-6124738030ba",
3 "name": "csv-table",
4 "url": "https://aws-api.sigmacomputing.com/org-name/data-model/csv-table-i4iV44p1P25Glqn9Mq2gpl",
5 "documentVersion": 2,
6 "latestDocumentVersion": 2,
7 "ownerId": "k44hlkTl6jwvpvBPvwtiKHbF8Eezc",
8 "folderId": "835de47c-2e44-4d87-aaff-5912eb405d7f",
9 "createdBy": "k44hlkTl6jwvpvBPvwtiKHbF8Eezc",
10 "updatedBy": "k44hlkTl6jwvpvBPvwtiKHbF8Eezc",
11 "createdAt": "2026-09-03T16:21:53.877Z",
12 "updatedAt": "2026-09-03T16:23:12.209Z",
13 "schemaVersion": 1,
14 "pages": [
15 {
16 "id": "sSoGwH4D6y",
17 "name": "Page 1",
18 "elements": [
19 {
20 "id": "Ph6VpWECZg",
21 "kind": "table",
22 "source": {
23 "connectionId": "9b32627e-8b6e-4535-81be-dbd0c9608306",
24 "kind": "csv-table",
25 "inodeId": "bd78491c-c9a6-443a-b1de-e06d075c45a4"
26 },
27 "columns": [
28 {
29 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/ID",
30 "formula": "[TRIP.csv/Id]"
31 },
32 {
33 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/DURATION",
34 "formula": "[TRIP.csv/Duration]"
35 },
36 {
37 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/START_DATE",
38 "formula": "[TRIP.csv/Start Date]"
39 },
40 {
41 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/START_STATION_NAME",
42 "formula": "[TRIP.csv/Start Station Name]"
43 },
44 {
45 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/START_STATION_ID",
46 "formula": "[TRIP.csv/Start Station Id]"
47 },
48 {
49 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/END_DATE",
50 "formula": "[TRIP.csv/End Date]"
51 },
52 {
53 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/END_STATION_NAME",
54 "formula": "[TRIP.csv/End Station Name]"
55 },
56 {
57 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/END_STATION_ID",
58 "formula": "[TRIP.csv/End Station Id]"
59 },
60 {
61 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/BIKE_ID",
62 "formula": "[TRIP.csv/Bike Id]"
63 },
64 {
65 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/SUBSCRIPTION_TYPE",
66 "formula": "[TRIP.csv/Subscription Type]"
67 },
68 {
69 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/ZIP_CODE",
70 "formula": "[TRIP.csv/Zip Code]"
71 }
72 ],
73 "order": [
74 "bd78491c-c9a6-443a-b1de-e06d075c45a4/ID",
75 "bd78491c-c9a6-443a-b1de-e06d075c45a4/DURATION",
76 "bd78491c-c9a6-443a-b1de-e06d075c45a4/START_DATE",
77 "bd78491c-c9a6-443a-b1de-e06d075c45a4/START_STATION_NAME",
78 "bd78491c-c9a6-443a-b1de-e06d075c45a4/START_STATION_ID",
79 "bd78491c-c9a6-443a-b1de-e06d075c45a4/END_DATE",
80 "bd78491c-c9a6-443a-b1de-e06d075c45a4/END_STATION_NAME",
81 "bd78491c-c9a6-443a-b1de-e06d075c45a4/END_STATION_ID",
82 "bd78491c-c9a6-443a-b1de-e06d075c45a4/BIKE_ID",
83 "bd78491c-c9a6-443a-b1de-e06d075c45a4/SUBSCRIPTION_TYPE",
84 "bd78491c-c9a6-443a-b1de-e06d075c45a4/ZIP_CODE"
85 ]
86 }
87 ]
88 }
89 ],
90 "kind": "data-model"
91}

Representing CSV tables

In this representation, the CSV table is represented by this object in the elements array of the data model:

1...
2{
3 "id": "Ph6VpWECZg",
4 "kind": "table",
5 "source": {
6 "connectionId": "9b32627e-8b6e-4535-81be-dbd0c9608306",
7 "kind": "csv-table",
8 "inodeId": "bd78491c-c9a6-443a-b1de-e06d075c45a4"
9 },
10 "columns": [
11 {
12 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/ID",
13 "formula": "[TRIP.csv/Id]"
14 },
15 {
16 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/DURATION",
17 "formula": "[TRIP.csv/Duration]"
18 },
19 {
20 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/START_DATE",
21 "formula": "[TRIP.csv/Start Date]"
22 },
23 {
24 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/START_STATION_NAME",
25 "formula": "[TRIP.csv/Start Station Name]"
26 },
27 {
28 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/START_STATION_ID",
29 "formula": "[TRIP.csv/Start Station Id]"
30 },
31 {
32 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/END_DATE",
33 "formula": "[TRIP.csv/End Date]"
34 },
35 {
36 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/END_STATION_NAME",
37 "formula": "[TRIP.csv/End Station Name]"
38 },
39 {
40 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/END_STATION_ID",
41 "formula": "[TRIP.csv/End Station Id]"
42 },
43 {
44 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/BIKE_ID",
45 "formula": "[TRIP.csv/Bike Id]"
46 },
47 {
48 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/SUBSCRIPTION_TYPE",
49 "formula": "[TRIP.csv/Subscription Type]"
50 },
51 {
52 "id": "bd78491c-c9a6-443a-b1de-e06d075c45a4/ZIP_CODE",
53 "formula": "[TRIP.csv/Zip Code]"
54 }
55 ],
56 "order": [
57 "bd78491c-c9a6-443a-b1de-e06d075c45a4/ID",
58 "bd78491c-c9a6-443a-b1de-e06d075c45a4/DURATION",
59 "bd78491c-c9a6-443a-b1de-e06d075c45a4/START_DATE",
60 "bd78491c-c9a6-443a-b1de-e06d075c45a4/START_STATION_NAME",
61 "bd78491c-c9a6-443a-b1de-e06d075c45a4/START_STATION_ID",
62 "bd78491c-c9a6-443a-b1de-e06d075c45a4/END_DATE",
63 "bd78491c-c9a6-443a-b1de-e06d075c45a4/END_STATION_NAME",
64 "bd78491c-c9a6-443a-b1de-e06d075c45a4/END_STATION_ID",
65 "bd78491c-c9a6-443a-b1de-e06d075c45a4/BIKE_ID",
66 "bd78491c-c9a6-443a-b1de-e06d075c45a4/SUBSCRIPTION_TYPE",
67 "bd78491c-c9a6-443a-b1de-e06d075c45a4/ZIP_CODE"
68 ]
69}
70...