CertSafari
    Snowflake SnowPro Advanced: Data Analyst (DAA-C01)· Lessons

    Domain 4 · Lesson 17/19

    Snowflake Dashboard Data: Context, Queries, Governance and BI Connections

    Given a use case, create reports and dashboards to meet business requirements.

    9 min read
    9.33% of exam
    9 sources
    Published 5 Oct 2026
    Docs as of 4 Oct 2026

    What you will be able to do

    • Set the role, warehouse, database and schema that dashboard queries run under
    • Write tile queries with predictable column names, sorting and filtering
    • Predict how row access policies and Dynamic Data Masking change what each dashboard viewer sees
    • List what a BI tool needs to connect to Snowflake

    Key concept

    Dashboard session context — Every Snowsight dashboard query runs in its own session with an assigned role and warehouse. The role decides which objects the query can reach, which rows the policies return and which values are masked. The warehouse supplies the compute and gets the bill.

    1.Setting the context before you query

    Before a dashboard shows anything useful, you have to decide where its queries run and as whom. In Snowsight, each dashboard has a context selector. You use it to choose the role and the warehouse for every query behind the tiles. The role is the security identity: it decides which databases, schemas and tables the queries can read. The warehouse is the compute that runs them. Running a query in a worksheet records both: its Query Details show the role used and the warehouse used to execute it.

    The database and schema are the other half of the context. Once a worksheet's context is set to a database (and optionally a schema), you can refer to tables by their short names. Without that context, you have to fully qualify every object as DATABASE.SCHEMA.OBJECT. The Snowflake sample query used later in this lesson does this: it names SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.ORDERS in full, so it runs no matter which database is currently selected.

    This matters when you pick the data source. If a table is visible only through a secondary role, a dashboard won't see it. The dashboard's primary role needs the privileges itself. The role also affects who can use the dashboard later: to view a shared dashboard, a user must use the same role as the session context of its queries. So pick a role your audience actually has, not your most privileged personal role.

    Checkpoint 1 of 5· Check yourself

    In Snowsight, where do you set the role and warehouse that a dashboard's tile queries run with?

    Sources12

    2.Writing tile queries: naming, sorting and filtering

    Each tile is a worksheet query. You write it like any other worksheet SQL. To run one statement, put the cursor in it and select Run. To run everything, use Run All. End each statement with a single semicolon, because Snowsight doesn't support multiple statements in a single API call.

    Naming columns. Charts are bound to column names. If an alias changes, the chart can no longer find the column, and you have to point the chart at the new name. Column aliases are identifiers, so the identifier rules apply. A double-quoted alias such as "Net Revenue (USD)" is a delimited identifier: it's case-sensitive and can contain spaces and special characters. Any later reference must spell it exactly as created, including the double quotes. A CTE that refers to net_revenue_usd won't match it. A consistent convention that avoids quoted aliases with spaces or mixed case (for example net_revenue_usd) keeps names stable across tiles and wrapper queries.

    Sorting and filtering. Put the sort order in the query with ORDER BY, and the row selection in a WHERE clause. You can also sort a result column through the column options in the results grid. That sort applies to the whole result, not just the first 10,000 rows, so it's a transformation that costs compute on the same warehouse that ran the query. Display-only formatting doesn't cost anything: thousands separators, percentages, decimal precision and date formatting. Filters such as :daterange are covered in the companion lesson on charts and filters.

    Checkpoint 2 of 5· Exam question

    A new Snowsight dashboard for the finance team will run twelve tiles against the FINANCE_MART database. The owner wants it to run reliably for viewers. Select TWO items that must be in place for the tile queries to execute.(Select 2)

    Checkpoint 3 of 5· Check yourself

    A tile query aliases a column as "Net Revenue (USD)". A wrapper query refers to it as net_revenue_usd and fails. Why?

    Sources234

    3.How row access policies and masking change what viewers see

    Because the session role is part of every tile query, governance policies can make two people looking at the same tile see different results. Snowflake has two kinds of policy that act at query time:

    Row access policies compared with Dynamic Data Masking
    AspectRow access policyDynamic Data Masking
    What it controlsWhich rows are returnedWhether a column value appears in plain text
    Effect on a tileRows (and so totals) disappear for some rolesValues show as plain text, partly masked or fully masked
    Object typeSchema-level objectSchema-level masking policy
    Applies toTables and viewsTable and view columns

    A row access policy is a Boolean expression bound to columns. At runtime, Snowflake builds a secure inline view and returns only the rows for which the policy returns TRUE. The simplest policy checks the current role:

    A row access policy that returns rows only to the it_admin rolesql
    CREATE OR REPLACE ROW ACCESS POLICY rap_it
    AS (empl_id varchar) RETURNS BOOLEAN ->
      'it_admin' = current_role()
    ;

    If a dashboard on such a table runs as any role other than it_admin, it gets no rows. That isn't a broken dashboard; the policy is working. Policies can also use a mapping table, for example sales managers matched to regions, so each manager sees only their region's revenue. The policy expression is evaluated with the policy owner's role, so the viewer doesn't need access to the mapping table. Owning the table doesn't get you around the policy either: the object owner is also subject to it.

    Dynamic Data Masking works on columns instead. A masking policy is applied wherever the column appears in a query. Depending on the policy conditions and the role, the viewer sees the plain-text value, a partially masked value or a fully masked value. Masking can even stop ACCOUNTADMIN or SECURITYADMIN from seeing data they have no need to see. For a dashboard, this means a tile's row count can stay the same while its values look different from one role to the next.

    Checkpoint 4 of 5· Match them up

    Match each observation on a dashboard tile to its most likely cause

    Tap a term, then the definition that fits it.

    Sources56

    4.Connecting external BI tools

    Snowsight isn't the only place to build reports. External BI tools connect through Snowflake's drivers, for example the JDBC driver for tools that support JDBC and the ODBC driver for ODBC-based applications. Whatever the tool, it needs the same context you set in Snowsight. The one required setting is your Snowflake account identifier. You may also need to specify the warehouse, database, schema and role. Snowsight collects these for you: open the user menu and select Connect a tool to Snowflake to see the Account Details dialog.

    Power BI is a useful example. With single sign-on, the Power BI service uses an embedded Snowflake driver and opens the session with the user's default role. So the default role decides what the report can read and which policies apply. By default, ACCOUNTADMIN, ORGADMIN, GLOBALORGADMIN and SECURITYADMIN are blocked from opening a Snowflake session through Power BI.

    Checkpoint 5 of 5· Check yourself

    Which setting must always be supplied when configuring a third-party BI tool to connect to Snowflake?

    Sources789

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.A dashboard can use privileges from my secondary roles, as a worksheet session can.Why is that wrong?

      Dashboards run only with the primary role. DEFAULT_SECONDARY_ROLES is ignored.

      Covered in Setting the context before you query

    2. 2.A viewer whose role can't read a row access policy's mapping table will get an error on the dashboard.Why is that wrong?

      The policy is evaluated with the policy owner's role, so the viewer only sees the rows the policy allows and needs no access to the mapping table.

      Covered in How row access policies and masking change what viewers see

    3. 3.Power BI SSO sessions use whatever role the report author chose in Snowsight.Why is that wrong?

      Snowflake creates the Power BI session with the user's default role.

      Covered in Connecting external BI tools

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “To view shared dashboards, the Snowflake user must use the same role as the session context for the queries that drive the dashboard.”
      ↩︎ Setting the context before you query
      “The queries that drive dashboards in Snowsight use unique sessions with assigned roles and warehouses.”
      ↩︎ Key concept
      “Dashboards run exclusively with the user’s primary role, regardless of the value set for DEFAULT_SECONDARY_ROLES.”
      ↩︎ Exam trap 1
      “Dashboards run exclusively with the user’s primary role, regardless of the value set for DEFAULT_SECONDARY_ROLES.”
      ↩︎ Prediction
      “Use the context selector to specify the role and warehouse to use for running the queries in the dashboard.”
      ↩︎ Checkpoint
    2. 2.
      “you can reference objects in the schema without fully qualifying the object names in your query”
      ↩︎ Setting the context before you query
      “For example, when you sort a column by ascending or descending order using the column options, the changes affect all of your results”
      ↩︎ Writing tile queries: naming, sorting and filtering
    3. 3.
      “If a column name changes, you must update the chart to use the new column name.”
      ↩︎ Writing tile queries: naming, sorting and filtering
    4. 4.
      “the identifier must be specified exactly as created, including the double quotes”
      ↩︎ Writing tile queries: naming, sorting and filtering
      “Delimited identifiers (i.e. identifiers enclosed in double quotes) are case-sensitive”
      ↩︎ Checkpoint
    5. 5.
      “Snowflake generates the query output for the user, and the query output only contains rows based on the policy definition evaluating to TRUE.”
      ↩︎ How row access policies and masking change what viewers see
      “This approach also includes the object owner”
      ↩︎ How row access policies and masking change what viewers see
      “Snowflake evaluates the policy expression by using the role of the policy owner, not the role of the operator who executed the query.”
      ↩︎ Exam trap 2
    6. 6.
      “uses masking policies to selectively mask plain-text data in table and view columns at query time”
      ↩︎ How row access policies and masking change what viewers see
      “Snowflake query operators may see the plain-text value, a partially masked value, or a fully masked value.”
      ↩︎ Checkpoint
    7. 7.
      “In addition, you might need to specify the warehouse, database, schema, and role that should be used.”
      ↩︎ Connecting external BI tools
      “To configure a client, driver, library, or third-party application to connect to Snowflake, you must specify your Snowflake account identifier.”
      ↩︎ Checkpoint
    8. 8.
      “Connect to Snowflake from most client tools/applications that support JDBC.”
      ↩︎ Connecting external BI tools
    9. 9.
      “By default, the ACCOUNTADMIN, ORGADMIN, GLOBALORGADMIN, and SECURITYADMIN system roles are blocked from using Microsoft Power BI to instantiate a Snowflake session.”
      ↩︎ Connecting external BI tools
      “creates a Snowflake session for the Power BI service using the user’s default role.”
      ↩︎ Exam trap 3

    Continue to page 2 of 2

    Snowsight Charts, Dashboard Tiles and Custom Filters

    Spotted a mistake, or was something unclear? Tell us.