Free Data-Engineer-Associate Practice Questions & Study Guide: Databricks Certified Data Engineer Associate

Official Exam Details: (Data-Engineer-Associate)

Exam Code:
Data-Engineer-Associate
Passing Score:
70%
Total Question Bank:
285 Verified Questions
Exam Duration:
120 Minutes

Exam Format & Question Types

This certification exam features multiple-choice questions (single and multi-select), interactive Hotspots, Hot Areas, and Drag-and-Drop scenario configurations designed to test real-world technical competency.

Data-Engineer-Associate Certification Study Guide & Architectural Blueprint

Welcome, aspiring Data Engineer! This comprehensive study guide and architectural blueprint is meticulously crafted to prepare you for the Data-Engineer-Associate certification exam. As an expert cloud architect and exam author, I understand the depth and breadth required for this role. This blueprint provides a targeted approach to mastering the core concepts and services necessary to excel.

Exam Overview & Profile

The Data-Engineer-Associate certification validates your expertise in designing, building, operationalizing, securing, and monitoring data pipelines and infrastructure. It targets individuals who possess strong foundational knowledge in data processing, storage, and transformation, capable of implementing solutions for various data types and scales. Candidates typically have 1-2 years of experience working with data engineering technologies in a cloud environment.

  • Target Audience: Data Engineers, ETL Developers, Data Warehouse Developers, and individuals responsible for data infrastructure.
  • Question Count: Approximately 50-60 multiple-choice and multiple-response questions.
  • Duration: 90-120 minutes.
  • Passing Score Context: A scaled score, typically around 700 out of 1000, is required. Focus on understanding concepts rather than rote memorization.

Deep-Dive Domain Breakdown

This section outlines the critical architectural concepts, service selections, and core technologies you will be tested on. A solid grasp of these areas is paramount.

1. Data Ingestion and Transformation

  • Batch Ingestion: Understanding methods for ingesting large datasets at regular intervals. Technologies often include managed transfer services, programmatic APIs (e.g., Python SDKs), and bulk upload utilities. Concepts like incremental loading vs. full loads, change data capture (CDC), and data format conversions (CSV, Parquet, ORC, JSON) are key.
  • Stream Ingestion: Real-time data processing for high-velocity, high-volume data streams. Core concepts include message queues, publish/subscribe models, and stream processing frameworks. Focus on low-latency data capture and immediate processing needs.
  • ETL/ELT Workflows: Differentiating between Extract-Transform-Load and Extract-Load-Transform paradigms. Understanding when to apply each based on data volume, target system capabilities, and transformation complexity. Orchestration tools for sequencing and monitoring these pipelines are crucial.

2. Data Storage Solutions

  • Data Lakes: Object storage solutions (e.g., for raw, unstructured, semi-structured data). Concepts include data organization, partitioning strategies, data cataloging (metadata management), and cost-effective storage tiers.
  • Data Warehouses: Columnar databases optimized for analytical queries (OLAP). Focus on star schemas, snowflake schemas, materialized views, and indexing strategies to optimize query performance.
  • NoSQL Databases: Understanding different NoSQL types (document, key-value, graph, wide-column) and their appropriate use cases based on data model flexibility, scalability, and consistency requirements.
  • Relational Databases (OLTP): When to use traditional relational databases for transactional workloads, focusing on normalization, ACID properties, and connection pooling.

3. Data Processing and Analytics

  • Batch Processing: Distributed processing frameworks for large-scale data (e.g., Apache Spark, Hadoop ecosystems). Understanding concepts like MapReduce, data frames, and fault tolerance.
  • Stream Processing: Real-time analytics on data in motion. Technologies for processing events immediately, performing aggregations, and triggering alerts. Focus on latency, event time vs. processing time, and windowing functions.
  • Data Governance & Security: Implementing access controls (IAM policies), encryption (at rest and in transit), data masking, data lineage, and auditing. Compliance requirements and data privacy regulations (e.g., GDPR, CCPA) are vital considerations.

4. Monitoring and Operations

  • Pipeline Orchestration: Tools for scheduling, managing dependencies, and monitoring data pipelines. Understanding concepts like idempotency, retry mechanisms, and alerting.
  • Performance Optimization: Identifying bottlenecks, optimizing queries, scaling resources, and cost management for data solutions.
  • Troubleshooting: Common issues in data pipelines (e.g., data corruption, schema drift, processing failures) and strategies for debugging and recovery.

High-Yield Exam Tips & Scenario Traps

  • Managed Services vs. Self-Managed: Always lean towards managed services for reliability, scalability, and reduced operational overhead unless there’s a specific, compelling reason for self-management (e.g., extreme cost sensitivity, unique software requirements).
  • Batch vs. Streaming: Understand the trade-offs. If the requirement is “near real-time” or “immediate action,” streaming is preferred. “Daily reports” or “periodic analysis” suggest batch.
  • Schema-on-Read vs. Schema-on-Write: Data lakes utilize schema-on-read for flexibility with raw data, while data warehouses use schema-on-write for structured querying. Choose based on flexibility vs. query performance needs.
  • Cost Optimization: Always consider cost. Look for solutions that offer tiered storage, serverless options, or auto-scaling to match workload demands and minimize expenditure.
  • Security Boundaries: Pay close attention to data encryption (at rest, in transit), network isolation, and granular access controls (least privilege principle). These are critical for every scenario.
  • Scalability: Ensure selected architectures can handle future growth in data volume, velocity, and variety. Look for options that scale horizontally.

Frequently Asked Questions (FAQ)

1. What is the most effective way to structure my study for this exam?

Begin with a thorough review of the exam domains. Prioritize hands-on experience with relevant services; practical application solidifies theoretical knowledge. Leverage official documentation, tutorials, and practice labs. Finally, take practice exams to identify knowledge gaps and familiarize yourself with the question format and time constraints.

2. How should I approach scenario-based questions that describe a specific business problem?

Read the scenario carefully, identifying keywords related to data volume, velocity, variety, veracity, value (the 5 Vs of big data), latency requirements, budget constraints, and existing infrastructure. Eliminate options that don’t meet all critical requirements or introduce unnecessary complexity/cost. Often, the “best” solution balances multiple factors.

3. Are there any specific programming languages or tools I should focus on?

A strong understanding of SQL is absolutely essential for querying and transforming data. Python is widely used in data engineering for scripting, pipeline orchestration, and data manipulation. Familiarity with command-line tools and APIs for interacting with cloud services will also be beneficial.

4. How important is it to understand the underlying infrastructure components of data services?

While the exam focuses on associate-level knowledge, a conceptual understanding of how services operate (e.g., how a distributed processing cluster scales, how data is partitioned in a data warehouse) is crucial. This allows you to make informed architectural decisions rather than just knowing what a service does, helping you debug and optimize effectively.

Free Data-Engineer-Associate Sample Practice Questions

Test your knowledge with these sample scenario questions complete with verified explanations:

General Practice Questions

QUESTION 1

Which data Lakehouse feature results in improved data quality over a traditional data lake?

  • A. A data Lakehouse allows the use or SQL queries to examine data.
  • B. A data Lakehouse stores data in open formats.
  • C. A data Lakehouse supports ACID-compliant transactions.
  • D. A data Lakehouse provides storage solutions for structured and unstructured data.\
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)

Reasoning: The defining feature of a data Lakehouse that directly improves data quality over a traditional data lake is its support for ACID (Atomicity, Consistency, Isolation, Durability) transactions, which are provided by the Delta Lake protocol. In a traditional data lake, a failed write job can lead to corrupted data or partial files, compromising data integrity. ACID transactions prevent this by ensuring that operations are atomic; they either succeed completely or fail entirely, leaving the data in its previous consistent state. This prevents data corruption and ensures that concurrent readers and writers do not interfere with each other, which is fundamental to maintaining high data quality.

❌ Why the other choices are incorrect:

  • Option A is incorrect: SQL query engines (like Apache Hive or Presto) have long been used to query data in traditional data lakes. While the Lakehouse offers a more integrated and performant SQL experience, the ability to use SQL itself is not the key differentiator for data quality.
  • Option B is incorrect: Both traditional data lakes and the Lakehouse architecture are built upon open-source file formats like Apache Parquet. Delta Lake, the core of the Databricks Lakehouse, stores its data as Parquet files. This is a common feature, not a unique quality-improving one.
  • Option D is incorrect: The ability to store a mix of structured, semi-structured, and unstructured data is a characteristic of both traditional data lakes and the Lakehouse. This flexibility in storage does not inherently address data quality issues like consistency or reliability.

QUESTION 2

In which scenario will a data team want to utilize cluster pools?

  • A. An automated report needs to be refreshed as quickly as possible.
  • B. An automated report needs to be runnable by all stakeholders.
  • C. An automated report needs to be version-controlled across multiple collaborators.
  • D. An automated report needs to be made reproducible.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: Cluster pools are designed to reduce cluster start and auto-scaling times by maintaining a set of idle, ready-to-use instances. When a job needs to run, attaching it to a cluster from a pool eliminates the latency associated with acquiring new virtual machines from the cloud provider. This is the primary use case for pools: accelerating time-sensitive workloads like refreshing a critical report as quickly as possible.

❌ Why the other choices are incorrect:

  • Option B is incorrect: Making a report runnable by stakeholders is a permissions and access control issue, managed through workspace settings (e.g., job permissions), not cluster pools.
  • Option C is incorrect: Version control is handled by source code management systems like Git, which can be integrated with Databricks Repos. This is unrelated to cluster infrastructure performance.
  • Option D is incorrect: Reproducibility is ensured by using consistent code, specific library versions, and a fixed Databricks Runtime version. Cluster pools address performance, not the consistency or reproducibility of the code’s logic.

QUESTION 3

What is hosted completely in the control plane of the classic Databricks architecture?

  • A. Databricks web application
  • B. Driver node
  • C. Databricks Filesystem
  • D. Worker node
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: The classic Databricks architecture is divided into two main parts: the control plane and the data plane. The control plane is entirely hosted and managed by Databricks within its own cloud account. It contains all the backend services that power the Databricks platform, including the web application, notebook service, job scheduler, and cluster manager. Users interact with these services through the web UI or REST APIs, which are part of the control plane.

❌ Why the other choices are incorrect:

  • Options B and D are incorrect: The driver and worker nodes are components of a Databricks cluster. These compute resources are always provisioned within the customer’s cloud account, which constitutes the data plane. The data plane is where all data processing occurs.
  • Option C is incorrect: The Databricks Filesystem (DBFS) is an abstraction layer over object storage. The underlying storage for the DBFS root resides in the customer’s cloud account (e.g., an S3 bucket or Azure Data Lake Storage container), placing it firmly in the data plane.

QUESTION 4

A data engineer needs to determine whether to use the built-in Databricks Notebooks versioning or version their project using Databricks Repos.

