Example representation: Workbook with a pie chart (Beta)

View as Markdown

This documentation describes one or more private beta features that are in development. Beta features are subject to quick, iterative changes; therefore the current user experience in the Sigma service can differ from the information provided in this page.

This page should not be considered official published documentation until Sigma removes this notice and the beta flag on the corresponding feature(s) in the Sigma service. For the full beta feature disclaimer, see Beta features.

If you are interested in joining a limited test group and enabling this feature in your Sigma organization, contact Support or reach out to your Account Executive.

This is an example representation of a workbook, created using the get a workbook representation endpoint. Representations like this one can be used to create a workbook from code using the create a workbook from a representation endpoint. Each page in this example library includes the code representation of the workbook and step-by-step instructions to create it in the Sigma UI.

Consult this example and others in the Workbook 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 workbooks 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 workbooks from code.

System and user requirements

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

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

  • You must be assigned an account type with the Create, edit, and publish workbooks permission enabled.
  • You must have access to a connection to a data platform.

The ability to create a workbook 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 workbook in the Sigma UI

This example shows a simple workbook with a single table element, sourced from a warehouse table, and a pie chart.

To create this workbook in the Sigma UI:

  1. Go to the Home page.

  2. Select Create new > Workbook.

    A new workbook opens.

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

  4. In the Select source modal, search for the table TRIP in the EXAMPLES.BIKES schema.

  5. Select the table to add it to the workbook.

    The table appears in the workbook.

  6. Select Add child element > Chart.

    A new bar chart element appears on the workbook canvas.

  7. In the editor panel, select Properties and configure the chart with the following settings:

    OptionSetting
    Chart typePie
    ColorSubscription Type
    ValueCount of Id
  8. In the document header, select Save as.

  9. Enter a name for the workbook, such as pie-chart.

  10. Select Save.

Get a code representation of this workbook

To get a representation of this workbook, follow the steps in Get the code representation of a workbook.

The code representation of this workbook appears like the following:

1workbookId: e54a0e3f-1470-40ef-b94f-f21219e1eaaa
2name: pie-chart
3url: https://aws-api.sigmacomputing.com/org-name/workbook/pie-chart-3fmzLIAufDHpr0RAYkj1Vj
4documentVersion: 2
5latestDocumentVersion: 2
6ownerId: IaYwubYCIBXp9gO8BswaUtcHqxc0b
7folderId: d82c1201-67bb-40a2-896f-52fea951b651
8createdBy: IaYwubYCIBXp9gO8BswaUtcHqxc0b
9updatedBy: IaYwubYCIBXp9gO8BswaUtcHqxc0b
10createdAt: '2026-04-20T20:09:55.393Z'
11updatedAt: '2026-04-21T14:49:54.416Z'
12document:
13 schemaVersion: 1
14 elements:
15 - id: U7DRT4u3sR
16 kind: table
17 source:
18 connectionId: 709342a2-de05-41f5-be61-44e81f753327
19 kind: warehouse-table
20 path:
21 - FUN
22 - BIKES
23 - TRIP
24 columns:
25 - id: Vo2TWq2M6K
26 formula: '[TRIP/Id]'
27 - id: eOCfAFQoSV
28 formula: '[TRIP/Duration]'
29 - id: Ds0nc1r95a
30 formula: '[TRIP/Start Date]'
31 - id: 6GhDqiC7hp
32 formula: '[TRIP/Start Station Name]'
33 - id: 2zLKyFq45u
34 formula: '[TRIP/Start Station Id]'
35 - id: 8yB8T0ypNk
36 formula: '[TRIP/End Date]'
37 - id: mJRUMWMm8z
38 formula: '[TRIP/End Station Name]'
39 - id: 5n4hfiMx9h
40 formula: '[TRIP/End Station Id]'
41 - id: K1vI8AcV2U
42 formula: '[TRIP/Bike Id]'
43 - id: k8uEp9KYfM
44 formula: '[TRIP/Subscription Type]'
45 - id: G3jWYLSO4k
46 formula: '[TRIP/Zip Code]'
47 order:
48 - Vo2TWq2M6K
49 - eOCfAFQoSV
50 - Ds0nc1r95a
51 - 6GhDqiC7hp
52 - 2zLKyFq45u
53 - 8yB8T0ypNk
54 - mJRUMWMm8z
55 - 5n4hfiMx9h
56 - K1vI8AcV2U
57 - k8uEp9KYfM
58 - G3jWYLSO4k
59 - id: DBZ0QrfNN1
60 kind: pie-chart
61 source:
62 elementId: U7DRT4u3sR
63 kind: table
64 columns:
65 - id: YUNSC9n1pz
66 formula: '[TRIP/Subscription Type]'
67 - id: 'j87ChAxG8a'
68 formula: Count([Id])
69 - id: HI27TphRrK
70 formula: '[TRIP/Id]'
71 - id: GId1kU76Yk
72 formula: '[TRIP/Duration]'
73 - id: 5HPMn1xn0R
74 formula: '[TRIP/Start Date]'
75 - id: MGvqR7mo61
76 formula: '[TRIP/Start Station Name]'
77 - id: 3kqCxsHymS
78 formula: '[TRIP/Start Station Id]'
79 - id: JRjjeHGGfn
80 formula: '[TRIP/End Date]'
81 - id: BAGxx5m1gV
82 formula: '[TRIP/End Station Name]'
83 - id: jQ0YXhvvao
84 formula: '[TRIP/End Station Id]'
85 - id: 2PcnPWXVP0
86 formula: '[TRIP/Bike Id]'
87 - id: 6z2c9LJir8
88 formula: '[TRIP/Zip Code]'
89 color:
90 id: YUNSC9n1pz
91 value:
92 id: 'j87ChAxG8a'
93 pages:
94 - id: YVU3BmYEiF
95 name: Page 1
96 kind: workbook
97 layout: |
98 <?xml version="1.0" encoding="utf-8"?>
99 <Page type="grid" gridTemplateColumns="repeat(24, 1fr)" gridTemplateRows="auto" id="YVU3BmYEiF">
100 <Element elementId="U7DRT4u3sR" gridColumn="1 / 25" gridRow="1 / 21"/>
101 <Element elementId="DBZ0QrfNN1" gridColumn="1 / 25" gridRow="21 / 41"/>
102 </Page>

Representing pie charts

1...
2id: DBZ0QrfNN1
3kind: pie-chart
4source:
5 elementId: U7DRT4u3sR
6 kind: table
7columns:
8- id: YUNSC9n1pz
9 formula: '[TRIP/Subscription Type]'
10- id: j87ChAxG8a
11 formula: Count([Id])
12- id: HI27TphRrK
13 formula: '[TRIP/Id]'
14- id: GId1kU76Yk
15 formula: '[TRIP/Duration]'
16- id: 5HPMn1xn0R
17 formula: '[TRIP/Start Date]'
18- id: MGvqR7mo61
19 formula: '[TRIP/Start Station Name]'
20- id: 3kqCxsHymS
21 formula: '[TRIP/Start Station Id]'
22- id: JRjjeHGGfn
23 formula: '[TRIP/End Date]'
24- id: BAGxx5m1gV
25 formula: '[TRIP/End Station Name]'
26- id: jQ0YXhvvao
27 formula: '[TRIP/End Station Id]'
28- id: 2PcnPWXVP0
29 formula: '[TRIP/Bike Id]'
30- id: 6z2c9LJir8
31 formula: '[TRIP/Zip Code]'
32color:
33 id: YUNSC9n1pz
34value:
35 id: j87ChAxG8a
36...