Example representation: Workbook with a bar 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:

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:

YAML representation
workbookId: c94757f3-3a66-428e-92da-232e2a801ec1
name: bar-chart
url: https://aws-api.sigmacomputing.com/org-name/workbook/bar-chart-gQIH7DKeAfa3JZL5JRHqnz
documentVersion: 2
latestDocumentVersion: 2
ownerId: Ipb0LILcSmxdd6uZFfy2EJLR6N2nr
folderId: 2cfd0815-2749-49b4-9a07-46684d13e7d0
createdBy: Ipb0LILcSmxdd6uZFfy2EJLR6N2nr
updatedBy: Ipb0LILcSmxdd6uZFfy2EJLR6N2nr
createdAt: '2026-04-20T20:09:52.987Z'
updatedAt: '2026-04-21T14:22:44.075Z'
schemaVersion: 1
pages:
  - id: lDplKJ1eUI
    name: Page 1
    elements:
      - id: i0dtiRgXho
        kind: table
        source:
          connectionId: d6bfeea1-5da2-458c-9bcf-ec9400d24ceb
          kind: warehouse-table
          path:
            - FUN
            - BIKES
            - TRIP
        columns:
          - id: zyqQ8clBkm
            formula: '[TRIP/Id]'
          - id: G7oCTf1Qnf
            formula: '[TRIP/Duration]'
          - id: EG9toyjJAA
            formula: '[TRIP/Start Date]'
          - id: wKe8TVJoiX
            formula: '[TRIP/Start Station Name]'
          - id: aY44Cyp7ik
            formula: '[TRIP/Start Station Id]'
          - id: Xwz4wIxbpS
            formula: '[TRIP/End Date]'
          - id: DnodcqlUYM
            formula: '[TRIP/End Station Name]'
          - id: 6B3F2DZ17m
            formula: '[TRIP/End Station Id]'
          - id: WwauFzxLOO
            formula: '[TRIP/Bike Id]'
          - id: 't15TumHMKL'
            formula: '[TRIP/Subscription Type]'
          - id: cu3tAOOfgS
            formula: '[TRIP/Zip Code]'
        order:
          - zyqQ8clBkm
          - G7oCTf1Qnf
          - EG9toyjJAA
          - wKe8TVJoiX
          - aY44Cyp7ik
          - Xwz4wIxbpS
          - DnodcqlUYM
          - 6B3F2DZ17m
          - WwauFzxLOO
          - 't15TumHMKL'
          - cu3tAOOfgS
      - id: zGVrcoCv1U
        kind: bar-chart
        source:
          elementId: i0dtiRgXho
          kind: table
        columns:
          - id: yU37RVguUZ
            formula: '[TRIP/Start Station Name]'
          - id: BSKOqbABbO
            formula: Count([Id])
          - id: FpQ764jihs
            formula: '[TRIP/Subscription Type]'
          - id: 6PniQ7MrAk
            formula: '[TRIP/Id]'
          - id: LaNCIzfGhp
            formula: '[TRIP/Duration]'
          - id: CJrYZiHfTO
            formula: '[TRIP/Start Date]'
          - id: WsFCOKmH33
            formula: '[TRIP/Start Station Id]'
          - id: PMdL6L1gGc
            formula: '[TRIP/End Date]'
          - id: 5Y50JUMOjm
            formula: '[TRIP/End Station Name]'
          - id: vVsj7JcFKj
            formula: '[TRIP/End Station Id]'
          - id: d1rrsY93Fz
            formula: '[TRIP/Bike Id]'
          - id: FL75juTzJk
            formula: '[TRIP/Zip Code]'
        yAxis:
          columnIds:
            - BSKOqbABbO
        xAxis:
          columnId: yU37RVguUZ
          sort:
            by: BSKOqbABbO
            direction: descending
layout: |
  <?xml version="1.0" encoding="utf-8"?>
  <Page type="grid" gridTemplateColumns="repeat(24, 1fr)" gridTemplateRows="auto" id="lDplKJ1eUI">
    <LayoutElement elementId="i0dtiRgXho" gridColumn="1 / 25" gridRow="1 / 21"/>
    <LayoutElement elementId="zGVrcoCv1U" gridColumn="1 / 25" gridRow="21 / 41"/>
  </Page>

Representing bar charts

Bar chart representation
...
id: zGVrcoCv1U
kind: bar-chart
source:
  elementId: i0dtiRgXho
  kind: table
columns:
- id: yU37RVguUZ
  formula: '[TRIP/Start Station Name]'
- id: BSKOqbABbO
  formula: Count([Id])
- id: FpQ764jihs
  formula: '[TRIP/Subscription Type]'
- id: 6PniQ7MrAk
  formula: '[TRIP/Id]'
- id: LaNCIzfGhp
  formula: '[TRIP/Duration]'
- id: CJrYZiHfTO
  formula: '[TRIP/Start Date]'
- id: WsFCOKmH33
  formula: '[TRIP/Start Station Id]'
- id: PMdL6L1gGc
  formula: '[TRIP/End Date]'
- id: 5Y50JUMOjm
  formula: '[TRIP/End Station Name]'
- id: vVsj7JcFKj
  formula: '[TRIP/End Station Id]'
- id: d1rrsY93Fz
  formula: '[TRIP/Bike Id]'
- id: FL75juTzJk
  formula: '[TRIP/Zip Code]'
yAxis:
  columnIds:
  - G0Sg2792D9
xAxis:
  columnId: yU37RVguUZ
  sort:
    by: G0Sg2792D9
    direction: descending
...