What is an advantage of using Databricks Repos over the Databricks Notebooks versioning?

  • A. Databricks Repos provides the ability to comment on specific changes
  • B. Databricks Repos is wholly housed within the Databricks Data Intelligence Platform
  • C. Databricks Repos allows users to revert to previous versions of a notebook
  • D. Databricks Repos supports the use of multiple branches
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)
Reasoning: Databricks Repos integrates directly with Git providers (like GitHub, GitLab, Azure DevOps), bringing the full power of Git version control into the Databricks workspace. A fundamental and powerful feature of Git is the ability to use branches. This allows teams to work on features in isolation (feature branches), manage different versions of their codebase for different environments (dev, staging, prod), and collaborate on code changes through pull requests without interfering with the main line of development. This parallel development workflow is a significant advantage over the linear, single-thread history provided by the built-in Notebook versioning.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Both systems allow for comments. When you save a version in the built-in Notebook history, you can add a comment. Similarly, every Git commit in a Repo requires a commit message. Therefore, this is not a unique advantage of Repos.
  • Option B is incorrect: This statement is factually wrong. Databricks Repos connects to an external Git provider where the repository is hosted. The built-in Notebook versioning is the feature that is wholly housed within the Databricks platform.
  • Option C is incorrect: The ability to revert to previous versions is a core feature of both systems. The built-in Notebook versioning provides a history list from which you can restore any prior version. While Repos also allows this (via git checkout or similar commands), it is not a differentiating advantage.

QUESTION 5

What is a benefit of the Databricks Lakehouse Architecture embracing open-source technologies?

  • A. Cloud-specific integrations
  • B. Simplified governance
  • C. Avoiding vendor lock-in
  • D. Ability to scale workloads
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)
Reasoning: The Databricks Lakehouse architecture is fundamentally built on open-source technologies and open standards, such as Delta Lake, which is an open format built on Apache Parquet. By using open formats, organizations ensure their data is not stored in a proprietary system. This allows them to use a variety of tools and platforms to access and process their data, preventing dependency on a single vendor and thus avoiding vendor lock-in. This flexibility and data ownership is a core principle of the lakehouse paradigm.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Open-source technologies are generally designed to be cloud-agnostic, promoting interoperability rather than being tied to specific cloud vendor integrations.
  • Option B is incorrect: While Databricks provides powerful governance tools like Unity Catalog, the use of open-source formats itself does not inherently simplify governance. Governance is a complex challenge that requires dedicated tools and processes on top of the storage format.
  • Option D is incorrect: The ability to scale is a feature of the distributed compute engine (Apache Spark), not a direct benefit of the open-source model itself. While Spark is open-source, proprietary systems can also be highly scalable. The most unique benefit of the *open* aspect is avoiding lock-in.

QUESTION 6

A data engineer needs to use a Delta table as part of a data pipeline, but they do not know if they have the appropriate permissions.

In which location can the data engineer review their permissions on the table?

  • A. Jobs
  • B. Catalog Explorer
  • C. Repos
  • D. Dashboards
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)
Reasoning: Catalog Explorer is the primary user interface in Databricks for browsing and managing data assets governed by Unity Catalog. To review permissions on a specific Delta table, a data engineer would navigate to the table within Catalog Explorer. The interface includes a dedicated ‘Permissions’ tab that displays which principals (users, groups, or service principals) have been granted specific privileges (e.g., SELECT, MODIFY) on that table.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The Jobs UI is for creating, managing, and monitoring data processing workflows and pipelines. It is not used for managing permissions on data objects like tables.
  • Option C is incorrect: Repos are used for integrating Databricks with Git providers to manage and version control code assets, such as notebooks and source files. It is unrelated to data governance or table permissions.
  • Option D is incorrect: The Dashboards UI is for building and viewing data visualizations. While a user needs appropriate permissions on the underlying tables to view a dashboard, the dashboard interface itself is not where those permissions are reviewed or managed.

QUESTION 7

A data engineer is running code in a Databricks Repo that is cloned from a central Git repository. A colleague of the data engineer informs them that changes have been made and synced to the central Git repository. The data engineer now needs to sync their Databricks Repo to get the changes from the central Git repository.

Which Git operation does the data engineer need to run to accomplish this task?

  • A. Clone
  • B. pull
  • C. Merge
  • D. Push
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)
Reasoning: The git pull operation is used to fetch changes from a remote repository and integrate them into the local working branch. In this scenario, the data engineer’s Databricks Repo is the local copy, and the central Git repository is the remote. To get the updates made by the colleague, the engineer must perform a pull to sync their local repo. The Databricks Repos user interface provides a "Pull" button that executes this command.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The `git clone` operation is used only for the initial creation of a local repository from a remote one. The engineer already has a cloned repository and just needs to update it.
  • Option C is incorrect: While `git pull` often involves a `merge` (`git fetch` followed by `git merge`), `pull` is the specific, high-level command to update a local branch from its remote counterpart. The direct action required is a pull.
  • Option D is incorrect: The `git push` operation is used to send local changes from the Databricks Repo to the central repository. The engineer needs to do the opposite: get changes from the central repository.

QUESTION 8

Which file format is used for storing Delta Lake Table?

  • A. CSV
  • B. Delta
  • C. JSON
  • D. Parquet
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)

Reasoning: Delta Lake stores table data in the Apache Parquet file format. Parquet is an open-source columnar storage format highly optimized for analytical queries. It provides efficient data compression and encoding schemes, which significantly improves query performance by allowing query engines to read only the necessary columns. The combination of Parquet for data storage and a JSON-based transaction log for metadata and versioning is what gives Delta Lake its powerful features.

❌ Why the other choices are incorrect:

  • Option A is incorrect: CSV is a simple, row-based text format and is not used for storing Delta table data due to its inefficiency for large-scale analytical workloads.
  • Option B is incorrect: "Delta" refers to the storage layer protocol and format specification itself, not the underlying file format used to store the data partitions.
  • Option C is incorrect: While the transaction log of a Delta table (the _delta_log directory) is composed of JSON files that record every transaction, the actual data of the table is stored in Parquet files.

QUESTION 9

A data architect has determined that a table of the following format is necessary:

Which code block is used by SQL DDL command to create an empty Delta table in the above format regardless of whether a table already exists with this name?

  • A. CREATE OR REPLACE TABLE table_name ( employeeId STRING, startdate DATE, avgRating FLOAT )
  • B. Create OR REPLACE TABLE table_name with colums ( employeeld STRING, startDate DATE, avgRating FLOAT ) USING DELTA
  • C. CREATE TABLE IF NOT EXISTS table_name ( employeeID STRING, startDate DATE, avgRating FLOAT )
  • D. CREATE TABLE table_name AS SELECT employeeld STRING, startDate DATE, avgRating FLOAT
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: The CREATE OR REPLACE TABLE statement correctly defines a table with the specified column names and data types. This command ensures the table exists with the correct schema, either by creating it if it’s new or by replacing an existing table. In Databricks SQL, USING DELTA is the default, so this command creates a Delta table as required.

❌ Why the other choices are incorrect:

  • Option B is incorrect: This option uses invalid SQL syntax. The phrase with colums is not a valid part of a CREATE TABLE statement for defining a schema. The column definitions should be enclosed in parentheses immediately following the table name.
  • Option C is incorrect: CREATE TABLE IF NOT EXISTS will only create the table if one with that name doesn’t already exist. If a table with the same name but an incorrect schema exists, this command does nothing, failing the requirement to ensure the table is in the specified format.
  • Option D is incorrect: The CREATE TABLE AS SELECT (CTAS) syntax is used to create a table and populate it with data from a query. The SELECT statement provided is syntactically invalid for defining a schema and would not create an empty table.

QUESTION 10

A data engineer has been given a new record of data:

Which SQL command can be used to append the new record to an existing Delta table my table?

  • A. options/DatabricksAssociateDataEngineer_df4aafba01.webp
  • B. options/DatabricksAssociateDataEngineer_4f5ecb5927.webp
  • C. options/DatabricksAssociateDataEngineer_a714f36f92.webp
  • D. options/DatabricksAssociateDataEngineer_f41e16ea0f.webp
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)
Reasoning: The INSERT INTO command is the standard SQL DML statement used to add new rows to a table. The provided syntax INSERT INTO my_table VALUES ('a1', 6, 9.4) correctly appends the new record to the my_table Delta table, assuming the columns are in the correct order.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The MERGE command is for complex "upsert" operations, combining updates, inserts, and deletes based on a join condition. It is not the standard command for a simple append, and the syntax shown is incorrect.
  • Option B is incorrect: The UPDATE statement modifies existing records within a table. It cannot be used to add new rows. The SET VALUES (...) syntax is also invalid SQL.
  • Option C is incorrect: APPEND TO is not a valid command in Databricks SQL. The correct statement for appending data is INSERT INTO.

QUESTION 11

A data engineer has realized that the data files associated with a Delta table are incredibly small. They want to compact the small files to form larger files to improve performance.

Which keyword can be used to compact the small files?

  • A. OPTIMIZE
  • B. COMPACTION
  • C. VACUUM
  • D. REPARTITION
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: The OPTIMIZE command is the dedicated function in Delta Lake to perform file compaction. It coalesces small data files into larger ones, which improves query performance by reducing the metadata overhead of reading numerous small files. This is the standard and most efficient way to address the "small file problem" for an existing Delta table. The command can be run as OPTIMIZE table_name.

❌ Why the other choices are incorrect:

  • Option B is incorrect: "COMPACTION" describes the process of combining small files, but it is not a valid SQL keyword or command in Databricks. OPTIMIZE is the command that performs compaction.
  • Option C is incorrect: The VACUUM command is used for garbage collection. It removes data files that are no longer referenced by a Delta table and are older than a specified retention period. It does not compact active files.
  • Option D is incorrect: REPARTITION is a DataFrame transformation used to change the number of partitions during a write operation. While it can be used to control the number of output files when overwriting a table, it is not the command used to optimize an existing table in place.

QUESTION 12

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 data entities should the data engineer create?

  • A. Temporary view
  • B. View
  • C. Function
  • D. Table
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)
Reasoning: The question requires the data entity to be persistent across sessions and physically stored. A Databricks table is the only option that meets both criteria. A table is registered in the metastore, making it accessible to other users in different sessions, and it physically writes the data to a location in cloud storage (e.g., DBFS, S3, ADLS). Creating a table materializes the data, satisfying all requirements.

❌ Why the other choices are incorrect:

  • A is incorrect: A temporary view is session-scoped. It is automatically dropped when the session ends and is not visible to other users or sessions.
  • B is incorrect: A standard view is persistent across sessions but is only a logical construct. It stores a query definition, not the actual data. It does not save data to a new physical location; the query is re-executed against the source tables each time the view is accessed.
  • C is incorrect: A function encapsulates reusable code or logic. It does not store or represent a dataset.

