What you will be able to do
- Explain how a dashboard's session context (role and warehouse) determines who can view it
- Manage dashboard tiles without losing the queries behind them
- Choose the right sharing setting for collaborators and link recipients
- Describe how dashboard data and custom filter values are refreshed, and why a refresh can fail
Key concept
Dashboard session context — Each dashboard runs its queries in its own session, with a role and a warehouse assigned to it. Anyone viewing the dashboard has to use that same role. This one rule explains most sharing problems and most role surprises.
1.Dashboards, tiles and the context they run in
A Snowsight dashboard is a collection of tiles. Each tile is a chart or table built from a query's results. You can start with an empty dashboard (Projects » Dashboards » + Dashboard) or turn an existing worksheet into one. A worksheet you move into a dashboard stops being a separate worksheet. The query is now stored inside the dashboard, and that is the only place you can edit it.
This matters when other people already use the worksheet. If it was shared, those users lose access as soon as you move it into a dashboard. Their permissions are revoked and any links they saved stop working. To keep them involved, share the dashboard instead.
While you view a dashboard, a context selector sets which role and warehouse run its queries. The Run button runs every tile's query at once. The role and warehouse you pick here are the session context that viewers will depend on later.
Checkpoint 1 of 5· Check yourself
An analyst moves a worksheet that is shared with three colleagues into a new dashboard. What happens to those colleagues?
Moving a worksheet into a dashboard removes it from the worksheet list. Permissions on the worksheet are revoked, so to bring the colleagues back you have to share the dashboard with them.
“Permissions on the worksheet are revoked and links to the worksheet no longer function.”Source: docs.snowflake.com
Sources1
2.Maintaining tiles without losing queries
Keeping a report up to date usually means editing tiles. From a tile's menu, View Chart opens the chart in a worksheet and Edit query opens the SQL. Return to <dashboard name> saves your change. Duplicate Tile adds a copy at the bottom of the dashboard. You can drag tiles to rearrange them.
Removing a tile is where people get caught. There are two options that look alike, and only one of them keeps your work.
| Action | What happens to the tile | What happens to the query |
|---|---|---|
| Unplace Tile | Removed from the dashboard layout | Kept, and the tile can be added back from the Add tile menu |
| Delete | Removed permanently, and this cannot be undone | Deleted too. Any other tile that uses the same query (for example a table and a chart of the same results) is deleted as well |
A tile shows a chart by default. To switch it to a table, remove the chart tile and add the table version of the query. If a tile shows a table and you also want a chart, open Edit Query, select Chart, and return. A second tile is added that uses the same query. Because the two tiles now share one query, deleting either of them removes both.
Checkpoint 2 of 5· Check yourself
A dashboard has a table tile and a chart tile built from the same query. The owner wants the chart off the dashboard for now but may want it back next quarter. What should they do?
Unplace takes the tile off the dashboard but keeps the query. Delete removes the query, and because both tiles use that query, it would remove the table tile too.
“such as a table and chart view of the same query results, both tiles are deleted.”Source: docs.snowflake.com
Sources1
3.Sharing dashboards: roles and link permissions
Editors and owners can share a dashboard in two ways: invite named users, or turn on link sharing. Only users who have signed in to Snowsight before appear in the invite list. To reach someone who has never signed in, send a link.
Sharing gives someone access to the dashboard, not to the data. Each dashboard's queries run in their own session, with an assigned role and warehouse. To see the results, a viewer must use the same role as that session context. If the dashboard was built with one role and a manager signs in with another, the manager sees errors instead of data.
Snowflake also turns off secondary roles in dashboards for governance reasons. A tile that depends on a privilege the user only has through a secondary role will fail, even though the same SQL works in a worksheet.
Link sharing is closed by default: people with the link cannot view the dashboard until you change the setting. You choose what link recipients can do. For example, you can let them view the results already on the dashboard without letting them run the underlying queries. That suits audiences such as auditors, who need to read results but should not use warehouse compute. Dashboards cannot be organized into folders.
Checkpoint 3 of 5· Exam question
A retail analyst must refresh the `DAILY_SALES_SUMMARY` table every day at 06:00 Amsterdam time, regardless of daylight saving changes, using a task on an existing warehouse. Select TWO settings that meet this requirement.(Select 2)
Correct answers: B, D — Define the task with `SCHEDULE = 'USING CRON 0 6 * * * Europe/Amsterdam'` so runs follow local time.; Name the existing warehouse in the `WAREHOUSE` parameter so the task runs its SQL on user-managed compute.
- A. That privilege applies only to serverless tasks; a warehouse-based task needs `EXECUTE TASK` and warehouse usage instead.
- B. A CRON expression with an IANA time zone fires at 06:00 local time and adjusts automatically when daylight saving changes.
- C. A stream condition fires whenever new rows arrive, not at a fixed clock time, so it cannot guarantee a 06:00 run.
- D. A user-managed task needs a warehouse specified; the existing warehouse supplies compute for the refresh statement.
- E. An interval schedule counts from when the task is resumed, not from a wall-clock time, and it ignores daylight saving shifts.
Checkpoint 4 of 5· Check yourself
You enable link sharing on a dashboard and send the link to auditors, but you leave the link setting at its default. What can the auditors do?
Link access starts with no viewing rights. To let auditors read results without running queries, you have to choose that setting explicitly.
“By default, people with the link cannot view the dashboard.”Source: docs.snowflake.com
Sources1
4.Keeping dashboard data and filters current
The dashboard's Run button runs every tile's query using the role and warehouse you set in the context selector. The values inside a custom filter's drop-down update separately. If a custom filter gets its options from a SQL query, that filter has its own refresh frequency: hourly, daily, or never.
The schedule depends on when the filter was saved and how long each refresh took. The next refresh is timed from when the previous one completed, not from a fixed clock time. Refreshes run as the user who created or last modified the filter, and they appear in Query History. They use the filter's warehouse even if nobody has the filter open, so a frequent refresh costs credits.
A filter refresh can fail without any obvious sign. It fails if the user who created or last modified the filter has been dropped or disabled. It also fails if that user is inactive because they have not signed in for 3 months. Snowsight does not show who last modified a filter. One clue is login history: failed authentication attempts at the same time every hour or every day, matching the filter's refresh frequency.
Checkpoint 5 of 5· Check yourself
A custom filter with an hourly refresh is saved at 10:07 AM. Its 11:07 AM refresh takes 20 minutes. When does the next refresh run?
Each refresh is scheduled from when the previous one completed. The 11:07 run finished at 11:27, so the next run is at or after 12:27.
“if the query refresh at 11:07 AM takes 20 minutes to complete, the next refresh query would run at or after 12:27 PM.”Source: docs.snowflake.com
Sources2
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.If a query works in my worksheet through a secondary role, it will work the same way in a dashboard tile.Why is that wrong?
Dashboards use only the primary role and turn off secondary roles, whatever DEFAULT_SECONDARY_ROLES is set to.
2.Deleting a tile only removes it from view, and the query can be recovered later.Why is that wrong?
Delete removes the underlying query permanently. Unplace Tile is the option that keeps it.
Covered in Maintaining tiles without losing queries
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“the worksheet is removed from the list of worksheets and can only be accessed from the dashboard.”
↩︎ Dashboards, tiles and the context they run in“Use the context selector to specify the role and warehouse to use for running the queries in the dashboard.”
↩︎ Dashboards, tiles and the context they run in“The tile is removed from the dashboard, but remains available to add to the dashboard from the Add tile menu.”
↩︎ Maintaining tiles without losing queries“Editors and owners can share a dashboard with individual collaborators or by enabling and using link sharing.”
↩︎ Sharing dashboards: roles and link permissions“you can choose to allow people to view the results on the dashboard, but not run the underlying queries.”
↩︎ Sharing dashboards: roles and link permissions“To view shared dashboards, the Snowflake user must use the same role as the session context for the queries that drive the dashboard.”
↩︎ Key concept“Dashboards run exclusively with the user’s primary role, regardless of the value set for DEFAULT_SECONDARY_ROLES.”
↩︎ Exam trap 1“Deleting a tile from a dashboard also deletes the underlying queries.”
↩︎ Exam trap 2“Permissions on the worksheet are revoked and links to the worksheet no longer function.”
↩︎ Checkpoint“such as a table and chart view of the same query results, both tiles are deleted.”
↩︎ Checkpoint“Dashboards run exclusively with the user’s primary role, regardless of the value set for DEFAULT_SECONDARY_ROLES.”
↩︎ Prediction“By default, people with the link cannot view the dashboard.”
↩︎ Checkpoint - 2.
“The refresh frequency can be hourly, daily, or never.”
↩︎ Keeping dashboard data and filters current“even if no user has the filter open in their web browser.”
↩︎ Keeping dashboard data and filters current“The user is inactive because they have not signed in for 3 months.”
↩︎ Keeping dashboard data and filters current“if the query refresh at 11:07 AM takes 20 minutes to complete, the next refresh query would run at or after 12:27 PM.”
↩︎ Checkpoint