Databricks PT 5
The company wants to send a customized message with the company logo and text.
The project manager asked Data Analyst to find out if they can send customized emails
from Databricks when any alerts are triggered. Is it possible? – answer Databricks
support custom template, which can be created using HTML to format the message
before sending
Within a Databricks environment, you're enhancing the efficiency of a data processing
task that encompasses intricate operations on arrays within a Spark SQL dataset.
Among the provided options, which higher-order function in Spark SQL would be the
most appropriate choice for effectively transforming elements within an array column
named "scores"? - answer SELECT TRANSFORM(scores, score -> score * 2) FROM
dataset;
How does the SQL LATERAL join behave in comparison to a regular join? -
answerLATERAL join allows referencing columns from preceding tables in the join,
whereas regular join does not
You are analyzing a dataset OrderDetails in a Databricks SQL environment, which
includes OrderID, ProductID, Quantity, and UnitPrice.
Your objective is to find the total revenue generated by each product. - answerSELECT
ProductID, SUM(UnitPrice * Quantity) AS TotalRevenue FROM OrderDetails GROUP
BY ProductID;
Your customer does not have access to the Databricks Infrastructure, however, your
project management team wants to send some visualizations you have created, without
providing the customer access to Databricks. Which of the following options will you
choose? - answerAdd a refresh schedule to the dashboard and add the customer email
as a subscriber
A company wants to implement Databricks SQL for their analytics needs and is
considering different endpoint options. Which option provides a quick-starting,
serverless option for running SQL queries in Databricks SQL without managing
clusters? - answerServerless Databricks SQL endpoint
Which of the following is the correct syntax for writing unmanaged tables? -
answerCREATE TABLE table_name
USING DELTA
LOCATION '/path/to/existing/data'
While working on a Databricks dashboard comprising numerous visualizations, a data
analyst aims to maintain a consistent color scheme across all visuals to enhance
, aesthetic coherence and readability. What strategy should the analyst employ to modify
the colors of all visuals within the dashboard uniformly? - answerUse a dashboard-wide
setting that allows the analyst to apply a uniform color scheme to all visualizations
simultaneously.
You're employing Databricks to transfer data from a CSV file situated in DBFS
(dbfs:/data/sales.csv) into a Delta table called SalesData. The CSV file consists of a
header row and fields delimited by commas. Which Databricks SQL COPY INTO
command accurately accomplishes this data import? and fields separated by commas.
Which Databricks SQL COPY INTO command correctly imports this data? -
answerCOPY INTO SalesData FROM 'dbfs:/data/sales.csv' FORMAT = CSV
FORMAT_OPTIONS ('header' = 'true');
How can a data analyst change the colors of all visualizations in a dashboard to match
the company's branding in Databricks SQL? - answerThe dashboard theme can be
customized to set universal colors for all visualizations, ensuring consistent branding.
The Data Engineering Team has set up a dashboard to monitor the data quality of the
data setup in the medallion architecture. They want to label the reports by table type i.e.
Bronze, Silver, and Gold.
How will they achieve that? - answerUse Add option. Click on "Text" and add the text.
What is the role of Role-based Access Control in Databricks SQL? - answerManages
database schema
--Restricts user access based on roles
Optimizes SQL queries
Defines table relationships
What does the Lakehouse allow in terms of batch and streaming workloads? -
answerMixing of batch and streaming workloads
Which statement correctly differentiates discrete and continuous statistics within the
context of data analysis? - answerDiscrete data can only take on a finite number of
values, while continuous data can take on any value within a given range.
Select the statement which is TRUE. - answerIn a table, there could be any number of
rows and a specified number of columns.
In Azure Databricks, when using a table visualization type for SQL queries, which of the
following statements accurately reflects its capabilities and limitations? - answerThey
allow for manual reordering, hiding, and formatting of data columns, but do not perform
data aggregations within the result set.
How does the SQL UNION ALL operator differ from the UNION operator? -
answerUNION ALL retains duplicates, whereas UNION removes duplicates
The company wants to send a customized message with the company logo and text.
The project manager asked Data Analyst to find out if they can send customized emails
from Databricks when any alerts are triggered. Is it possible? – answer Databricks
support custom template, which can be created using HTML to format the message
before sending
Within a Databricks environment, you're enhancing the efficiency of a data processing
task that encompasses intricate operations on arrays within a Spark SQL dataset.
Among the provided options, which higher-order function in Spark SQL would be the
most appropriate choice for effectively transforming elements within an array column
named "scores"? - answer SELECT TRANSFORM(scores, score -> score * 2) FROM
dataset;
How does the SQL LATERAL join behave in comparison to a regular join? -
answerLATERAL join allows referencing columns from preceding tables in the join,
whereas regular join does not
You are analyzing a dataset OrderDetails in a Databricks SQL environment, which
includes OrderID, ProductID, Quantity, and UnitPrice.
Your objective is to find the total revenue generated by each product. - answerSELECT
ProductID, SUM(UnitPrice * Quantity) AS TotalRevenue FROM OrderDetails GROUP
BY ProductID;
Your customer does not have access to the Databricks Infrastructure, however, your
project management team wants to send some visualizations you have created, without
providing the customer access to Databricks. Which of the following options will you
choose? - answerAdd a refresh schedule to the dashboard and add the customer email
as a subscriber
A company wants to implement Databricks SQL for their analytics needs and is
considering different endpoint options. Which option provides a quick-starting,
serverless option for running SQL queries in Databricks SQL without managing
clusters? - answerServerless Databricks SQL endpoint
Which of the following is the correct syntax for writing unmanaged tables? -
answerCREATE TABLE table_name
USING DELTA
LOCATION '/path/to/existing/data'
While working on a Databricks dashboard comprising numerous visualizations, a data
analyst aims to maintain a consistent color scheme across all visuals to enhance
, aesthetic coherence and readability. What strategy should the analyst employ to modify
the colors of all visuals within the dashboard uniformly? - answerUse a dashboard-wide
setting that allows the analyst to apply a uniform color scheme to all visualizations
simultaneously.
You're employing Databricks to transfer data from a CSV file situated in DBFS
(dbfs:/data/sales.csv) into a Delta table called SalesData. The CSV file consists of a
header row and fields delimited by commas. Which Databricks SQL COPY INTO
command accurately accomplishes this data import? and fields separated by commas.
Which Databricks SQL COPY INTO command correctly imports this data? -
answerCOPY INTO SalesData FROM 'dbfs:/data/sales.csv' FORMAT = CSV
FORMAT_OPTIONS ('header' = 'true');
How can a data analyst change the colors of all visualizations in a dashboard to match
the company's branding in Databricks SQL? - answerThe dashboard theme can be
customized to set universal colors for all visualizations, ensuring consistent branding.
The Data Engineering Team has set up a dashboard to monitor the data quality of the
data setup in the medallion architecture. They want to label the reports by table type i.e.
Bronze, Silver, and Gold.
How will they achieve that? - answerUse Add option. Click on "Text" and add the text.
What is the role of Role-based Access Control in Databricks SQL? - answerManages
database schema
--Restricts user access based on roles
Optimizes SQL queries
Defines table relationships
What does the Lakehouse allow in terms of batch and streaming workloads? -
answerMixing of batch and streaming workloads
Which statement correctly differentiates discrete and continuous statistics within the
context of data analysis? - answerDiscrete data can only take on a finite number of
values, while continuous data can take on any value within a given range.
Select the statement which is TRUE. - answerIn a table, there could be any number of
rows and a specified number of columns.
In Azure Databricks, when using a table visualization type for SQL queries, which of the
following statements accurately reflects its capabilities and limitations? - answerThey
allow for manual reordering, hiding, and formatting of data columns, but do not perform
data aggregations within the result set.
How does the SQL UNION ALL operator differ from the UNION operator? -
answerUNION ALL retains duplicates, whereas UNION removes duplicates