QUESTION 13

A data engineer runs a statement every day to copy the previous day’s sales into the table transactions. Each days 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"

After running the command today, the data engineer notices that the number of records in table transactions has not changed.

What explains why the statement might not have copied any new records into the table?

  • A. The COPY INTO statement requires the table to be refreshed to view the copied rows.
  • B. The PARQVET file format does not support COPY INTO
  • C. The previous day’s file has already been copied into the table.
  • D. The format of the files to be copied were not included with the FORMAT OPTIONS keyword.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)
Reasoning: The COPY INTO command is idempotent by design. It maintains metadata about which files from the source location have already been processed and loaded into the target Delta table. If the command is run again and points to the same source directory, it will automatically skip any files it has previously ingested. This prevents data duplication. The most likely reason for no new records being added is that the file for the previous day had already been successfully loaded in a prior run.

❌ Why the other choices are incorrect:

  • Option A is incorrect: COPY INTO writes to the Delta Lake transaction log, and the changes are immediately available for querying. REFRESH TABLE is used for tables defined over external files when those files change outside of Databricks’ control, not for direct loading operations like COPY INTO.
  • Option B is incorrect: COPY INTO supports multiple file formats, including Parquet, CSV, JSON, Avro, and ORC. Parquet is a fully supported format.
  • Option D is incorrect: While specifying the file format is best practice, if it were missing and could not be inferred, the command would most likely fail with an error, not run successfully with zero rows added. The described outcome points to the command succeeding but finding no new data to process.

QUESTION 14

Which command can be used to write data into a Delta table while avoiding the writing of duplicate records?

  • A. DROP
  • B. MERGE
  • C. APPEND
  • D. INSERT
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)
Reasoning: The MERGE command is the standard SQL operation for performing "upserts" (updates and inserts). It allows you to define a condition to match rows between a source and a target Delta table. By using the WHEN NOT MATCHED THEN INSERT clause, you can insert only those rows from the source that do not have a corresponding match in the target table, effectively preventing duplicate records from being written. This provides idempotent write capabilities.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The DROP command is used to delete an entire table, not to write data into it.
  • Option C is incorrect: An APPEND operation adds all new data to the table without checking for existing records. This would create duplicates if the source data contains records already present in the target table.
  • Option D is incorrect: The INSERT command also adds new rows to a table and does not perform any checks to prevent duplicates.

QUESTION 15

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 command could the data engineering team use to access sales in PySpark?

  • A. spark. SQL ("sales")
  • B. SELECT* FROM sales
  • C. spark.delta. table ("sales")
  • D. spark. table ("sales" )
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)

Reasoning: The spark.table("sales") command is the standard and most direct way in PySpark to access a table that is registered in a metastore (like the Hive Metastore or Unity Catalog) and load it into a Spark DataFrame. Since the question states the sales table exists and is used by the team, it is implied to be registered. This command returns a DataFrame, which the data engineering team can then manipulate using Python for their tests.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The spark.sql() function requires a complete and valid SQL query as a string argument. The string "sales" is not a valid SQL query and would result in a parsing error. A correct usage would be spark.sql("SELECT * FROM sales").
  • Option B is incorrect: SELECT * FROM sales is a SQL statement, not a PySpark command that returns a DataFrame object. This string would typically be passed as an argument to the spark.sql() function.
  • Option C is incorrect: spark.delta.table("sales") is not a valid PySpark command. While there is a Delta Lake API to interact with Delta tables, the correct syntax to get a DeltaTable object is DeltaTable.forName(spark, "sales"). However, this returns a special DeltaTable object used for operations like MERGE or UPDATE, not a standard DataFrame for analysis. The most common way to simply read the table as a DataFrame is spark.table().

QUESTION 16

A data engineer has created a new database using the following command:

CREATE IF NOT EXISTS customer360 ;

In which location will the customer360 database be located?

  • A. dbfs:/user/hive/database
  • B. dbfs:/ user/ hive/ customer360
  • C. dbfs:/ user/ hive/ database/ customers360
  • D. dbfs:/user/hive/warehouse
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)
Reasoning: When a database is created in Databricks SQL using CREATE DATABASE without a LOCATION clause, its data files are stored in the default warehouse directory. This location is determined by the Spark configuration property spark.sql.warehouse.dir, which defaults to dbfs:/user/hive/warehouse. The new database, customer360, will be created as a subdirectory within this default location (specifically, as dbfs:/user/hive/warehouse/customer360.db).

❌ Why the other choices are incorrect:

  • Option A is incorrect: dbfs:/user/hive/database is not the standard default path for the Hive metastore warehouse.
  • Option B is incorrect: This path, dbfs:/user/hive/customer360, omits the warehouse directory, which is a key part of the default location.
  • Option C is incorrect: dbfs:/user/hive/database/customers360 uses an incorrect directory structure. The default path does not include a database folder between hive and the database name folder.

QUESTION 17

A data engineer is attempting to drop a Spark SQL table my _ table and runs the following command-

DROP TABLE IF EXISTS my table;

After running this command, the engineer notices that the data files and metadata files have been deleted from the file system,

What IS the reason behind the deletion of all these files?

  • A. The table was managed.
  • B. The table was external.
  • C. The table did not have a location.
  • D. The table's data was smaller than 10 GB.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: In Databricks and Spark SQL, tables are categorized as either managed or external. When a managed table is dropped using the DROP TABLE command, Spark deletes both the table’s metadata from the metastore and the underlying data files from their storage location (e.g., dbfs:/user/hive/warehouse/). The behavior described in the question—the deletion of both data and metadata files—is the defining characteristic of dropping a managed table.

❌ Why the other choices are incorrect:

  • Option B is incorrect: Dropping an external (unmanaged) table only removes the table’s metadata from the metastore. The data files in the user-specified LOCATION are not deleted, as Spark does not manage their lifecycle.
  • Option C is incorrect: All tables, both managed and external, have a LOCATION where their data is stored. For managed tables, this location is a default path managed by Spark. For external tables, it’s an explicitly provided path. The key distinction is not the existence of a location, but whether Spark manages it.
  • Option D is incorrect: The size of the table’s data has no influence on the behavior of the DROP TABLE command. The distinction between deleting data or only metadata is based solely on whether the table is managed or external, regardless of its size.

QUESTION 18

A data engineer needs to create a table In Databricks using data from a CSV file at location Ipath/to/csv

They run the following command.

Which line of code fills in the above blank to successfully complete the task?

  • A. FROM CSV
  • B. USING CSV
  • C. USING DELTA
  • D. FROM "path/to/csv"
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)
Reasoning: The correct syntax in Databricks SQL to create a table definition over existing data in a specific file format is CREATE TABLE table_name USING data_source. Since the data is in a CSV file, USING CSV is the required clause to specify the data source format.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The FROM clause is used in SELECT statements to specify the source of the data to be queried, not in CREATE TABLE statements to define the table’s underlying file format.
  • Option C is incorrect: USING DELTA would be correct if the source data were in the Delta Lake format. However, the problem explicitly states the source is a CSV file.
  • Option D is incorrect: The path to the data is specified using the LOCATION clause, which is already present later in the command. The FROM clause is syntactically incorrect in this position.

QUESTION 19

What is a benefit of creating an external table from Parquet rather than CSV when using a CREATE TABLE AS SELECT statement?

  • A. Parquet files can be partitioned
  • B. Parquet files have a well-defined schema
  • C. Parquet files have the ability to be optimized
  • D. Parquet files will become Delta tables
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)
Reasoning: Parquet is a self-describing file format, meaning it stores the schema (column names and data types) within the file metadata. When executing a CREATE TABLE AS SELECT statement, Apache Spark can read this schema directly, ensuring data types are correctly and efficiently defined for the new table. In contrast, CSV is a schemaless format, requiring Spark to perform a potentially slow and error-prone schema inference step by scanning the data, which can lead to incorrect data type assignments.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Data partitioning is a feature of how data is organized in directories, not a feature exclusive to the Parquet file format. Datasets composed of CSV files can also be partitioned.
  • Option C is incorrect: While Parquet’s columnar format inherently supports optimizations like column pruning and predicate pushdown, the most direct and fundamental benefit over CSV during table creation is its embedded schema, which prevents inference issues.
  • Option D is incorrect: In Databricks, a CREATE TABLE statement creates a Delta table by default, regardless of the source data’s format (Parquet, CSV, JSON, etc.). The source Parquet files are read, but they do not themselves become the Delta table.

QUESTION 20

A data engineer is working with two tables. Each of these tables is displayed below in its entirety.

 

 

The data engineer runs the of owing query to Join these tables together:

 

 

Which result will be returned by the above query?

  • A. options/DatabricksAssociateDataEngineer_7ba24d451f.webp
  • B. options/DatabricksAssociateDataEngineer_486a9feafc.webp
  • C. options/data-engineer-associate_2e53945ca6.webp
  • D. options/DatabricksAssociateDataEngineer_3b27ccc137.webp
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)

Reasoning: The query performs a LEFT JOIN from the sales table to the favorite_stores table. This type of join includes all rows from the left table (sales). When a matching customer_id is found in favorite_stores, the corresponding store_id is included. If no match is found (as with ‘a3’), the columns from the right table are filled with NULL.

❌ Why the other choices are incorrect:

  • Option A is incorrect: This output represents an INNER JOIN, which only returns rows where the join key exists in both tables, thus incorrectly excluding customer ‘a3’.
  • Option B is incorrect: This output resembles a RIGHT JOIN, which would include all customers from the right table (favorite_stores), such as ‘a2’, and is not what the query specifies.
  • Option C is incorrect: This output shows the result of a FULL OUTER JOIN, which includes all records from both tables, regardless of whether a match exists in the other table.

QUESTION 21

Which SQL keyword can be used to convert a table from a long format to a wide format?

  • A. TRANSFORM
  • B. SUM
  • C. CONVERT
  • D. PIVOT
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)
Reasoning: The PIVOT clause in Databricks SQL is specifically designed to perform a pivot operation. This operation transforms a table from a long format, where data is organized in rows, to a wide format by rotating unique values from a specific column (the pivot column) into new, separate columns. It requires an aggregate function to compute the values for the intersections of the new pivoted columns and the grouped rows.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The `TRANSFORM` clause is used to apply a custom script or user-defined function to transform data, which is different from the standard, built-in structural operation of pivoting.
  • Option B is incorrect: `SUM` is an aggregate function. While it is commonly used within the `PIVOT` clause to calculate the values for the new columns, it is not the keyword that performs the table transformation itself.
  • Option C is incorrect: `CONVERT` is a function used for data type casting, similar to `CAST`. It changes the type of data within a column but does not alter the table’s structure from long to wide.

QUESTION 22

