Example representation: Workbook with a donut 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 donut 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 Donut Color Subscription Type Value Count of Id Donut hole value Count of Id -
In the document header, select Save as.
-
Enter a name for the workbook, such as
donut-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: b91e6246-1cec-4741-9896-b6e826be81d8
name: donut-chart
url: https://aws-api.sigmacomputing.com/org-name/workbook/donut-chart-3vuGE3bxRWXHibZ4uox7lE
documentVersion: 3
latestDocumentVersion: 3
ownerId: Ipb0LILcSmxdd6uZFfy2EJLR6N2nr
folderId: 2cfd0815-2749-49b4-9a07-46684d13e7d0
createdBy: Ipb0LILcSmxdd6uZFfy2EJLR6N2nr
updatedBy: Ipb0LILcSmxdd6uZFfy2EJLR6N2nr
createdAt: '2026-04-20T20:09:56.317Z'
updatedAt: '2026-04-21T14:52:37.237Z'
schemaVersion: 1
pages:
- id: JKvM6heqiW
name: Page 1
elements:
- id: BqWs6jAoxu
kind: table
source:
connectionId: d6bfeea1-5da2-458c-9bcf-ec9400d24ceb
kind: warehouse-table
path:
- FUN
- BIKES
- TRIP
columns:
- id: jkTfptgvrd
formula: '[TRIP/Id]'
- id: zqvAPnqXJ8
formula: '[TRIP/Duration]'
- id: AweUucxfyP
formula: '[TRIP/Start Date]'
- id: 13YWp9mEby
formula: '[TRIP/Start Station Name]'
- id: NDbqkFWCh7
formula: '[TRIP/Start Station Id]'
- id: 0ZX5SARLhm
formula: '[TRIP/End Date]'
- id: UXPwqW9Wz3
formula: '[TRIP/End Station Name]'
- id: p79MDpSC6z
formula: '[TRIP/End Station Id]'
- id: rb1NNkv8bN
formula: '[TRIP/Bike Id]'
- id: RuBZG1xFql
formula: '[TRIP/Subscription Type]'
- id: uOtXQu2qNC
formula: '[TRIP/Zip Code]'
order:
- jkTfptgvrd
- zqvAPnqXJ8
- AweUucxfyP
- 13YWp9mEby
- NDbqkFWCh7
- 0ZX5SARLhm
- UXPwqW9Wz3
- p79MDpSC6z
- rb1NNkv8bN
- RuBZG1xFql
- uOtXQu2qNC
- id: jXyApHAqb9
kind: donut-chart
source:
elementId: BqWs6jAoxu
kind: table
columns:
- id: bfohbEdWZD
formula: '[TRIP/Subscription Type]'
- id: 21OFT7tz98
formula: Count([Id])
- id: xJW83pwmNJ
formula: Count([Id])
- id: gGOQZq2nSs
formula: '[TRIP/Id]'
- id: xZOxiNPjDc
formula: '[TRIP/Duration]'
- id: yp2W8asGw4
formula: '[TRIP/Start Date]'
- id: 3hTTt4Uqfm
formula: '[TRIP/Start Station Id]'
- id: tn99UwG7Gu
formula: '[TRIP/End Date]'
- id: RvrFBh90Aa
formula: '[TRIP/End Station Name]'
- id: 7KjnH8QjBJ
formula: '[TRIP/End Station Id]'
- id: 4Ky94w81gD
formula: '[TRIP/Bike Id]'
- id: Ft20JdSraX
formula: '[TRIP/Zip Code]'
- id: oIaicrw2PA
formula: '[TRIP/Start Station Name]'
color:
id: bfohbEdWZD
value:
id: xJW83pwmNJ
holeValue:
id: 21OFT7tz98
layout: |
<?xml version="1.0" encoding="utf-8"?>
<Page type="grid" gridTemplateColumns="repeat(24, 1fr)" gridTemplateRows="auto" id="JKvM6heqiW">
<LayoutElement elementId="BqWs6jAoxu" gridColumn="1 / 25" gridRow="1 / 21"/>
<LayoutElement elementId="jXyApHAqb9" gridColumn="1 / 25" gridRow="21 / 41"/>
</Page>
Representing donut charts
Donut chart representation
...
id: jXyApHAqb9
kind: donut-chart
source:
elementId: BqWs6jAoxu
kind: table
columns:
- id: bfohbEdWZD
formula: '[TRIP/Subscription Type]'
- id: 21OFT7tz98
formula: Count([Id])
- id: xJW83pwmNJ
formula: Count([Id])
- id: gGOQZq2nSs
formula: '[TRIP/Id]'
- id: xZOxiNPjDc
formula: '[TRIP/Duration]'
- id: yp2W8asGw4
formula: '[TRIP/Start Date]'
- id: 3hTTt4Uqfm
formula: '[TRIP/Start Station Id]'
- id: tn99UwG7Gu
formula: '[TRIP/End Date]'
- id: RvrFBh90Aa
formula: '[TRIP/End Station Name]'
- id: 7KjnH8QjBJ
formula: '[TRIP/End Station Id]'
- id: 4Ky94w81gD
formula: '[TRIP/Bike Id]'
- id: Ft20JdSraX
formula: '[TRIP/Zip Code]'
- id: oIaicrw2PA
formula: '[TRIP/Start Station Name]'
color:
id: bfohbEdWZD
value:
id: xJW83pwmNJ
holeValue:
id: 21OFT7tz98
...