Data Analyst Associate · Domain 6: Working with Dashboards and Visualizations in Databricks · 16% of the exam
Task 6.2: Work with parameters in SQL queries and dashboards, including defining, configuring, and testing parameters; Configure permissions through the UI to share dashboards with workspace users/groups, external users through shareable links, and embed dashboards in external apps
Named parameter markers and dashboard parameters and filters, publishing with shared or individual data permissions, dashboard permissions, and basic and external embedding.
Study it
Parameters, publishing, permissions and embedding
Lesson coming
Sample questions
Try each one before opening the answer. Every option is explained, with the Databricks documentation page that proves it.
Question 1 · choose 1
A sales dashboard reads main.sales.orders, which has a row filter that shows each regional manager only that manager's region. The author published it with the default data permission, and now every manager sees all regions. The managers have only the consumer access entitlement. How should the author share it so each manager sees only that manager's region?
AKeep the current publish settings; the row filter applies to each viewer at query time
BShare the draft dashboard with the managers instead of the published one
CGrant the managers CAN EDIT on the dashboard so that queries run as them
DRepublish it with individual data permissions, so viewers use their own credentials
Show the answer and why
AKeep the current publish settings; the row filter applies to each viewer at query time
Incorrect
With Share data permission (the default), viewers' queries run with the publisher's data permissions, so the filter evaluates the publisher.
BShare the draft dashboard with the managers instead of the published one
Incorrect
Draft access is for users with the Databricks SQL entitlement; consumer access users are limited to running and viewing.
CGrant the managers CAN EDIT on the dashboard so that queries run as them
Incorrect
Consumer access users cannot edit dashboards, and the publish setting, not a dashboard permission, decides whose data permissions apply.
DRepublish it with individual data permissions, so viewers use their own credentials
Correct
With individual data permission, viewers run queries with their own credentials, so the row filter applies to each manager.
When publishing, Share data permission (default) runs viewers' queries with the publisher's data permissions, which can expose data viewers could not otherwise see; Individual data permission makes viewers use their own credentials, so their own access, including row filters, decides what they see. Compute access always uses the publisher's credentials.
An analyst moves a saved query from the legacy syntax WHERE region = '{{ region }}' to named parameter markers by writing WHERE region = ':region'. No parameter widget appears, and the query returns no rows. What should the WHERE clause be?
AWHERE region = :region, with the parameter type set to String
BWHERE region = '{{ region }}', since named markers do not support text values
CWHERE region = "region", with the parameter type set to String
DWHERE region = ${region}, with the parameter type set to Text
Show the answer and why
AWHERE region = :region, with the parameter type set to String
Correct
A named parameter marker is a colon followed by the name; for String values Databricks adds the quotation marks itself.
BWHERE region = '{{ region }}', since named markers do not support text values
Incorrect
Named parameter markers support a String type; the legacy syntax is what must be rewritten.
CWHERE region = "region", with the parameter type set to String
Incorrect
This is a quoted string with no marker; a named marker starts with a colon.
DWHERE region = ${region}, with the parameter type set to Text
Incorrect
Named parameter markers use a colon before the name, not a dollar sign and braces.
Named parameter markers are written as a colon followed by a name, such as :region, and a widget appears for the value and type. With the String type, backslashes and quotation marks are escaped and Databricks adds quotation marks around the value, so the marker must not be put inside quotes: ':region' is just a literal string.
An analyst with CAN VIEW on a draft AI/BI dashboard wants to add a parameter to one of its datasets. Which permission does she need at least?
ACAN RUN on the draft dashboard
BCAN USE on the SQL warehouse only
CCAN EDIT on the draft dashboard
DWorkspace admin rights
Show the answer and why
ACAN RUN on the draft dashboard
Incorrect
Adding parameters changes datasets, which needs at least CAN EDIT.
BCAN USE on the SQL warehouse only
Incorrect
Warehouse access does not let her edit the dashboard.
CCAN EDIT on the draft dashboard
Correct
You must have at least CAN EDIT permissions on the draft dashboard to add a parameter to a dataset.
DWorkspace admin rights
Incorrect
CAN EDIT on the dashboard is enough.
To add a parameter to a dashboard dataset, you need at least CAN EDIT on the draft dashboard; parameters are added in the dataset queries on the Data tab.
An analyst copies the embed code of a published dashboard for the company intranet, but the intranet's domain is missing from the allowed domains in the Copy embed code dialog. What should happen?
AShe republishes the dashboard with individual data permissions set
BShe switches to embedding for external users
CShe removes the domain from the iframe code
DA workspace admin adds the intranet's domain to the allowed list
Show the answer and why
AShe republishes the dashboard with individual data permissions set
Incorrect
Publish settings do not change the allowed embedding domains.
BShe switches to embedding for external users
Incorrect
That option is for users outside the organization; the domain list is the issue here.
CShe removes the domain from the iframe code
Incorrect
The allowed domains are a workspace setting, not part of the code she edits.
DA workspace admin adds the intranet's domain to the allowed list
Correct
If the target domain is not in the list of allowed domains, a workspace admin can add it.
Basic embedding places a published dashboard in an iframe, and viewers use their Databricks credentials. When the Copy embed code dialog lists allowed domains that do not include the target, a workspace admin adds the domain in the embedding settings.
A company embeds a dashboard in its customer portal for users who have no Databricks accounts. How are those users authenticated to the embedded dashboard?
AEach customer signs in with a Databricks account created for them
BIts server uses a service principal to issue user-scoped tokens
CThe dashboard is made public with a link that needs no token
DCustomers use the publisher's personal access token
Show the answer and why
AEach customer signs in with a Databricks account created for them
Incorrect
Embedding for external users does not give each viewer a Databricks account.
BIts server uses a service principal to issue user-scoped tokens
Correct
Embedding for external users uses a service principal and scoped access tokens to authorize access.
CThe dashboard is made public with a link that needs no token
Incorrect
Access is authorized with tokens that encode the user's information.
DCustomers use the publisher's personal access token
Incorrect
The server requests tokens for a service principal, not a person's token.
Embedding for external users uses a service principal: the server obtains an OAuth token for it and then generates a tightly scoped token that encodes the user's information, which the embedded dashboard uses to render with that user's context.