A data engineer needs to apply custom logic to identify employees with more than 5 years of experience in array column employees in table stores. The custom logic should create a new column exp_employees that is an array of all of the employees with more than 5 years of experience for each row. In order to apply this custom logic at scale, the data engineer wants to use the FILTER function.

Which code block successfully completes this task?

  • A. options/DatabricksAssociateDataEngineer_5a511d04ba.webp
  • B. options/DatabricksAssociateDataEngineer_ddf7eb7684.webp
  • C. options/DatabricksAssociateDataEngineer_6fa6f548cb.webp
  • D. options/DatabricksAssociateDataEngineer_20e7494c25.webp
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: This code correctly uses the FILTER higher-order function. The syntax FILTER(employees, employee -> employee.experience > 5) properly defines a lambda function. It iterates over each element in the employees array, assigning it to the variable employee, and then applies the boolean predicate employee.experience > 5 to include only those elements in the resulting exp_employees array.

❌ Why the other choices are incorrect:

  • Option B is incorrect: This option is missing the lambda variable declaration (employee ->). The second argument to FILTER must be a function that takes an array element as input, not just a boolean expression.
  • Option C is incorrect: This option incorrectly attempts to use a WHERE clause within the FILTER function. The FILTER function expects a lambda function as its second argument, not a SQL clause.
  • Option D is incorrect: This option incorrectly includes a WHERE keyword inside the lambda function. The body of the lambda function should be a direct boolean expression, not a WHERE clause.

QUESTION 23

A data engineer has a Python variable table name that they would like to use in a SQL query. They want to construct a Python code block that will run the query using table name.

They have the following incomplete code block:

What can be used to fill in the blank to successfully complete the task?

  • A. spark.sql
  • B. spark.delta.sql
  • C. dbutils.sql
  • D. spark.table
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: The spark.sql() function is the standard method within the SparkSession API to execute a SQL query from a string. It correctly processes the Python f-string, which dynamically inserts the table name, and returns the query result as a Spark DataFrame.

❌ Why the other choices are incorrect:

  • Option B is incorrect: spark.delta.sql is not a valid function. While Delta Lake has specific SQL extensions, they are executed through the standard spark.sql() interface, not a separate method.
  • Option C is incorrect: The Databricks Utilities library (dbutils) does not have a .sql() method for executing queries. This functionality is part of the core SparkSession API.
  • Option D is incorrect: The spark.table() function is used to return a specified table or view as a DataFrame. It takes a table name as an argument, not a full SQL query string.

QUESTION 24

A data engineer that is new to using Python needs to create a Python function to add two integers together and return the sum?

Which code block can the data engineer use to complete this task?

  • A. def add_integers (x, y) : return x + Y
  • B. def add _ integers (x, y) :print (x + Y)
  • C. function add_integers (x, y) :return x + Y
  • D. def add integers (x, y) :X+Y
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: This code block correctly uses the def keyword to define a Python function named add_integers that accepts two arguments. The return statement is correctly used to send the sum of the two arguments back as the function’s output, fulfilling the requirements of the prompt. While Python is case-sensitive and the variable Y should be lowercase y to match the parameter, this option is the only one that has the correct syntax and logic for defining a function that returns a value.

❌ Why the other choices are incorrect:

  • Option B is incorrect: This option has a syntax error in the function name (add _ integers contains a space). Additionally, it uses print(), which writes the output to the console but does not return a value as the function’s result.
  • Option C is incorrect: Python uses the def keyword to define functions, not function. This syntax is invalid in Python.
  • Option D is incorrect: This option also has a syntax error in the function name due to the space. Furthermore, the body of the function calculates the sum but does nothing with it; the value is not returned or printed, so it is discarded.

QUESTION 25

A data engineer has configured a Structured Streaming job to read from a table, manipulate the data. and then perform a streaming write into a new table.

The code block used by the data engineer is below:

Which line of code should the data engineer use to fill in the blank If the data engineer only wants the query to execute a micro-batch to process data every 5 seconds?

  • A. trigger(processingTime=”5 seconds")
  • B. trigger(continuous=”5 seconds")
  • C. trigger(once=”5 seconds")
  • D. trigger ("5 seconds")
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)

Reasoning: The trigger(processingTime="5 seconds") configuration correctly sets up a fixed-interval micro-batch. This instructs the Structured Streaming engine to check for new data and trigger a new micro-batch computation every five seconds, aligning perfectly with the requirement.

❌ Why the other choices are incorrect:

  • Option B is incorrect: The trigger(continuous=...) setting enables continuous processing mode, which aims for sub-millisecond latency and is distinct from micro-batch processing. The question specifically asks for a micro-batch execution model.
  • Option C is incorrect: The trigger(once=...) parameter expects a boolean value (True), not a time interval. It is used to process all available data in a single batch and then terminate the stream, which doesn’t match the recurring execution requirement.
  • Option D is incorrect: The syntax trigger("5 seconds") is invalid. The trigger method requires a keyword argument like processingTime, continuous, or once to define the trigger’s behavior. Passing the string directly is a syntax error.

QUESTION 26

A data engineer is maintaining a data pipeline. Upon data ingestion, the data engineer notices that the source data is starting to have a lower level of quality. The data engineer would like to automate the process of monitoring the quality level.

Which tool can the data engineer use to solve this problem?

  • A. Delta Lake
  • B. unity Catalog
  • C. Delta Live Tables
  • D. Auto Loader
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)
Reasoning: Delta Live Tables (DLT) is a framework specifically designed for building reliable ETL pipelines. It includes a core feature called "expectations" that allows data engineers to define and enforce data quality constraints directly within the pipeline’s declarative code. DLT automatically tracks metrics for records that pass or fail these expectations and provides options to handle invalid records, such as dropping them, quarantining them, or halting the pipeline. This directly automates the process of monitoring data quality as requested in the scenario.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Delta Lake is an open-source storage layer that brings ACID transactions and reliability to data lakes. While its schema enforcement feature contributes to data quality, it is not a pipeline tool for defining and monitoring comprehensive quality rules.
  • Option B is incorrect: Unity Catalog is a unified governance solution for data and AI assets. Its focus is on access control, auditing, data lineage, and discovery, not on implementing quality checks within a data processing job.
  • Option D is incorrect: Auto Loader is a tool for incrementally and efficiently ingesting new data files from cloud storage into Delta Lake. While often used as a source for DLT pipelines, its primary function is data ingestion, not data quality monitoring.

QUESTION 27

A data engineer has three tables in a Delta Live Tables (DLT) pipeline. They have configured the pipeline to drop invalid records at each table. They notice that some data is being dropped due to quality concerns at some point in the DLT pipeline. They would like to determine at which table in their pipeline the data is being dropped.

Which approach can the data engineer take to identify the table that is dropping the records?

  • A. They can set up DLT to notify them via email when records are dropped.
  • B. They can navigate to the DLT pipeline page, click on each table, and view the data quality statistics.
  • C. They can set up separate expectations for each table when developing their DLT pipeline.
  • D. They can navigate to the DLT pipeline page, click on the "Error" button, and review the present errors.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)
Reasoning: The Delta Live Tables (DLT) user interface is designed for detailed monitoring of pipeline execution. By navigating to the pipeline’s graph view, an engineer can click on any individual table (node) in the Directed Acyclic Graph (DAG). The details pane will then display comprehensive data quality statistics for that specific table’s most recent update, including the number of records successfully written and, crucially, the number of records dropped for failing to meet quality constraints. This provides a direct, table-by-table view to pinpoint where data loss is occurring.

❌ Why the other choices are incorrect:

  • Option A is incorrect: While email notifications can alert an engineer that a data quality rule was violated, they typically provide high-level summaries and do not offer the granular, per-table breakdown required to identify the specific source of the dropped records.
  • Option C is incorrect: Setting expectations is the action of defining data quality rules in the code. The scenario requires monitoring the results of these rules, not defining them. The pipeline is already configured to drop invalid records, implying expectations are in place.
  • Option D is incorrect: Dropping a record via an expectation (ON VIOLATION DROP ROW) is a successful outcome of a data quality rule, not a pipeline execution error. The "Error" section of the UI is reserved for issues that cause a pipeline update to fail, such as syntax errors or cluster failures.

QUESTION 28

What is used by Spark to record the offset range of the data being processed in each trigger In order for Structured Streaming to reliably track the exact progress of the processing so that it can handle any kind of failure by restarting and/or reprocessing?

  • A. Checkpointing and Write-ahead Logs
  • B. Checkpointing and Idempotent Sinks
  • C. Write-ahead Logs and Idempotent Sinks
  • D. Replayable Sources and Idempotent Sinks
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: Spark Structured Streaming achieves fault tolerance by using checkpointing to store its progress information. For each trigger (micro-batch), it saves the offset range of the data it is about to process into a write-ahead log (WAL). This WAL is stored within the designated checkpoint directory. If a failure occurs during the processing of a batch, Spark can use this log to re-read the exact same data from the source and restart the batch, ensuring no data is lost. The checkpoint also contains a commit log to track which batches have been successfully completed, allowing a restarted query to resume precisely where it left off.

❌ Why the other choices are incorrect:

  • Option B, C, and D are incorrect: Idempotent sinks are a mechanism for the output side of a streaming query. They ensure that if a batch is reprocessed due to a failure, writing the output again does not create duplicates in the sink system. While crucial for end-to-end exactly-once guarantees, they are not used to record or track the input data’s offsets.
  • Option D is incorrect: Replayable sources (like Kafka or Azure Event Hubs) are a prerequisite for fault tolerance, as they allow Spark to re-read data from a specific offset. However, the source itself does not record Spark’s progress; Spark uses its own WAL and checkpointing mechanism to record the offsets it has processed from that source.

QUESTION 29

What describes the relationship between gold tables and Silver tables?

  • A. Gold tables are more likely to contain aggregations than Silver tables.
  • B. Gold tables are more likely to contain truthful data than Silver tables.
  • C. Gold tables are more likely to contain valuable data than Silver tables.
  • D. Gold tables are more likely to contain a less refined view of data than Silver tables.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)

Reasoning: In the Medallion architecture, Gold tables are designed for specific business use cases, analytics, and reporting. A key step in preparing data for these purposes is aggregation. Silver tables contain clean, validated, and often row-level data. Gold tables are then created by applying business logic and aggregations (e.g., SUM, COUNT, AVG) to the Silver tables to produce business-level metrics, such as daily sales totals or monthly active users.

❌ Why the other choices are incorrect:

  • Option B is incorrect: Silver tables are typically considered the “single source of truth” as they contain cleansed and validated data. Gold tables are derived from this truthful data, but the Silver layer is where data quality and truthfulness are enforced at a granular level.
  • Option C is incorrect: Value is subjective and depends on the use case. Data scientists may find the granular Silver data more valuable, while business analysts find the aggregated Gold data more valuable. It is not the primary differentiator.
  • Option D is incorrect: This statement is backward. The Medallion architecture represents a flow of increasing refinement: Bronze (raw) -> Silver (cleansed) -> Gold (aggregated/business-ready). Gold tables contain the most refined view for specific analytical purposes.

