Example representation: Workbook with a bar 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 bar 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 bar chart with the following settings:

    OptionSetting
    X-axisStart Station Name
    Y-axisCount of Id
  8. Select the down arrow next to Start Station Name to open the column details menu and select Sort > Start Station Name.

  9. In the document header, select Save as.

  10. Enter a name for the workbook, such as bar-chart.

  11. 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: c94757f3-3a66-428e-92da-232e2a801ec1
2name: bar-chart
3url: https://aws-api.sigmacomputing.com/org-name/workbook/bar-chart-gQIH7DKeAfa3JZL5JRHqnz
4documentVersion: 2
5latestDocumentVersion: 2
6ownerId: Ipb0LILcSmxdd6uZFfy2EJLR6N2nr
7folderId: 2cfd0815-2749-49b4-9a07-46684d13e7d0
8createdBy: Ipb0LILcSmxdd6uZFfy2EJLR6N2nr
9updatedBy: Ipb0LILcSmxdd6uZFfy2EJLR6N2nr
10createdAt: '2026-04-20T20:09:52.987Z'
11updatedAt: '2026-04-21T14:22:44.075Z'
12schemaVersion: 1
13pages:
14 - id: lDplKJ1eUI
15 name: Page 1
16 elements:
17 - id: i0dtiRgXho
18 kind: table
19 source:
20 connectionId: d6bfeea1-5da2-458c-9bcf-ec9400d24ceb
21 kind: warehouse-table
22 path:
23 - FUN
24 - BIKES
25 - TRIP
26 columns:
27 - id: zyqQ8clBkm
28 formula: '[TRIP/Id]'
29 - id: G7oCTf1Qnf
30 formula: '[TRIP/Duration]'
31 - id: EG9toyjJAA
32 formula: '[TRIP/Start Date]'
33 - id: wKe8TVJoiX
34 formula: '[TRIP/Start Station Name]'
35 - id: aY44Cyp7ik
36 formula: '[TRIP/Start Station Id]'
37 - id: Xwz4wIxbpS
38 formula: '[TRIP/End Date]'
39 - id: DnodcqlUYM
40 formula: '[TRIP/End Station Name]'
41 - id: 6B3F2DZ17m
42 formula: '[TRIP/End Station Id]'
43 - id: WwauFzxLOO
44 formula: '[TRIP/Bike Id]'
45 - id: 't15TumHMKL'
46 formula: '[TRIP/Subscription Type]'
47 - id: cu3tAOOfgS
48 formula: '[TRIP/Zip Code]'
49 order:
50 - zyqQ8clBkm
51 - G7oCTf1Qnf
52 - EG9toyjJAA
53 - wKe8TVJoiX
54 - aY44Cyp7ik
55 - Xwz4wIxbpS
56 - DnodcqlUYM
57 - 6B3F2DZ17m
58 - WwauFzxLOO
59 - 't15TumHMKL'
60 - cu3tAOOfgS
61 - id: zGVrcoCv1U
62 kind: bar-chart
63 source:
64 elementId: i0dtiRgXho
65 kind: table
66 columns:
67 - id: yU37RVguUZ
68 formula: '[TRIP/Start Station Name]'
69 - id: BSKOqbABbO
70 formula: Count([Id])
71 - id: FpQ764jihs
72 formula: '[TRIP/Subscription Type]'
73 - id: 6PniQ7MrAk
74 formula: '[TRIP/Id]'
75 - id: LaNCIzfGhp
76 formula: '[TRIP/Duration]'
77 - id: CJrYZiHfTO
78 formula: '[TRIP/Start Date]'
79 - id: WsFCOKmH33
80 formula: '[TRIP/Start Station Id]'
81 - id: PMdL6L1gGc
82 formula: '[TRIP/End Date]'
83 - id: 5Y50JUMOjm
84 formula: '[TRIP/End Station Name]'
85 - id: vVsj7JcFKj
86 formula: '[TRIP/End Station Id]'
87 - id: d1rrsY93Fz
88 formula: '[TRIP/Bike Id]'
89 - id: FL75juTzJk
90 formula: '[TRIP/Zip Code]'
91 yAxis:
92 columnIds:
93 - BSKOqbABbO
94 xAxis:
95 columnId: yU37RVguUZ
96 sort:
97 by: BSKOqbABbO
98 direction: descending
99layout: |
100 <?xml version="1.0" encoding="utf-8"?>
101 <Page type="grid" gridTemplateColumns="repeat(24, 1fr)" gridTemplateRows="auto" id="lDplKJ1eUI">
102 <LayoutElement elementId="i0dtiRgXho" gridColumn="1 / 25" gridRow="1 / 21"/>
103 <LayoutElement elementId="zGVrcoCv1U" gridColumn="1 / 25" gridRow="21 / 41"/>
104 </Page>

Representing bar charts

1...
2id: zGVrcoCv1U
3kind: bar-chart
4source:
5 elementId: i0dtiRgXho
6 kind: table
7columns:
8- id: yU37RVguUZ
9 formula: '[TRIP/Start Station Name]'
10- id: BSKOqbABbO
11 formula: Count([Id])
12- id: FpQ764jihs
13 formula: '[TRIP/Subscription Type]'
14- id: 6PniQ7MrAk
15 formula: '[TRIP/Id]'
16- id: LaNCIzfGhp
17 formula: '[TRIP/Duration]'
18- id: CJrYZiHfTO
19 formula: '[TRIP/Start Date]'
20- id: WsFCOKmH33
21 formula: '[TRIP/Start Station Id]'
22- id: PMdL6L1gGc
23 formula: '[TRIP/End Date]'
24- id: 5Y50JUMOjm
25 formula: '[TRIP/End Station Name]'
26- id: vVsj7JcFKj
27 formula: '[TRIP/End Station Id]'
28- id: d1rrsY93Fz
29 formula: '[TRIP/Bike Id]'
30- id: FL75juTzJk
31 formula: '[TRIP/Zip Code]'
32yAxis:
33 columnIds:
34 - G0Sg2792D9
35xAxis:
36 columnId: yU37RVguUZ
37 sort:
38 by: G0Sg2792D9
39 direction: descending
40...