Ir para o conteúdo

Lição 2 · Getting Started

How Sigma Queries Your Warehouse

Understand Sigma's architecture: connections, generated queries, warehouse compute, supported data platforms, identity, and why this affects speed and cost.

A spreadsheet holds its data and does its own math. Sigma works differently. It is the layer where you describe what you want, and your data platform does the heavy work. Once you understand this flow, you can explain why a table is fast or slow, why two people may see different rows, and why a dashboard can cost money to refresh.

The flow of one request

flowchart LR
  A["You add a column or group"] --> B["Sigma builds a query"]
  B --> C["Data platform runs it"]
  C --> D["Results return"]
  D --> E["Browser shows the table"]

Your actions become queries; the platform does the computing.

You do not need to write SQL for this to happen. Conceptually, a filter becomes a condition, a grouping becomes a GROUP BY, and a joined column becomes a join. The exact SQL is generated by Sigma and depends on the platform, so treat any SQL in this lesson as an illustration of the idea, not as Sigma's real query.

Not every click needs a new trip to the platform. Sigma keeps several layers of caches and can sometimes recalculate from data already in your browser. The performance lesson covers these layers.

Connections

An administrator creates a connection from Sigma to a data platform. The connection stores how to reach the platform and which credentials to use. Sigma's documentation (as of December 2026) lists these supported platforms:

Warehouses and lakehouses Databases and others
Snowflake PostgreSQL
Google BigQuery MySQL
Databricks SQL Server 2022 and Azure SQL Managed Instance
Amazon Redshift Azure SQL Database
Starburst AlloyDB
MotherDuck (beta)
ClickHouse (beta)

Features are not identical on every platform. Before you design around a feature, such as Python or writing data back, check Sigma's compatibility information for your platform.

Who is asking?

A connection can run queries using one shared set of credentials, or, on some platforms, using each person's own sign-in through OAuth. This matters because the platform enforces its own permissions on whatever identity it sees. With a shared service account, the platform sees one identity, so access rules for individual people must be set up with care. With per-user OAuth, the platform can apply its own per-person rules. Your admin decides this. The security lesson goes further.

Compute is not free

Cloud platforms usually charge for compute or for data processed. A query that reaches the platform uses some of it. Three habits help keep costs reasonable:

  1. Filter early, so each query looks at less data.
  2. Reuse one well-designed table as the parent of several charts.
  3. Do not refresh more often than the source data changes.

The next stand-in shows what filtering early changes: how many rows are kept for the rest of the work. It is a toy count, not a measure of real warehouse billing.

Python Stand-in: filter first, then aggregate

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

In a real platform, a filter saves the most work when the engine can skip data, for example through partitions or clustering. Your data team knows how large tables are organized.

Freshness

Because Sigma reads from the platform, the numbers are only as fresh as the tables there, plus any cache or materialized copy that Sigma uses. If a pipeline loads data once a night, no refresh button will show this afternoon's sales. When people ask "why is today missing?", check three things in order:

  1. Has the source table loaded today's data?
  2. Is a cached or materialized result being shown?
  3. Does a date filter or time zone hide today?

A grouping as SQL

This stand-in shows the kind of query a grouped table needs: filter, group, aggregate and sort.

SQL Stand-in: what a filtered, grouped table asks for

Press Run (or Ctrl + Enter) to see the result here.

Try changing the filter to October. Notice that the date range uses "on or after the first day, and before the first day of the next month". This pattern stays correct when the column also contains times.

Why this design matters to teams

The same source feeds everyone, so you avoid the problem of ten versions of "sales.xlsx". It also means that an error in a shared table spreads to every workbook that uses it, so shared tables deserve tests and an owner. Tools such as data models exist to give shared definitions one home.

Common mistake: assuming that using Sigma automatically makes data safe. Access is decided by connection settings, platform permissions and Sigma permissions together. Ask your administrator which rules apply before you share anything sensitive.

Questions to ask on day one

  • Which connection should I use, and which schemas are approved for analysis?
  • Does the connection use a shared account or OAuth?
  • How often is each important table loaded?
  • Who owns the shared tables and definitions?

When you report a slow or surprising result, tell your data team which element it was, when you ran it and which filters were active. Those three details help them find the matching activity on the platform.

A quick mental model

Think of Sigma as the place where you describe a question and of the platform as the place where it gets answered. When something is wrong with the question, such as a missing filter, fix the workbook. When something is wrong with the answer's ingredients, such as stale or duplicated source rows, fix the data.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What usually happens when you group a table in Sigma and new data is needed?

    Grouping becomes a query, and the data platform computes the result.
  2. 2. Today's sales are missing. What should you check first?

    Sigma can only show what exists in the source, or in a cached or materialized copy of it.
  3. 3. Why does OAuth on a connection matter for access?

    With per-user sign-in, platform-level permissions can apply to each person.
  4. 4. Which habit helps control compute use?

    Less data and fewer duplicate queries usually mean less compute.

Summary

  • Sigma turns your actions into queries that the data platform runs.
  • A connection defines how Sigma reaches a platform and which identity it uses.
  • Feature support differs between platforms, so check compatibility.
  • Queries use compute; filter early, reuse parents and refresh sensibly.
  • Freshness depends on source loads, caches and materialized data.

Next: Workbooks, Pages, Elements and Modes

Seu progresso fica salvo neste navegador. Não precisa de conta.