QUESTION 30

What describes when to use the CREATE STREAMING LIVE TABLE (formerly CREATE INCREMENTAL LIVE TABLE) syntax over the CREATE LIVE syntax when creating Delta Live Tables (DLT) tables using SQL?

  • A. CREATE STREAMING LIVE TABLE should be used when the previous step in the DLT pipeline in static.
  • B. CREATE STREAMING LIVE TABLE should be used when data needs to be processed incrementally.
  • C. CREATE STREAMING LIVE TABLE should be used when the subsequent step in the DLT pipeline in static.
  • D. CREATE STREAMING LIVE TABLE should be used when data needs to be processed through complicated aggregations.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)
Reasoning: The CREATE STREAMING LIVE TABLE syntax is specifically designed for processing data incrementally from append-only sources. A streaming live table processes only the new data that has arrived since the last pipeline update. This is the fundamental difference from a standard live table (CREATE LIVE TABLE), which recomputes the entire table from its source datasets each time the pipeline is updated. Therefore, when the goal is to efficiently process data as it arrives, a streaming live table is the correct choice.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The choice to use a streaming table depends on its source and processing requirements, not the state of the previous step. A streaming table can read from a static source, although it’s most common to read from another streaming source or an external append-only source.
  • Option C is incorrect: The nature of subsequent steps in the pipeline does not determine whether the current table should be streaming or static. The decision is made based on how the current table should ingest and process its own data.
  • Option D is incorrect: While streaming live tables can perform aggregations (often with watermarking), their defining characteristic is incremental processing, not the complexity of the aggregation. Complex aggregations that require scanning the entire source dataset are often better suited for standard live tables (materialized views), which perform a full re-computation on each update.

QUESTION 31

A Delta Live Table pipeline includes two datasets defined using LIVE TABLE. Three datasets are defined against Delta Lake table sources using LIVE TABLE.

The table is configured to run in Production mode using the Continuous Pipeline Mode.

What is the expected outcome after clicking Start to update the pipeline assuming previously unprocessed data exists and all definitions

are valid?

  • A. All datasets will be updated at set intervals until the pipeline is shut down. The compute resources will persist to allow for additional testing.
  • B. All datasets will be updated once and the pipeline will shut down. The compute resources will be terminated.
  • C. All datasets will be updated once and the pipeline will shut down. The compute resources will persist to allow for additional testing.
  • D. All datasets will be updated at set intervals until the pipeline is shut down. The compute resources will be deployed for the update and terminated when the pipeline is stopped.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)

Reasoning: The pipeline is configured in Continuous mode, meaning it runs indefinitely and processes new data as it arrives until manually stopped. The phrase "updated at set intervals" reflects this continuous operation. The pipeline is also in Production mode. In this mode, Delta Live Tables manages the compute cluster’s lifecycle, deploying resources when the pipeline starts and automatically terminating them when the pipeline is stopped. This behavior optimizes resource usage and cost for production workloads.

❌ Why the other choices are incorrect:

  • Option A is incorrect: It correctly describes the continuous update cycle but incorrectly states that compute resources will persist for testing. Persistent compute resources are a feature of Development mode, not Production mode.
  • Option B is incorrect: This describes the behavior of a Triggered pipeline, which processes available data once and then terminates. The question specifies a Continuous pipeline.
  • Option C is incorrect: This describes a Triggered pipeline (runs once) operating in Development mode (resources persist), both of which contradict the scenario described in the question.

QUESTION 32

Which type of workloads are compatible with Auto Loader?

  • A. Streaming workloads
  • B. Batch workloads
  • C. Serverless workloads
  • D. Machine learning workloads
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)

Reasoning: Auto Loader is an optimized cloud file source designed specifically for Apache Spark Structured Streaming. Its primary function is to incrementally and efficiently ingest new data files as they arrive in cloud storage. This pattern of continuous data processing is the definition of a streaming workload. Auto Loader is invoked using the .format("cloudFiles") option within a spark.readStream call, which fundamentally ties it to the streaming paradigm.

❌ Why the other choices are incorrect:

  • Option B is incorrect: While a streaming query with Auto Loader can be executed in a batch-like fashion using triggers like availableNow=True, this is considered incremental batch processing. Auto Loader’s core design and primary use case remain rooted in the streaming model, not traditional batch processing.
  • Option C is incorrect: Serverless describes a compute model (e.g., Serverless DLT, Serverless SQL Warehouses), not a workload type like streaming or batch. An Auto Loader job can run on serverless compute, but "serverless" itself is not the type of workload Auto Loader is compatible with.
  • Option D is incorrect: Machine learning workloads focus on model training and inference. Auto Loader is a data ingestion tool that can be used to prepare data for ML pipelines, but the ingestion task itself is a streaming data engineering workload, not an ML workload.

QUESTION 33

A data engineer has developed a data pipeline to ingest data from a JSON source using Auto Loader, but the engineer has not provided any type inference or schema hints in their pipeline. Upon reviewing the data, the data engineer has noticed that all of the columns in the target table are of the string type despite some of the fields only including float or Boolean values.

Why has Auto Loader inferred all of the columns to be of the string type?

  • A. Auto Loader cannot infer the schema of ingested data
  • B. JSON data is a text-based format
  • C. Auto Loader only works with string data
  • D. All of the fields had at least one null value
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)

Reasoning: JSON is a text-based data format. While Auto Loader’s schema inference feature is powerful, it operates on this underlying text data. When type inference is not explicitly configured or fails to find a consistent, non-string type across the sampled data, Auto Loader defaults to interpreting all columns as the string type. This is the safest default behavior for text-based sources, as it prevents parsing errors and data loss that could occur from attempting to cast incompatible text values to more specific types (e.g., numeric or Boolean).

❌ Why the other choices are incorrect:

  • Option A is incorrect: Schema inference is a primary feature of Auto Loader. It automatically detects data types and handles schema evolution, which is a significant advantage over traditional file-based ingestion methods.
  • Option C is incorrect: Auto Loader supports and can infer a wide range of data types, including numeric types (integer, float, double), Boolean, timestamp, and complex types like arrays and structs. It is not limited to string data.
  • Option D is incorrect: The presence of null values in a field does not force the column to be inferred as a string. Auto Loader correctly handles nullable columns for all supported data types. For instance, a column containing 1.23, 4.56, and null would be inferred as a double type.

QUESTION 34

Which statement regarding the relationship between Silver tables and Bronze tables is always true?

  • A. Silver tables contain more data than Bronze tables.
  • B. Silver tables contain a less refined. less clean view of data than Bronze data.
  • C. Silver tables contain aggregates while Bronze data is unaggregated.
  • D. Silver tables contain a more refined and cleaner view of data than Bronze tables.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)
Reasoning: The Medallion architecture is a data design pattern that incrementally improves data quality across layers. The Bronze layer ingests raw source data with minimal transformation. The Silver layer’s purpose is to take this raw data and apply cleaning (e.g., handling nulls, correcting data types), filtering, and enrichment (e.g., joining tables). This process inherently results in the Silver tables containing a more refined, validated, and cleaner view of the data compared to the Bronze tables.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Cleaning and deduplication processes applied when moving data from Bronze to Silver can often reduce the total number of rows. Therefore, Silver tables do not always contain more data.
  • Option B is incorrect: This contradicts the fundamental principle of the Medallion architecture. The data flows from less refined (Bronze) to more refined (Silver), not the other way around.
  • Option C is incorrect: While some transformations occur in the Silver layer, complex, business-level aggregations are characteristic of the Gold layer. The Silver layer typically contains cleansed, atomic, and conformed data, not pre-aggregated views.

QUESTION 35

Which query is performing a streaming hop from raw data to a Bronze table?

  • A. options/DatabricksAssociateDataEngineer_7f826904cf.webp
  • B. options/DatabricksAssociateDataEngineer_f1d6345667.webp
  • C. options/DatabricksAssociateDataEngineer_a1b9cdf0c0.webp
  • D. options/DatabricksAssociateDataEngineer_72ef0aea43.webp
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)

Reasoning: This query correctly implements a streaming pipeline. It uses spark.readStream to create a streaming DataFrame and .format("cloudFiles") (Auto Loader) to incrementally and efficiently ingest raw JSON files from a cloud storage location. The data is then written using .writeStream to a destination table named sales_orders_bronze, which is consistent with the Bronze layer of the Medallion architecture. The use of a checkpoint location is mandatory for fault-tolerant streaming writes.

❌ Why the other choices are incorrect:

  • Option B is incorrect: It uses spark.read, which initiates a batch query, not a streaming query. The question specifically requires a streaming hop.
  • Option C is incorrect: Similar to B, this query uses spark.read for a batch read, which does not fulfill the requirement of a streaming operation.
  • Option D is incorrect: This query correctly starts with spark.readStream but then incorrectly attempts to use .write, the API for batch writes. A streaming DataFrame (created by readStream) must be written using the .writeStream API. This code is syntactically invalid.

QUESTION 36

A dataset has been defined using Delta Live Tables and includes an expectations clause:

What is the expected behavior when a batch of data containing data that violates these constraints is processed?

  • A. Records that violate the expectation are added to the target dataset and recorded as invalid in the event log.
  • B. Records that violate the expectation cause the job to fail.
  • C. Records that violate the expectation are added to the target dataset and flagged as invalid in a field added to the target dataset.
  • D. Records that violate the expectation are dropped from the target dataset and recorded as invalid in the event log.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)

Reasoning: The code snippet uses the clause ON VIOLATION FAIL UPDATE. This explicitly instructs the Delta Live Tables pipeline to halt processing and fail the current update if any record in the batch violates the expectation (timestamp > '2020-01-01'). This is the strictest data quality enforcement action.

❌ Why the other choices are incorrect:

  • Option A is incorrect: This behavior of adding records while logging violations corresponds to the default EXPECT (or EXPECT OR WARN) action. The code specifies FAIL UPDATE, which prevents violating records from being loaded by stopping the job.
  • Option C is incorrect: Delta Live Tables records data quality metrics in the event log. It does not alter the schema of the target dataset by adding flagging columns for invalid records.
  • Option D is incorrect: This describes the ON VIOLATION DROP ROW action, where only the non-compliant records are discarded, and the pipeline continues processing the valid ones. The code explicitly specifies FAIL UPDATE.

QUESTION 37

Identify a scenario to use an external table.

A Data Engineer needs to create a parquet bronze table and wants to ensure that it gets stored in a specific path in an external location.

Which table can be created in this scenario?

  • A. An external table where the schema has managed location pointing to specific path in external location
  • B. A managed table where the location is pointing to specific path in external location
  • C. An external table where the location is pointing to specific path in external location
  • D. A managed table where the catalog has managed location pointing to specific path in external location
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)

