Model data from database tables

System and user requirements

The ability to model data from database tables requires the following:

Annotate Tables

Find Relevant Tables

  1. Locate the Data Catalog in Sigma's left hand navigation panel. Under Connections, click to select which data connection you would like to explore.

    01-left-hand-nav-connection.png

  2. From the data catalog, click on the table you would like to annotate.

    02-connection-browser.png

Add a Description

  1. Open the Table.

  2. Click the Edit button in the Table header.

  3. Click the information icon (information icon) in the Table header.

  4. Enter a description in the Description field of the Table details popup.

    03-table-info-popup.png

Format Columns

  1. Open the Table.

  2. Click the Edit button in the Table header.

  3. Find the column that you would like to format, and click the arrow next to the column name to open the column menu.

  4. Under Format, choose the formatting option that you would like to apply.

    04-table-format-menu.png

  5. Click Publish to save your changes.

Add Column Descriptions

  1. Open the Table.

  2. Click the Edit button in the Table header.

  3. Click to open the Column tab.

  4. Enter a new description in the column's description input field.

    05-table-column-tab.png

  5. Click Publish to save the changes

Create Datasets

Create Datasets From Tables

Table based datasets allow you to bundle formulas, data transformations, filters, groupings and parameters into a rich data source that others can build on. Datasets can also be materialized back to your database, helping speed up analysis.

Locate Data

  1. Locate the left-hand navigation panel.

  2. Click on Connections.

  3. Find the warehouse table you would like to use as a data source.

  4. Click the down arrow button to the right of the Explore button, in the page header.

    06-table-create-dataset-menu.png

  5. Give the dataset a name and select the location to save it in.

Add a Description

  1. Open the dataset.

  2. Click the information icon (information icon) in the page header. This will open the page's info popup.

  3. Enter a description in the Description field of the dataset details popup.

    07-dataset-info-popup.png

Add or Update a Badge

  1. Open the dataset.

  2. Click the information icon (information icon) in the page header. This will open the page's info popup.

  3. Select a badge type from the Badge dropdown list.

    08-dataset-badge.png

  4. [optional] Add a note to provide context for later reference or other teammates.

    09-dataset-badge-description.png

Create Datasets from SQL

SQL based datasets take SQL queries and turn them into reusable data sources that people can use as the basis for additional analysis. Datasets can also be materialized to your database, helping speed up queries. Any changes made to a dataset will be propagated forward to any downstream documents.

  1. Click the Create New button in the left navigation panel.

  2. Select Dataset. This will take you to the Select a Data Source page.

  3. Under SQL, click Select.

  4. Select your desired warehouse connection from the dropdown list.

12-sql-runner-pick-connection.png

  1. The database object panel on the left side of the page will allow you to explore your connection.
  2. [optional] Click on any table to preview its data.

13-sql-runner-preview-table.png

  1. To write SQL, begin typing keywords into the text box in the top half of the screen. Sigma will automatically provide a list of autocomplete options to guide you.

14-sql-runner-query-typeahead.png

  1. To run your SQL query, click the Run button in the center-right portion of the page.
    Keyboard shortcuts: CTRL-Enter on a PC or CMD-Enter on a Mac.

15-sql-runner-query-LG.png

  1. Click the caret (caret icon) next to the Explore button in the dataset header.
  2. Select Create Dataset.

16-sql-runner-create-dataset.png

Delete a dataset

To delete a dataset you must be the owner of the dataset, have Can edit access to it, or have the Admin account type.

  1. Click the caret () next to the dataset name, then click Delete....
  2. On the Confirm Deletion modal, click Delete.

Recover a deleted dataset

To recover a dataset that has been deleted, you must be the owner of the dataset or have the Admin account type.

  1. Go to your Home page.
  2. In the navigation menu, select Trash.
  3. In the Trash page, search the list of deleted documents and click the one you want to recover. You can sort the Name, Deleted on, or Deleted by columns to help identify the applicable document.
  4. In the Document has been deleted modal, click Recover. Sigma immediately opens the recovered document.

Related resources