ExamTopics Flashcards
1) A data organization leader is upset about the data analysis team’s reports being different from the data engineering team’s reports. The leader believes the siloed nature of their organization’s data engineering and data analysis architectures is to blame. Which of the following describes how a data lakehouse could alleviate this issue?
- Both teams would autoscale their work as data size evolves
- Both teams would use the same source of truth for their work
- Both teams would reoganize to report to the same department
- Both teams would be able to collaborate on projects in real-time
- Both teams would repond more quickly to ad-hoc requests
Both teams would use the same source of truth for their work
2) Which of the following describes a scenario in which a data team will want to utilize cluster pools?
- An automated report needs to be refreshed as quickly as possible
- An automated report needs to be made reproducible
- An automated report needs to be tested to identify errors
- An automated report needs to be version-controlled across multiple collaborators
- An automated report needs to be runnable by all stakeholders
An automated report needs to be refreshed as quickly as possible
3) Which of the following is hosted completely in the control plane of the classic Databricks architecture?
- Worker node
- JDBC data source
- Databricks web application
- Databricks Filesystem
- Driver node
Databricks web application
4) Which of the following benefits of using the Databricks Lakehouse Platform is provided by Delta Lake?
- The ability to manipulate the same data using a variety of languages
- The ability to collaborate in real time on a single notebook
- The ability to set up alerts for query failures
- The ability to support batch and streaming workloads
- The ability to distribute complex data operations
The ability to support batch and streaming workloads
5) Which of the following describes the storage organization of a Delta table?
- Delta tables are stored in a single file that contains data, history, metadata, and other attributes
- Delta tables store their data in a single file and all metadata in a collection of files in a separate location
- Delta tables are stored in a collection of files that contain data, history, metadata, and other attributes
- Delta tables are stored in a collection of files that contain only the data stored within the table
- Delta tables are stored in a single file that contains only the data stored within the table
Delta tables are stored in a collection of files that contain data, history, metadata, and other attributes
6) Which of the following code blocks will remove the rows where the value in column age is greater than 25 from the existing Delta table my_table and save the updated table?
1. SELECT * FROM my_table WHERE age > 25; 2. UPDATE my_table WHERE age > 25; 3. DELETE FROM my_table WHERE age > 25; 4. UPDATE my_table WHERE age <= 25; 5. DELETE FROM my_table WHERE age <= 25;
DELETE FROM my_table WHERE age > 25;
7) A data engineer has realized that they made a mistake when making a daily update to a table. They need to use Delta time travel to restore the table to a version that is 3 days old. However, when the data engineer attempts to time travel to the older version, they are unable to restore the data because the data files have been deleted. Which of the following explains why the data files are no longer present?
- The VACUUM command was run on the table
- The TIME TRAVEL command was run on the table
- The DELETE HISTORY command was run on the table
- The OPTIMIZE command was run on the table
- The HISTORY command was run on the table
The VACUUM command was run on the table
8) Which of the following Git operations must be performed outside of Databricks Repos?
- commit
- pull
- push
- clone
- merge
merge
9) Which of the following data lakehouse features results in improved data quality over a traditional data lake?
- A data lakehouse provides storage solutions for structured and unstructured data
- A data lakehouse supports ACID-compliant transactions
- A data lakehouse allows the use of SQL queries to examine data
- A data lakehouse stores data in open formats
- A data lakehouse enables ML and AI workloads
A data lakehouse supports ACID-compliant transactions
10) A data engineer needs to determine wheter to use the built-in Databricks Notebooks versioning or version their project using Databricks Repos. Which of the following is an advantage of using Databricks Repos over the Databricks Notebooks versioning?
- Databricks Repos automatically saves development progress
- Databricks Repos supports the use of multiple branches
- Databricks Repos allow users to revert to previous versions of a notebook
- Databricks Repos provides the ability to comment on specific changes
- Databricks Repos is wholly housed within the Databricks Lakehouse Platform
Databricks Repos supports the use of multiple branches
11) A data engineer has left the organization. The data team needs to transfer ownership of the data engineer’s Delta tables to a new data engineer. The new data engineer is the lead engineer on the data tem.
Assuming the original data engineer no longer has access, which of the folloing individuals must be the one to transfer ownership of hte delta tables in Data Explorer?
- Databricks account representative
- This transfer is not possible
- Workspace administrator
- New lead data engineer
- Original data engineer
Workspace administrator
12) A data analyst has created a Delta table sales that is used by the entire data analysis team. They want help from the data engineering team to implement a series of tests to ensure the data is clean. However, the data engineering team uses Python for its tests rather than SQL. Which of the following commands could the data engineering team use to access sales in PySpark?
1. SELECT * FROM sales 2. There is no way to share data between PySpark and SQL 3. spark.sql("sales") 4. spark.delta.table("sales") 5. spark.table( "sales")
spark.table('sales')
13) Which of the following commands will return the location of database customer360?
1. DESCRIBE LOCATION customer360; 2. DROP DATABASE customer360; 3. DESCRIBE DATABASE customer360; 4. ALTER DATABASE customer360 SET DBPROPERTIES ('location' = '/user'); 5. USE DATABASE customer360;
DESCRIBE DATABASE customer360;
14) A data engineer wants to create a new table containing the names of customers that live in France. They have written the folling command:
CREATE TABLE customersInFrance \_\_\_\_\_ AS SELECT id, firstName, lastName FROM customerLocations WHERE country = 'FRANCE'
A senior data engineer mentions that it is organization policy to include a table property indicating that the new table includes personally identifiable information (PII). Which of the following lines of code fills in the above black to sucessfully complete the task?
1. There is no way to indicate wheter a table contains PII. 2. "COMMENT PII" 3. TBLPROPERTIES PII 4. COMMENT "Contains PII" 5. PII
COMMENT "Contains PII"
16) Which of the following commands can be used to write data into a Delta table while avoiding the witting of duplicate records?
- DROP
- IGNORE
- MERGE
- APPEND
- INSERT
MERGE
15) Which fo the following benefits is provided by the arrays functions from Spark SQL?
- An ability to work with data in a variety of types at once
- An ability to work with data within certain partitions and windows
- An ability to work with time-related data in specified intervals
- An ability to work with complex, nested data ingested from JSON files
- An ability to work with an array of tables for procedural automation
An ability to work with complex, nested data ingested from JSON files
17) A data engineer needs to apply custom logic to string column city in table stores for a specific use case. In order to apply this custom logic at scale, the data engineer wants t ocreate a SQL user-defined function (UDF). Which of the following code blocks creates this SQL UDF?
CREATE FUNCTION combine_nyc (city STRING) RETURNS STRING RETURN CASE WHEN city = "brooklyn" THEN "new york" ELSE city END;
CREATE UDF combine_nyc (city STRING) RETURNS STRING CASE WHEN city = "brooklyn" THEN "new york" ELSE city END;
CREATE UDF combine_nyc (city STRING) RETURN CASE WHEN city = "brooklyn" THEN "new york" ELSE city END;
CREATE FUNCTION combine_nyc (city STRING) RETURN CASE WHEN city = "brooklyn" THEN "new york" ELSE city END;
CREATE UDF combine_nyc (city STRING) RETURNS STRING RETURN CASE WHEN city = "brooklyn" THEN "new york" ELSE city END;
CREATE *FUNCTION* combine_nyc (city STRING) RETURNS STRING RETURN CASE WHEN city = "brooklyn" THEN "new york" ELSE city END;
18) A data analyst has a series of queries in a SQL program. The data analyst wants this program to run every day. They only want the final query in the program to run on Sundays. They ask for help from the data engineering team to complete this task. Which of the following approaches could be used by the data enginering team to complete this task?
- They could submit a feature request with Databricks to add this functionality
- They could wrap the queries using PySpark and use Python’s control flow system to determine when to run the final query.
- They could only run the entire program on Sundays
- They could automatically restrict access to the source table in the final query so that it is only accesible on Sundays.
- They could redesign the data model to separate the data used in the final query into a new table
They could wrap the queries using PySpark and use Python’s control flow system to determine when to run the final query.
19) A data engineer runs a statement every day to copy the previous day’s sales into the table transactions. Each day’s sales are in their own file in the location “/transactions/raw”. Today, the data engineer runs the following command to complete this task:
COPY INTO transactions FROM "/transactions/raw" FILEFORMAT = PARQUET;
After running the command today, the data engineer notices that the number of records in table transactions has not changed. Which of the following describes why the statement might not have copied any new records into the table?
A. The format of the files to be copied were not included with the FORMAT_OPTIONS keyword.
B. The names of the files to be copied were not included with the FILES keyword.
C. The previous day’s file has already been copied into the table.
D. The PARQUET file format does not support COPY INTO.
E. The COPY INTO statement requires the table to be refreshed to view the copied rows.
The previous day’s file has already been copied into the table
20) A data engineer needs to create a table in Databricks using data from their organization’s existing SQLite database. They run the following command:
CREATE TABLE jdbc_customer360 USING \_\_\_\_ OPTIONS ( url "jdbc:sqlite:/customers.db", dbtable "customer360"
Which of the following lines of code fills in the above black to successfully complete the task?
- org.apache.spark.sql.jdbc
- autoloader
- DELTA
- sqlite
- org.apache.spark.sql.sqlite
org.apache.spark.sql.jdbc
21) A data engineering team has two tables. The first table march_transactions is a collection of all retail transactions in the month of March. The second table april transactions is a collection of all retail transactions in the month of April. There are no duplicate records between the tables. Which of the following commands should be run to create a new table all_transactions that contains from march_transactions and april_transactions without duplicate records?
A. CREATE TABLE all_transactions AS SELECT * FROM march_transactions INNER JOIN SELECT * FROM april_transactions; B. CREATE TABLE all_transactions AS SELECT * FROM march_transactions UNION SELECT * FROM april_transactions; C. CREATE TABLE all_transactions AS SELECT * FROM march_transactions OUTER JOIN SELECT * FROM april_transactions; D. CREATE TABLE all_transactions AS SELECT * FROM march_transactions INTERSECT SELECT * FROM april_transactions; E. CREATE TABLE all_transactions AS SELECT * FROM march_transactions MERGE SELECT * FROM april_transactions;
CREATE TABLE all_transactions AS SELECT * FROM march_transactions UNION SELECT * FROM april_transactions;
22) A data engineer only wants to execute the final block of a Python program if the Python variable day_of_week is equal to 1 and the Python variable review_period is True. Which of the following control flow statements should the data engineer use to begin this conditionally executed code block?
A. if day_of_week = 1 and review_period: B. if day_of_week = 1 and review_period = "True"; C. if day_of_week == 1 and review_period == "True"; D. if day_of_week == 1 and review_period: E. if day_of_week = 1 & review_period: = "True";
if day_of_week == 1 and review_period
23) A data engineer is attempting to drop a Spark SQL table my_table. The data engineer wnats to delete all table metadata and data. They run the following command:
DROP TABLE IF EXISTS my_table
While the object no longer appears when they run SHOW TABLES, the data files still exist. Which of the following describes why the data files still exist and the metadata files were deteled?
- The table’s data was larger than 10 GB
- The table’s data was smaller than 10 GB
- The table was external
- The table did not have a location
- The table was managed
The table was external
24) A data engineer wants to create a data entity from a couple of tables. The data entity must be used by other data engineers in other sessions. It also must be saved to a physical location.
Which of the following data entities should the data engineer create?
- Database
- Function
- View
- Temporary view
- Table
Table