Reasoning: The defining feature of an external (unmanaged) table is that its data resides in a location specified and managed by the user, outside of the default managed storage location. By using the CREATE EXTERNAL TABLE ... LOCATION 'path/to/data' syntax, the engineer can register the table’s metadata in the metastore while ensuring the data files are stored at a specific external path. This decouples the data’s lifecycle from the table’s metadata; dropping the table will not delete the underlying data files, which is a common requirement for bronze layer tables.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The location of an external table is explicitly set using the LOCATION clause in its definition, not inherited from a schema’s managed location, which is the default for managed tables.
  • Option B is incorrect: A managed table implies that Databricks manages the data lifecycle. If a managed table is dropped, its data is also deleted, which is contrary to the typical goal of using a specific external path for data persistence and independent management.
  • Option D is incorrect: This describes the default behavior for a managed table, where data is stored in the metastore’s, catalog’s, or schema’s managed location, not a specific, user-defined path for an individual table.

QUESTION 38

A data engineer has a Job with multiple tasks that runs nightly. Each of the tasks runs slowly because the clusters take a long time to start.

Which action can the data engineer perform to improve the startup time for the clusters used for the Job?

  • A. They can use endpoints available in Databricks SQL
  • B. They can use clusters that are from a cluster pool
  • C. They can configure the clusters to auto scale for larger data sizes
  • D. They can use jobs clusters instead of all-purpose clusters
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)
Reasoning: Cluster pools are specifically designed to reduce cluster start times. A pool maintains a set of idle, ready-to-use virtual machine instances. When a job requests a new cluster, it acquires the required driver and worker nodes from this pool instead of waiting for the cloud provider to provision new instances from scratch. This significantly decreases the time it takes for each task’s cluster to become available and start processing data.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Databricks SQL endpoints (now SQL Warehouses) are optimized for low-latency SQL queries and BI tools, not for running general-purpose, multi-task data engineering jobs.
  • Option C is incorrect: Autoscaling optimizes cluster performance and cost by adjusting the number of worker nodes after the cluster is already running. It does not affect the initial cluster startup time.
  • Option D is incorrect: Jobs typically use jobs clusters by default for cost-efficiency. However, simply using a jobs cluster does not inherently make it start faster. The way to accelerate the startup of a jobs cluster is to attach it to a cluster pool.

QUESTION 39

A data engineer has a single-task Job that runs each morning before they begin working. After identifying an upstream data issue, they need to set up another task to run a new notebook prior to the original task.

Which approach can the data engineer use to set up the new task?

  • A. They can create a new task in the existing Job and then add the original task as a dependency of the new task.
  • B. They can clone the existing task in the existing Job and update it to run the new notebook.
  • C. They can create a new task in the existing Job and then add it as a dependency of the original task.
  • D. They can create a new Job from scratch and add both tasks to run concurrently.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)
Reasoning: To ensure the new notebook runs before the original one, a dependency must be established. In Databricks Jobs, this is done by defining that the downstream task (the original task) depends on the successful completion of the upstream task (the new task). Therefore, the correct procedure is to add the new task to the Job, then edit the original task to add the new task as its dependency in the ‘Depends on’ field.

❌ Why the other choices are incorrect:

  • Option A is incorrect: This describes the reverse dependency. If the new task depends on the original task, the original task would run first, which is the opposite of the desired outcome.
  • Option B is incorrect: Cloning a task is a way to create a copy, but it does not address the core requirement of setting the execution order. A dependency would still need to be manually configured after cloning.
  • Option D is incorrect: Creating an entirely new Job is inefficient. More importantly, running tasks concurrently does not enforce the required sequential execution where the new task must complete before the original task begins.

QUESTION 40

A single Job runs two notebooks as two separate tasks. A data engineer has noticed that one of the notebooks is running slowly in the Job’s current run. The data engineer asks a tech lead for help in identifying why this might be the case.

Which approach can the tech lead use to identify why the notebook is running slowly as part of the Job?

  • A. They can navigate to the Runs tab in the Jobs Ul to immediately review the processing notebook.
  • B. They can navigate to the Runs tab in the Jobs Ul and click on the active run to review the processing notebook.
  • C. They can navigate to the Tasks tab in the Jobs Ul to immediately review the processing notebook.
  • D. They can navigate to the Tasks tab in the Jobs Ul and click on the active run to review the processing notebook.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

Rationale Breakdown

To monitor a specific task, such as a notebook, within a running Databricks Job, the correct user interface (UI) path is to first locate the job, then view its runs, and finally select the specific active run to inspect its tasks.

✅ Option B (Correct)

Reasoning: This option accurately describes the standard procedure. In the Databricks Workflows (Jobs) UI, you select the relevant job, which then displays its configuration and run history. You must navigate to the Runs tab, which lists all past and currently active runs. Clicking on the specific active run opens the run details page, where you can see the status of each task and click on the slow-running notebook to view its logs, output, and Spark UI details to diagnose the performance issue.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The Runs tab displays a list of job runs. You cannot directly review a notebook from this list; you must first select a specific run to drill down into its tasks.
  • Option C is incorrect: There is no top-level Tasks tab in the Jobs UI for monitoring active runs. Tasks are components of a job’s definition and their execution status is viewed within a specific run, not from a separate tab.
  • Option D is incorrect: This option suggests an incorrect starting point. The monitoring workflow begins from the Runs tab, not a non-existent top-level Tasks tab for active monitoring.

QUESTION 41

A data analysis team has noticed that their Databricks SQL queries are running too slowly when connected to their always-on SQL endpoint. They claim that this issue is present when many members of the team are running small queries simultaneously. They ask the data engineering team for help. The data engineering team notices that each of the team’s queries uses the same SQL endpoint.

Which approach can the data engineering team use to improve the latency of the team’s queries?

  • A. They can increase the maximum bound of the SQL endpoint's scaling range.
  • B. They can increase the cluster size of the SQL endpoint.
  • C. They can turn on the Auto Stop feature for the SQL endpoint.
  • D. They can turn on the Serverless feature for the SQL endpoint.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)
Reasoning: Increasing the cluster size of the SQL endpoint is a form of vertical scaling. A larger cluster (e.g., Medium, Large) has more CPU cores, memory, and I/O bandwidth. This increased capacity allows the endpoint to execute individual queries faster and handle a higher number of concurrent queries before facing resource contention. For a scenario with many simultaneous small queries, a larger cluster can reduce the execution latency for each query and increase the overall throughput, directly addressing the issue of queries running too slowly.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Increasing the maximum scaling bound is horizontal scaling, which adds more clusters to handle query load. This is effective for reducing time spent in a queue, but it does not speed up the execution of an individual query on a given cluster. Increasing the cluster size (B) directly reduces the execution time itself.
  • Option C is incorrect: The Auto Stop feature is a cost-saving measure that shuts down the endpoint after a period of inactivity. Enabling it would worsen latency, as the first query after an idle period would have to wait for the endpoint to start up.
  • Option D is incorrect: While switching to a Serverless SQL endpoint is a valid and often recommended strategy for handling high concurrency with minimal management, the question implies modifying the configuration of the existing endpoint. Adjusting the cluster size is a direct configuration change, whereas switching to Serverless is a change in the endpoint type.

QUESTION 42

A data engineer has been using a Databricks SQL dashboard to monitor the cleanliness of the input data to an ELT job. The ELT job has its Databricks SQL query that returns the number of input records containing unexpected NULL values. The data engineer wants their entire team to be notified via a messaging webhook whenever this value reaches 100.

Which approach can the data engineer use to notify their entire team via a messaging webhook whenever the number of NULL values reaches 100?

  • A. They can set up an Alert with one-time notifications.
  • B. They can set up an Alert with a new email alert destination.
  • C. They can set up an Alert with a new webhook alert destination.
  • D. They can set up an Alert with a custom template.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)
Reasoning: The scenario describes the exact functionality of Databricks SQL Alerts. An alert can be configured to execute a SQL query on a schedule, evaluate a condition on the result (e.g., value >= 100), and if the condition is met, trigger a notification. Databricks supports multiple notification destinations, including generic webhooks. This allows integration with various messaging platforms like Slack or Microsoft Teams, fulfilling the requirement to notify the team via a messaging webhook.

❌ Why the other choices are incorrect:

  • Option A is incorrect: A one-time notification would not be suitable for continuous monitoring of data quality. Alerts are typically set up with a refresh schedule to check the condition repeatedly.
  • Option B is incorrect: While email is a valid alert destination, the requirement specifically calls for a “messaging webhook,” which is a distinct type of destination designed for integrating with other applications.
  • Option D is incorrect: A custom template is used to format the content of the alert notification, not to define where the notification is sent. The primary step is to configure the alert destination, which in this case is a webhook.

QUESTION 43

A data engineer wants to schedule their Databricks SQL dashboard to refresh once per day, but they only want the associated SQL endpoint to be running when it is necessary.

Which approach can the data engineer use to minimize the total running time of the SQL endpoint used in the refresh schedule of their dashboard?

  • A. They can turn on the Auto Stop feature for the SQL endpoint.
  • B. They can ensure the dashboard's SQL endpoint is not one of the included querys SQL endpoint.
  • C. They can ensure the dashboard's SQL endpoint matches each of the queries' SQL endpoints.
  • D. They can set up the dashboard's SQL endpoint to be serverless.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)

Reasoning: Serverless SQL endpoints are designed for use cases requiring instant compute with automatic management of resources. For a scheduled daily refresh, a serverless endpoint will start almost instantly when the refresh is triggered, execute the dashboard’s queries, and then shut down immediately after completion. This behavior ensures the compute resources are active only during the query execution, perfectly aligning with the goal of minimizing total running time and eliminating idle periods.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The Auto Stop feature on a classic or pro SQL endpoint is useful, but it shuts down the endpoint only after a specified period of inactivity (e.g., 10 minutes). For a daily refresh, this means the endpoint would start, run the queries, and then remain idle—and incurring costs—for the entire auto-stop duration. Serverless is more efficient as it shuts down almost immediately.
  • Option B is incorrect: A dashboard must be associated with a SQL endpoint to execute its underlying queries. Using a different endpoint for the dashboard than the queries is not a logical or functional configuration.
  • Option C is incorrect: While a dashboard’s queries typically run on the endpoint assigned to the dashboard, this describes a standard configuration, not a specific strategy for minimizing runtime. It does not, by itself, address the problem of the endpoint running when not needed.

QUESTION 44

An engineering manager wants to monitor the performance of a recent project using a Databricks SQL query. For the first week following the project’s release. the manager wants the query results to be updated every minute. However, the manager is concerned that the compute resources used for the query Will be left running and cost the organization a lot of money beyond the first week of the

project’s release.

