Example representation: Workbook with a pie chart (Beta)
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:
- You must be assigned an account type with the Create, edit, and publish workbooks permission enabled.
- You must have developer credentials for the Sigma API. For more information, see Get started with the Sigma REST API.
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:
-
Go to the Home page.
-
Select
Create new > Workbook.
A new workbook opens.
-
From the Add element bar, select Data > Table.
-
In the Select source modal, search for the table
TRIPSin theEXAMPLES.BIKESschema. -
Select the table to add it to the workbook.
The table appears in the workbook.
-
Select
Add child element > Chart.
A new bar chart element appears on the workbook canvas.
-
In the editor panel, select Properties and configure the chart with the following settings:
Option Setting Chart type Pie Color Subscription Type Value Count of Id -
In the document header, select Save as.
-
Enter a name for the workbook, such as
pie-chart. -
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:
YAML representation
workbookId: 01d941dd-021e-430d-ac8f-75a836268638
name: pie-chart
url: https://aws-api.sigmacomputing.com/org-name/workbook/pie-chart-h8qnGfo6Ar6IuaK4oSh9Gj
documentVersion: 2
latestDocumentVersion: 2
ownerId: xoEJkIWFQ9XXyb3pSiQ6vLY1NN9ct
folderId: 49b7a884-cf40-4f19-b30f-5fe1085be7cf
createdBy: xoEJkIWFQ9XXyb3pSiQ6vLY1NN9ct
updatedBy: xoEJkIWFQ9XXyb3pSiQ6vLY1NN9ct
createdAt: '2026-04-20T20:09:55.393Z'
updatedAt: '2026-04-21T14:49:54.416Z'
schemaVersion: 1
pages:
- id: YM2FKdawYE
name: Page 1
elements:
- id: 42dpnmkZvh
kind: table
source:
connectionId: a94dd260-7463-482c-a589-f772dab54821
kind: warehouse-table
path:
- FUN
- BIKES
- TRIP
columns:
- id: 4dJCQ4dfhA
formula: '[TRIP/Id]'
- id: VwtJSpa6Qd
formula: '[TRIP/Duration]'
- id: zb1NeDsTwU
formula: '[TRIP/Start Date]'
- id: 7JIm3gVTp3
formula: '[TRIP/Start Station Name]'
- id: kjIIY0OJsb
formula: '[TRIP/Start Station Id]'
- id: jEhw2QuwL7
formula: '[TRIP/End Date]'
- id: n1rTX5sVNz
formula: '[TRIP/End Station Name]'
- id: Wfqw4v0B77
formula: '[TRIP/End Station Id]'
- id: 2hzrGbqgcH
formula: '[TRIP/Bike Id]'
- id: WJwcSfWF6M
formula: '[TRIP/Subscription Type]'
- id: H8L9bWrXRY
formula: '[TRIP/Zip Code]'
order:
- 4dJCQ4dfhA
- VwtJSpa6Qd
- zb1NeDsTwU
- 7JIm3gVTp3
- kjIIY0OJsb
- jEhw2QuwL7
- n1rTX5sVNz
- Wfqw4v0B77
- 2hzrGbqgcH
- WJwcSfWF6M
- H8L9bWrXRY
- id: rtkGZXHtaJ
kind: pie-chart
source:
elementId: 42dpnmkZvh
kind: table
columns:
- id: zCNQw83HLE
formula: '[TRIP/Subscription Type]'
- id: 'dIhJIj5ZuX'
formula: Count([Id])
- id: hiahmTxHz3
formula: '[TRIP/Id]'
- id: hknxvfBkEg
formula: '[TRIP/Duration]'
- id: Y2hBfv0yi3
formula: '[TRIP/Start Date]'
- id: PL9UD8pV4S
formula: '[TRIP/Start Station Name]'
- id: VtajdcCsMv
formula: '[TRIP/Start Station Id]'
- id: ZpnVlSb8qP
formula: '[TRIP/End Date]'
- id: 6ogqoNuygR
formula: '[TRIP/End Station Name]'
- id: caPBu1ykyN
formula: '[TRIP/End Station Id]'
- id: Mkrq95PNCl
formula: '[TRIP/Bike Id]'
- id: osekk1A3l9
formula: '[TRIP/Zip Code]'
color:
id: zCNQw83HLE
value:
id: 'dIhJIj5ZuX'
layout: |
<?xml version="1.0" encoding="utf-8"?>
<Page type="grid" gridTemplateColumns="repeat(24, 1fr)" gridTemplateRows="auto" id="YM2FKdawYE">
<LayoutElement elementId="42dpnmkZvh" gridColumn="1 / 25" gridRow="1 / 21"/>
<LayoutElement elementId="rtkGZXHtaJ" gridColumn="1 / 25" gridRow="21 / 41"/>
</Page>
Representing pie charts
Pie chart representation
...
id: rtkGZXHtaJ
kind: pie-chart
source:
elementId: 42dpnmkZvh
kind: table
columns:
- id: zCNQw83HLE
formula: '[TRIP/Subscription Type]'
- id: dIhJIj5ZuX
formula: Count([Id])
- id: hiahmTxHz3
formula: '[TRIP/Id]'
- id: hknxvfBkEg
formula: '[TRIP/Duration]'
- id: Y2hBfv0yi3
formula: '[TRIP/Start Date]'
- id: PL9UD8pV4S
formula: '[TRIP/Start Station Name]'
- id: VtajdcCsMv
formula: '[TRIP/Start Station Id]'
- id: ZpnVlSb8qP
formula: '[TRIP/End Date]'
- id: 6ogqoNuygR
formula: '[TRIP/End Station Name]'
- id: caPBu1ykyN
formula: '[TRIP/End Station Id]'
- id: Mkrq95PNCl
formula: '[TRIP/Bike Id]'
- id: osekk1A3l9
formula: '[TRIP/Zip Code]'
color:
id: zCNQw83HLE
value:
id: dIhJIj5ZuX
...