Which approach can the engineering team use to ensure the query does not cost the organization any money beyond the first week of the projects release?

  • A. They can set the query's refresh schedule to end after a certain number of refreshes.
  • B. They can set a limit to the number of DBUs that are consumed by the SQL Endpoint.
  • C. They can set the query's refresh schedule to end on a certain date in the query scheduler.
  • D. They can set a limit to the number of Individuals that are able to manage the query's refresh schedule.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)

Reasoning: The Databricks SQL query scheduler provides a direct mechanism to control the lifecycle of a refresh schedule. When setting up a refresh, users can specify a start date and time as well as an ‘Ends on’ date and time. This feature is designed precisely for scenarios like the one described, where a query needs to be refreshed frequently but only for a limited duration. By setting the ‘Ends on’ date to one week after the project’s release, the team ensures the query refresh automatically ceases, preventing any further compute costs from that schedule beyond the specified period.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The Databricks SQL query scheduler does not have an option to end a refresh schedule after a specific number of executions. Scheduling is based on time intervals (e.g., every minute, hour, day) and a defined end date/time, not an execution count.
  • Option B is incorrect: Setting a DBU limit is a cost management feature for the entire SQL warehouse (formerly SQL Endpoint), not for an individual query’s schedule. While it can cap overall spending, it does not provide the granular control needed to stop a specific query’s schedule on a predetermined date. The schedule would still attempt to run, potentially failing or impacting other workloads if the limit is reached.
  • Option D is incorrect: Limiting the number of individuals who can manage the schedule is a permission-based control (access control). It affects who can create or modify the schedule but does not control the execution or termination of the schedule itself. The schedule would continue to run indefinitely unless an end date is set.

QUESTION 45

Identify the impact of ON VIOLATION DROP ROW and ON VIOLATION for a constraint violation

A data engineer has created an ETL pipeline using Delta Live table to manage their company travel reimbursement detail. They want to ensure that the if the location details has not been provided by the employee, the pipeline needs to be terminated.

How can the scenario be implemented?

  • A. CONSTRAINT valid_location EXPECT (location != NULL) ON DROP ROW
  • B. CONSTRAINT valid_location EXPECT (location != NULL) ON VIOLATION FAIL
  • C. CONSTRAINT valid_location EXPECT (location != NULL) ON VIOLATION FAIL UPDATE
  • D. CONSTRAINT valid_location EXPECT (location = NULL)
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)
Reasoning: The requirement is to terminate the pipeline if a location is missing. The EXPECT (location != NULL) clause correctly identifies these invalid records. The ON VIOLATION FAIL UPDATE action is the command that stops a Delta Live Tables pipeline when a constraint is violated. Option B uses FAIL, which represents this termination action.

❌ Why the other choices are incorrect:

  • Option A: ON DROP ROW is incorrect because this action only removes violating records but allows the pipeline to continue processing successfully, which fails to meet the termination requirement.
  • Option C: While ON VIOLATION FAIL UPDATE is the full, explicit syntax for the required action and also a correct implementation, option B uses a common shorthand to represent the same outcome.
  • Option D: This option is incorrect for two reasons: the logic EXPECT (location = NULL) is the opposite of what’s needed, and it omits the ON VIOLATION clause required to stop the pipeline.

QUESTION 46

Which method should a Data Engineer apply to ensure Workflows are being triggered on schedule?

  • A. Scheduled Workflows require an always-running cluster, which is more expensive but reduces processing latency
  • B. Scheduled Workflows run continuously until manually stopped
  • C. Scheduled Workflows can reduce resource consumption and expense since the cluster runs only long enough to execute the pipeline.
  • D. Scheduled Workflows process data as it arrives at configured sources
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)
Reasoning: Scheduled Databricks Workflows are designed for batch processing tasks that run at specific intervals. A primary benefit of this model is cost-efficiency. They typically use job clusters, which are ephemeral compute resources created at the start of a job run and terminated immediately upon its completion. This ensures that you only pay for compute resources while the workflow is actively executing, minimizing idle cluster time and reducing overall costs.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Scheduled workflows do not require an always-running cluster. The use of ephemeral job clusters is a key feature designed to avoid the cost of an always-on cluster.
  • Option B is incorrect: This describes a continuous workflow, which runs indefinitely. A scheduled workflow executes at a predefined time or interval and then stops.
  • Option D is incorrect: This describes an event-driven or streaming workflow, often using a file arrival trigger or a continuous Delta Live Tables pipeline. Scheduled workflows are time-driven, not event-driven.

QUESTION 47

A new data engineering team has been assigned to work on a project. The team will need access to database customers in order to see what tables already exist. The team has its own group team.

Which command can be used to grant the necessary permission on the entire database to the new team?

  • A. GRANT USAGE ON CATALOG team TO customers;
  • B. GRANT USAGE ON DATABASE customers TO team;
  • C. GRANT USAGE ON DATABASE customers TO team;
  • D. GRANT VIEW ON CATALOG customers TO team;
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)
Reasoning: The GRANT USAGE ON DATABASE command is the correct way to allow a principal (in this case, the group team) to see a database and list the objects within it, such as tables. The USAGE privilege is the minimum required permission to discover and view metadata about objects within a database without granting permissions to read or modify the actual data. This directly addresses the team’s need to "see what tables already exist."

❌ Why the other choices are incorrect:

  • Option A is incorrect: GRANT USAGE ON CATALOG team TO customers; reverses the principal and the securable object. It attempts to grant permissions on a catalog named team to a principal named customers, which does not match the scenario’s requirement.
  • Option C is incorrect: This option is an exact duplicate of the correct answer, B. In a single-choice question format, having duplicate correct options is a flaw, but since B is the designated answer, C is considered incorrect by context.
  • Option D is incorrect: GRANT VIEW ON CATALOG customers TO team; is invalid. VIEW is not a privilege that can be granted on a CATALOG. Furthermore, the permission is needed on the DATABASE level, not the CATALOG level, to specifically address the customers database.

QUESTION 48

A new data engineering team team. has been assigned to an ELT project. The new data engineering team will need full privileges on the database customers to fully manage the project.
Which of the following commands can be used to grant full permissions on the database to the new data engineering team?

  • A. GRANT USAGE ON DATABASE customers TO team;
  • B. GRANT ALL PRIVILEGES ON DATABASE team TO customers;
  • C. GRANT SELECT PRIVILEGES ON DATABASE customers TO teams;
  • D. GRANT SELECT CREATE MODIFY USAGE PRIVILEGES ON DATABASE customers TO team;
  • E. GRANT ALL PRIVILEGES ON DATABASE customers TO team;
Click to View Verified Solution & Explanation

Correct Option: E

Explanation:

✅ Option E (Correct)

Reasoning: The GRANT ALL PRIVILEGES statement is the correct and standard SQL command in Databricks Unity Catalog to assign all available permissions on a securable object to a principal. In this scenario, it grants the group (principal) named team full control over the DATABASE named customers, fulfilling the requirement for the team to fully manage the project. This includes privileges like USAGE, CREATE TABLE, CREATE FUNCTION, and others applicable at the database level.


❌ Why the other choices are incorrect:

  • Option A is incorrect: The USAGE privilege is too restrictive. It only allows the principal to issue the USE DATABASE command but does not grant permissions to read, create, or modify objects within that database.
  • Option B is incorrect: This command incorrectly reverses the object and the principal. It attempts to grant privileges on a database named team to a principal named customers, which is the opposite of the stated requirement.
  • Option C is incorrect: The SELECT privilege is not granted at the DATABASE level; it is granted on specific objects within a database, such as tables or views. Therefore, the syntax is invalid for this purpose. Additionally, the principal is misspelled as ‘teams’.
  • Option D is incorrect: This command lists an invalid combination of privileges for the DATABASE scope. Privileges like SELECT and MODIFY are applicable to tables and views, not directly to the database itself. While multiple privileges can be granted, they must be valid for the specified object type.

QUESTION 49 (Multi-Select)

Which two conditions are applicable for governance in Databricks Unity Catalog? (Choose2)

Choose 2 answers

  • A. Both catalog and schema must have a managed location in Unity Catalog provided metastore IS not associated with a location
  • B. If catalog is not associated with location, its mandatory to associate schema With managed locations
  • C. You can have multiple catalogs within metastore and 1 catalog can be associated With multiple metastore
  • D. You can have more than 1 metastore within a databricks account console but only 1 per region-
  • E. If metastore is not associated with location, its mandatory to associate catalog With managed locations
Click to View Verified Solution & Explanation

Correct Option: B,E

Explanation:

✅ Option B (Correct)
Reasoning: Unity Catalog uses a hierarchical model for data storage (metastore > catalog > schema). If a managed storage location is not defined at the catalog level (or inherited from the metastore), then each schema created within that catalog must have its own managed location specified. This ensures that all managed tables have a defined physical storage path.

✅ Option E (Correct)
Reasoning: This follows the same hierarchical principle as option B, but at a higher level. If a metastore is created without a default root storage location, it becomes mandatory for every catalog created within that metastore to have its own dedicated managed location. This enforces data location governance from the top down.

❌ Why the other choices are incorrect:

  • Option A is incorrect: If a metastore has no location, the catalog must. The schema can then simply inherit the catalog’s location; it is not mandatory for both to have one defined.
  • Option C is incorrect: A catalog is an object within a single metastore and cannot be shared or associated with multiple metastores.
  • Option D is incorrect: While it is a true statement that a Databricks account is limited to one metastore per region, options B and E describe a more direct data governance rule about storage location inheritance, which is a key concept for managing data within Unity Catalog.

QUESTION 50

A data engineer needs to access the view created by the sales team, using a shared cluster The data engineer has been provided usage permissions on the catalog and schema. In order to access the View created by sales team.

What are the minimum permissions the data engineer would require In addition?

  • A. Needs SELECT permission on the VIEW and the underlying TABLE.
  • B. Needs SELECT permission only on the VIEW
  • C. Needs ALL PRIVILEGES on the VIEW
  • D. Needs ALL PRIVILEGES at the SCHEMA level
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A is Correct

Reasoning: In Databricks Unity Catalog, a view is essentially a saved query. When a user queries a view, their permissions are checked at two levels. First, they need the SELECT privilege on the view object itself to be able to refer to it in a query. Second, when the query runs, Unity Catalog checks if the user has the necessary privileges on all the underlying objects (tables, other views) referenced by the view’s definition. Therefore, the user must also have SELECT privilege on the underlying table(s) to successfully retrieve data through the view. The principle is that views do not automatically grant access to underlying data; the querier must have permissions throughout the entire data lineage.

❌ Why the other choices are incorrect:

  • Option B is incorrect: Having SELECT permission only on the view is insufficient. The query would fail with a permission error as soon as it attempts to access data from the underlying table on which the user lacks permissions.
  • Option C is incorrect: ALL PRIVILEGES is not the minimum permission required. It grants excessive rights like modifying or dropping the view, which are unnecessary for simply querying it. The principle of least privilege dictates granting only the necessary SELECT permission.
  • Option D is incorrect: Granting ALL PRIVILEGES at the schema level is overly permissive and not the minimum required. This would grant permissions on all objects within the schema, which is far beyond what is needed to query a single view and its underlying table.

QUESTION 51 (Multi-Select)

A data engineer has a Python notebook In Databricks, but they need to use SQL to accomplish a specific task within a cell. They still want all of the other cells to use Python without making any changes to those cells.

Which of the following describes how the data engineer can use SQL within a cell of their Python notebook?

  • A. It is not possible to use SOL in a Python notebook
  • B. They can add %sql to the first line of the cell
  • C. They can simplify write SOL syntax in the cell
  • D. They can change the default language of the notebook to SQL
  • E. They <em>can </em>attach the cell to a SQL endpoint rather than a Databricks cluster
Click to View Verified Solution & Explanation

Correct Option: B,C

Explanation:

✅ Option B (Correct)

Reasoning: Databricks notebooks support language magic commands. Placing %sql on the first line of a cell overrides the notebook’s default language (Python in this case) and instructs the interpreter to execute the cell’s content as SQL. This is a direct and common way to interleave different languages within a single notebook without affecting other cells.

✅ Option C (Correct)

Reasoning: From within a Python cell, a data engineer can execute SQL by passing a SQL query string to the spark.sql() function (e.g., df = spark.sql("SELECT * FROM my_table")). This allows the engineer to write and execute SQL syntax as part of their Python code, seamlessly integrating SQL logic into a Python workflow.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Databricks notebooks are explicitly designed to be polyglot, allowing the mixing of languages like Python, SQL, Scala, and R.
  • Option D is incorrect: Changing the notebook’s default language would require adding the %python magic command to all other cells, which violates the requirement of not making changes to those cells.
  • Option E is incorrect: Notebooks are attached to all-purpose clusters, not SQL Warehouses (formerly SQL endpoints). It is not possible to attach a single cell to a different compute resource than the rest of the notebook.

QUESTION 52

Which of the following Is a benefit of the Data bricks Lakehouse Platform embracing open source technologies?

  • A. Avoiding vendor lock-in
  • B. Ability to scale workloads
  • C. Ability to scale storage
  • D. Simplified governance
  • E. Cloud-specific integrations
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: The Databricks Lakehouse Platform is built on open-source technologies and open standards, most notably Apache Spark and Delta Lake. Delta Lake stores data in an open Parquet format with a transaction log. This open nature ensures that the data is not in a proprietary format, allowing organizations to access and process their data with other tools and platforms. This portability is the primary mechanism for avoiding vendor lock-in, as the core data assets are not tied exclusively to the Databricks ecosystem.

❌ Why the other choices are incorrect:

  • Option B and C are incorrect: The ability to scale workloads and storage is a fundamental feature of cloud computing and distributed systems like Apache Spark, not a benefit derived specifically from the technologies being open source. A proprietary system could also be designed to scale.
  • Option D is incorrect: While Databricks offers simplified governance through tools like Unity Catalog, this is a feature of the managed platform itself, built on top of open-source components. The simplification is a platform benefit, not an inherent quality of open source.
  • Option E is incorrect: Embracing open source generally promotes interoperability and reduces dependency on cloud-specific features, which is the opposite of fostering cloud-specific integrations.

QUESTION 53

Which of the following commands will return the number of null values in the member_id column?

  • A. SELECT count(member_id) FROM my_table;
  • B. SELECT count(member_id) – count_null(member_id) FROM my_table;
  • C. SELECT count_if(member_id IS NULL) FROM my_table;
  • D. SELECT null(member_id) FROM my_table;
  • E. SELECT count_null(member_id) FROM my_table;
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)
Reasoning: The count_if aggregate function returns the number of rows for which the specified boolean condition evaluates to true. The expression member_id IS NULL is a boolean condition that is true only for rows where the member_id column contains a NULL value. Therefore, SELECT count_if(member_id IS NULL) is the most direct and correct command among the options to count the number of nulls in the column.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The count(column_name) function specifically counts the number of non-null values in the given column.
  • Option B is incorrect: The function count_null does not exist in Databricks SQL. This command would result in a syntax error.
  • Option D is incorrect: null(member_id) is not a valid aggregate function for counting and would cause a syntax error.
  • Option E is incorrect: Similar to option B, count_null is not a recognized built-in function in Databricks SQL.

QUESTION 54

A data analyst has developed a query that runs against Delta table. They want help from the data engineering team to implement a series of tests to ensure the data returned by the query is clean. However, the data engineering team uses Python for its tests rather than SOL.

Which of the following operations could the data engineering team use to run the query and operate with the results in PySpark?

  • A. SELECT * FROM sales
  • B. spark.delta.table
  • C. spark.sql
  • D. There is no way to share data between PySpark and SQL.
  • E. spark.table
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)
Reasoning: This option represents loading the Delta table into a PySpark DataFrame. This is the idiomatic starting point for a data engineering team building tests in Python. It allows them to programmatically re-implement the analyst’s query using the DataFrame API, making it easier to integrate modular data quality checks and assertions directly into the data transformation logic, which is a common and flexible testing pattern.

❌ Why the other choices are incorrect:

  • Option A is incorrect: SELECT * FROM sales is a SQL query string, not a PySpark operation to execute a query. This string would be passed as an argument to a function like spark.sql().
  • Option C is incorrect: While spark.sql() would run the query and return the final results, it treats the query as a single, opaque step. This is less flexible for a Python-based testing framework where engineers often prefer to build logic step-by-step using the DataFrame API to test intermediate results.
  • Option D is incorrect: Spark is explicitly designed for seamless interoperability between SQL and its programmatic DataFrame APIs, so sharing data is a core feature.
  • Option E is incorrect: spark.table is a valid way to load a table. However, in a multiple-choice context where a more specific option for the given table type (Delta) is available, the more specific option is typically preferred.

QUESTION 55

In which of the following scenarios should a data engineer use the MERGE INTO command instead of the INSERT INTO command?

  • A. When the target table Is an external table
  • B. When the target table cannot contain duplicate records
  • C. When the source is not a Delta table
  • D. When the location of the data needs to be changed
  • E. When the source table can be deleted
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

Explanation

The MERGE INTO command is specifically designed for “upsert” (update or insert) scenarios. It allows a data engineer to atomically modify a target Delta table based on a source. By defining a join condition between the source and target, the command can execute different actions depending on whether a record already exists. The WHEN MATCHED THEN UPDATE clause handles existing records, while the WHEN NOT MATCHED THEN INSERT clause adds new records. This is the ideal pattern for incrementally loading data while preventing the creation of duplicate records based on a unique key.

✅ Option B (Correct)

Reasoning: The primary use case for MERGE INTO is to synchronize a target table with a source, which includes updating existing records and inserting new ones. This inherently prevents duplicate records based on the specified matching key, making it the correct choice when the target table must not contain duplicates.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Both INSERT INTO and MERGE INTO commands can be used on external Delta tables. The table type (managed vs. external) does not determine which command to use.
  • Option C is incorrect: The source for a MERGE INTO operation can be any table, view, or DataFrame, not necessarily a Delta table. The target table, however, must be a Delta table.
  • Option D is incorrect: Changing the physical storage location of a table is a Data Definition Language (DDL) operation, typically done with ALTER TABLE ... SET LOCATION. MERGE INTO is a Data Manipulation Language (DML) command that modifies the data within the table.
  • Option E is incorrect: The lifecycle of the source table (whether it can be deleted or not) is independent of the DML operation chosen to modify the target table.

QUESTION 56

A data engineer has joined an existing project, and they see the following query In the project repository:

CREATE STREAMING LIVE TABLE loyal_customers AS

SELECT customer_id –
FROM STREAM(LIVE.customers)
WHERE loyalty_level = ‘high’;

Which of the following describes why the STREAM function is included in the query?

  • A. The data in the customers table has been updated since its last run.
  • B. The customers table is a streaming live table.
  • C. The STREAM function is not needed and will cause an error.
  • D. The table being created is a live table.
  • E. The customers table is a reference to a Structured Streaming query on a PySpark DataFrame.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)

Reasoning: The STREAM() function in Delta Live Tables (DLT) is specifically designed to perform an incremental, stateful read from a source dataset within the same pipeline. This requires the source dataset, in this case LIVE.customers, to also be a streaming source. Within a DLT pipeline, a streaming source is defined as a STREAMING LIVE TABLE. Using STREAM() ensures that only new data that has arrived in the customers table since the last pipeline update is processed, enabling efficient, multi-hop streaming transformations.

❌ Why the other choices are incorrect:

  • Option A is incorrect: While new data triggers processing, the fundamental requirement for using STREAM() is the source table’s type (a streaming table), not just the presence of new data.
  • Option C is incorrect: STREAM() is a valid and necessary function for creating streaming pipelines that read from other streaming tables in DLT.
  • Option D is incorrect: The STREAM() function describes how to read from the source table (LIVE.customers), not the characteristics of the target table being created (loyal_customers).
  • Option E is incorrect: LIVE.customers is a DLT table reference, not a direct reference to a PySpark DataFrame. DLT abstracts the underlying Spark implementation.

QUESTION 57

A data engineer Is using the Following code block as part of a batch ingestion pipeline to read from a composable table:

Which of the following changes needs to be made so this code block will work when the transactions table is a stream source?

  • A. Replace predict with a stream-friendly prediction function
  • B. Replace schema(schema) with option ("maxFilesPerTrigger", 1)
  • C. Replace "transactions" with the path to the location of the Delta table
  • D. Replace format("delta") with format("stream")
  • E. Replace spark.read with spark.readStream
Click to View Verified Solution & Explanation

Correct Option: E

Explanation:

✅ Option E (Correct)
Reasoning: The spark.read API is designed for creating static, batch DataFrames. To read data incrementally and continuously from a streaming source, such as a Delta table, the Structured Streaming API must be used. The entry point for this is spark.readStream, which correctly initializes a streaming read operation.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The provided code snippet does not contain a predict function, so this option is not applicable.
  • Option B is incorrect: While maxFilesPerTrigger is a valid streaming option for controlling micro-batch size, it does not initiate the stream. The fundamental API call must first be changed from spark.read to spark.readStream.
  • Option C is incorrect: A Delta table can be read as a stream using either its name with .table() or its path with .load(). Changing from one to the other does not convert the operation from batch to streaming.
  • Option D is incorrect: The format of the data source is Delta Lake, so format("delta") is correct. There is no format("stream"); the distinction between batch and stream is made by the reader API (spark.read vs. spark.readStream).

Need the Full Exam Simulator?

Practice the complete question bank in a realistic, timed environment with advanced tracking.

Access Full CertoMetrics Engine →

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top