Databricks Certified Data Engineer Associate

Question bank

Databricks logo

Databricks Certified Data Engineer Associate

PR000054

43 Databricks Certified Data Engineer Associate questions with the correct answer and a written explanation, organised across 7 exam domains.

43 questions
7 domains
Foundation level

Question index

Jump straight to any question. Answers and explanations are inline.

Data Ingestion and Loading

8 questions in this domain

  1. Question 1Single Choice

    Which cloud storage URI format is correct for Azure Data Lake Storage Gen2?

    • Awasbs://container@storage.blob.core.windows.net/path
    • Babfss://container@storage.dfs.core.windows.net/pathCorrect answer
    • Cazure://container@storage.dfs.core.windows.net/path
    • Dhttps://storageaccount.blob.core.windows.net/path

    Why this is the answer

    The correct URI for ADLS Gen2 is abfss://, which uses the Azure Blob File System driver.

  2. Question 2Multiple Select

    Which of the following file formats are natively supported by Auto Loader?

    • ACSVCorrect answer
    • BParquetCorrect answer
    • CExcel
    • DJSONCorrect answer

    Why this is the answer

    Auto Loader supports CSV, Parquet, JSON, Avro, ORC, and text files. Excel is not supported natively.

  3. Question 3Interactive

    Based on the provided Auto Loader code, what is the purpose of the 'cloudFiles.schemaLocation' option?

    • ASpecifies where ingested data is written
    • BStores inferred schema for evolutionCorrect answer
    • CSets the checkpoint location for fault tolerance
    • DDefines the cloud storage URI

    Why this is the answer

    The schemaLocation stores the inferred schema persistently, enabling schema evolution across multiple batches.

  4. Question 4Single Choice

    Which of the following is the recommended approach for incremental file ingestion in Databricks?

    • ASpark Structured Streaming
    • BAuto Loader (cloudFiles)Correct answer
    • CCOPY INTO
    • Ddbutils.fs.ls()

    Why this is the answer

    Auto Loader (cloudFiles) is purpose-built for incremental file ingestion, handling schema evolution and exactly-once semantics.

  5. Question 5Multiple Select

    Which of the following are valid output modes for Structured Streaming?

    • AappendCorrect answer
    • BcompleteCorrect answer
    • Coverwrite
    • DupdateCorrect answer

    Why this is the answer

    Structured Streaming supports append, complete, and update output modes. Overwrite is a batch-mode option.

  6. Question 6Interactive

    In the JDBC read code, if the 'id' column is of type VARCHAR, what will happen when the query is executed?

    • ARuns successfully with 10 partitions
    • BFails because partitionColumn must be numeric, date, or timestampCorrect answer
    • CIgnores partitionColumn and uses single partition
    • DConverts VARCHAR to integer automatically

    Why this is the answer

    partitionColumn requires an integer, date, or timestamp column to split ranges; a string column causes an error.

  7. Question 7Single Choice

    What is the default behavior of Delta Lake when writing a DataFrame with a schema that does not match the target table?

    • AAutomatically merges schemas
    • BFails with an AnalysisExceptionCorrect answer
    • COverwrites the table schema
    • DReorders columns to match

    Why this is the answer

    Delta Lake enforces strict schema match by default; mismatches cause a write failure unless mergeSchema is enabled.

  8. Question 8Multiple Select

    Which of the following are benefits of using Auto Loader over standard batch reads?

    • AAutomatic file discovery for new filesCorrect answer
    • BBuilt-in schema evolutionCorrect answer
    • CRequires less cloud storage permissions
    • DExactly-once processing with checkpointingCorrect answer

    Why this is the answer

    Auto Loader automatically discovers new files, supports schema evolution, and provides exactly-once guarantees via checkpointing.

Data Transformation and Modeling

9 questions in this domain

  1. Question 9Single Choice

    What is the primary purpose of the Delta transaction log?

    • AStore data files
    • BRecord metadata and enable ACID transactionsCorrect answer
    • CProvide schema inference
    • DManage cluster resources

    Why this is the answer

    The transaction log records every change, enabling ACID transactions and time travel.

  2. Question 10Multiple Select

    Which statements are true about managed Delta tables in Databricks? (Select two)

    • AData is stored in a user-specified location
    • BDropping the table deletes the underlying dataCorrect answer
    • CThey can be shared across workspaces without additional configuration
    • DThey are created using CREATE TABLE without LOCATIONCorrect answer

    Why this is the answer

    Managed tables store data in the default DBFS location and dropping removes data. They do not specify a LOCATION.

  3. Question 11Interactive

    Given a Delta table with many small files, which command should be run to improve read performance?

    • AVACUUM
    • BOPTIMIZECorrect answer
    • CMERGE
    • DDESCRIBE HISTORY

    Why this is the answer

    OPTIMIZE compacts small files into larger ones, improving scan performance.

  4. Question 12Single Choice

    What happens when you try to write data with a mismatched schema to a Delta table?

    • AThe write failsCorrect answer
    • BThe schema is automatically evolved
    • CThe data is stored in a separate table
    • DThe write succeeds with nulls

    Why this is the answer

    Delta Lake enforces schema on write by default; mismatched columns cause failure.

  5. Question 13Multiple Select

    Which Delta Live Tables expectation actions will drop failing rows without causing pipeline failure? (Select two)

    • Aexpect_or_fail
    • Bexpect_or_dropCorrect answer
    • Cexpect
    • Dexpect_all

    Why this is the answer

    expect_or_drop silently drops failing rows; expect_all applies multiple rules but does not drop on its own.

  6. Question 14Interactive

    You have a Delta table queried with filters on date and region. Which column would be most effective for partitioning to improve query performance?

    • Auser_id
    • BdateCorrect answer
    • Cregion
    • Damount

    Why this is the answer

    Partitioning on low-cardinality columns used in filters, like date, improves query pruning.

  7. Question 15Single Choice

    How long are Delta table transaction log records retained by default for time travel?

    • A30 days
    • B7 daysCorrect answer
    • C1 day
    • DForever

    Why this is the answer

    The default retention duration for Delta transaction log is 7 days.

  8. Question 16Multiple Select

    Which statements are true about PySpark DataFrames? (Select two)

    • ATransformations are executed immediately
    • BCreating a DataFrame reads all data into memory
    • CBuilt-in functions are generally more efficient than Python UDFsCorrect answer
    • DDataFrames are immutableCorrect answer

    Why this is the answer

    PySpark DataFrames are immutable and transformations are lazy. Built-in functions run in optimized JVM code.

  9. Question 17Interactive

    In SCD Type 2, what does the UPDATE clause in this MERGE statement accomplish?

    • AIt updates the current row's attribute values in place
    • BIt sets is_current to false to expire the current rowCorrect answer
    • CIt inserts a new row for the change
    • DIt deletes the old row

    Why this is the answer

    In SCD Type 2, the existing row is marked as expired (is_current = false) before inserting a new version.

Databricks Intelligence Platform

3 questions in this domain

  1. Question 18Single Choice

    What is the primary purpose of the workspace root storage in a Databricks workspace?

    • ATo store production data tables and analytics results
    • BTo serve as the default location for DBFS, cluster logs, and system tablesCorrect answer
    • CTo host Unity Catalog metadata and permission definitions
    • DTo provide a globally accessible bucket shared across all workspaces

    Why this is the answer

    The workspace root storage is an initial cloud storage bucket automatically created during workspace provisioning. It is used for DBFS, cluster logs, and system tables, but it is not intended for production data. Best practice is to use external locations governed by Unity Catalog for production workloads.

  2. Question 19Multiple Select

    Which two of the following authentication methods can be used to set up the Databricks command line interface?

    • APersonal Access Token (PAT) generated from the workspaceCorrect answer
    • BEnvironment variables DATABRICKS_HOST and DATABRICKS_TOKENCorrect answer
    • CUsing the workspace root storage credential
    • DUsing the cluster’s IAM role attached to the workspace

    Why this is the answer

    The Databricks CLI can be authenticated using a personal access token (PAT) or environment variables (DATABRICKS_HOST and DATABRICKS_TOKEN). Workspace root storage credentials and cluster IAM roles are not used for CLI authentication. This is covered in the section on navigating the UI and using the CLI.

  3. Question 20Interactive

    What happens when you execute the following Databricks CLI command?

    • AIt creates a new job definition with ID 123
    • BIt triggers an immediate run of the existing job with ID 123Correct answer
    • CIt lists all runs associated with job ID 123
    • DIt submits a one-time job without saving a definition

    Why this is the answer

    The command 'databricks jobs run-now --job-id 123' triggers an existing job (defined with ID 123) to start a run immediately. It does not create a new job, list runs, or submit a one-time job. The 'run-now' command is used to execute a job on demand.

Governance and Security

7 questions in this domain

  1. Question 21Single Choice

    What is the top-level container in Unity Catalog's three-level namespace?

    • AMetastoreCorrect answer
    • BCatalog
    • CSchema
    • DTable

    Why this is the answer

    A metastore is the top-level container for metadata in Unity Catalog, housing catalogs, schemas, and tables.

  2. Question 22Multiple Select

    Which of the following are valid Unity Catalog privileges?

    • ASELECTCorrect answer
    • BMODIFYCorrect answer
    • CUSAGECorrect answer
    • DOWNERSHIP

    Why this is the answer

    SELECT, MODIFY, and USAGE are standard Unity Catalog privileges; OWNERSHIP is a special authority that cannot be granted.

  3. Question 23Interactive

    Which SQL command correctly grants SELECT on the table 'sales' to the group 'analysts'?

    • AGRANT SELECT ON TABLE sales TO analysts;Correct answer
    • BGRANT SELECT ON sales TO analysts;
    • CALLOW SELECT ON sales TO analysts;
    • DGRANT READ ON TABLE sales TO analysts;

    Why this is the answer

    The correct syntax uses GRANT SELECT ON TABLE followed by the table name and TO with the principal.

  4. Question 24Single Choice

    Which privilege is needed to see a schema's existence without accessing its data?

    • ASELECT
    • BUSAGECorrect answer
    • CMODIFY
    • DCREATE

    Why this is the answer

    USAGE on a schema permits listing its objects but not reading data; SELECT is needed for data access.

  5. Question 25Multiple Select

    Which statements about Unity Catalog tags are true?

    • ATags can be applied at catalog, schema, table, and column levels.Correct answer
    • BTags propagate automatically from a catalog to all child objects.
    • CTags can be referenced by attribute-based access control (ABAC) policies.Correct answer
    • DTable tags are set using the ALTER TABLE command with SET TAGS.Correct answer

    Why this is the answer

    Tags are scoped per object (no inheritance), usable in ABAC, and managed via ALTER TABLE ... SET TAGS.

  6. Question 26Interactive

    Which SQL syntax correctly sets a tag on a table?

    • AALTER TABLE sales SET TAGS ('sensitivity' = 'high');Correct answer
    • BALTER TABLE sales SET TAG ('sensitivity' = 'high');
    • CALTER TABLE sales ADD TAGS ('sensitivity' = 'high');
    • DALTER TABLE sales UPDATE TAGS ('sensitivity' = 'high');

    Why this is the answer

    The correct syntax uses SET TAGS with a comma-separated list of key=value pairs inside parentheses.

  7. Question 27Single Choice

    Who can access the workspace audit logs?

    • AAll workspace users
    • BWorkspace Admin onlyCorrect answer
    • CMetastore Admin only
    • DBoth Workspace Admin and Metastore Admin

    Why this is the answer

    Audit logs are accessible only to Workspace Admins for security; other roles require explicit privileges.

Implementing CI/CD

5 questions in this domain

  1. Question 28Single Choice

    What is the primary purpose of integrating Git with Databricks?

    • ATo enable collaboration, reproducibility, and automated deploymentsCorrect answer
    • BTo store notebooks directly in DBFS for easy sharing
    • CTo schedule jobs without any manual intervention
    • DTo import data from external sources into the workspace

    Why this is the answer

    Git integration enables collaboration, reproducibility, and automation, which are essential for CI/CD pipelines.

  2. Question 29Multiple Select

    Which two actions are required to update a remote Git repository from a Databricks Repo?

    • ACommit the changes locallyCorrect answer
    • BPush the committed changesCorrect answer
    • CPull the latest changes from remote
    • DCreate a pull request on the remote provider

    Why this is the answer

    To update the remote repository, you must first commit locally, then push. Pulling only fetches updates; PRs are for merging branches.

  3. Question 30Interactive

    What does the command 'databricks bundle deploy -t prod' achieve?

    • AIt deploys the bundle artifacts and configures resources in the production workspaceCorrect answer
    • BIt validates the bundle YAML syntax without connecting to a workspace
    • CIt runs the job defined in the bundle immediately
    • DIt destroys all resources that were previously deployed by the bundle

    Why this is the answer

    The 'deploy' command uploads artifacts and creates or updates Databricks resources in the specified target environment.

  4. Question 31Single Choice

    Which authentication method is recommended for automating Databricks deployments in CI/CD?

    • AService principal tokenCorrect answer
    • BPersonal user password
    • CWorkspace admin credentials
    • DSSH key pair for the cluster

    Why this is the answer

    Service principal tokens are not tied to a user, making them secure and ideal for automated pipelines.

  5. Question 32Multiple Select

    Which two features are true about Databricks Asset Bundles?

    • AThey use a declarative YAML file called databricks.ymlCorrect answer
    • BThey support environment-specific variables through targetsCorrect answer
    • CThey execute notebooks during the deployment process
    • DThey require manual resource creation in the workspace after each commit

    Why this is the answer

    DABs are declarative IaC with a YAML manifest and support parameterized targets. They do not execute code at deploy time.

Troubleshooting, Monitoring, and Optimization

4 questions in this domain

  1. Question 33Single Choice

    In the context of analyzing Spark performance, what kind of information does the Spark UI provide real-time visibility into?

    • AOnly driver logs and environmental configurations
    • BJob, stage, and task execution detailsCorrect answer
    • COnly storage memory and cache metrics
    • DOnly SQL query plans and DAG visualization

    Why this is the answer

    The Spark UI provides real-time visibility into jobs, stages, tasks, storage, SQL execution, and environment configuration.

  2. Question 34Multiple Select

    Which two statements correctly describe benefits of Z-order clustering on Delta tables?

    • AIt reduces the amount of data scanned via data skippingCorrect answer
    • BIt completely replaces the need for table partitioning
    • CIt colocates correlated data values within the same filesCorrect answer
    • DIt automatically runs VACUUM to remove old files after optimization

    Why this is the answer

    Z-order clustering improves data skipping and colocates similar values in files. Partitioning remains beneficial and VACUUM must be run separately.

  3. Question 35Interactive

    Examine the code below. What is the purpose of adding the 'salt' column in this data skew mitigation technique?

    • ATo increase the total number of shuffle partitions
    • BTo artificially distribute skewed keys across more partitionsCorrect answer
    • CTo reduce the number of shuffle partitions
    • DTo enable the broadcast join optimization

    Why this is the answer

    Adding a random salt to skewed join keys allows data to be distributed more evenly across partitions, mitigating skew.

  4. Question 36Single Choice

    When a job fails with a 'CLUSTER_UNAVAILABLE' error, which log source should you first examine to diagnose the issue?

    • ADriver logs
    • BWorker logs (executor stderr)
    • CCluster event logsCorrect answer
    • DSpark UI stages tab

    Why this is the answer

    Cluster event logs capture infrastructure errors such as cluster unavailability or resource exhaustion, making them the first source for such failures.

Working with Lakeflow Jobs

7 questions in this domain

  1. Question 37Single Choice

    What is the recommended cluster type for running production jobs in Databricks to ensure isolation and cost efficiency?

    • AAll-purpose cluster
    • BJob clusterCorrect answer
    • CHigh-concurrency cluster
    • DInteractive cluster

    Why this is the answer

    Job clusters are ephemeral, isolated, and auto-terminated, making them cost-effective and secure for production jobs. All-purpose clusters are shared and incur idle costs.

  2. Question 38Multiple Select

    Which two statements correctly describe job triggers in Databricks?

    • AScheduled jobs use cron expressions and always run regardless of previous outcomes.Correct answer
    • BEvent-driven triggers can be configured for file arrival or Delta table updates.Correct answer
    • CConcurrent runs are enabled by default for scheduled jobs.
    • DManual triggers require a valid cron expression.

    Why this is the answer

    Cron triggers are stateless (correct). Event-driven triggers support file arrival/Delta table (correct). Concurrent runs are disabled by default. Manual triggers do not use cron.

  3. Question 39Interactive

    The following JSON represents a Databricks job definition. What is missing to ensure the job retries twice on failure?

    • AAdd 'max_retries': 2 to the task definition.Correct answer
    • BAdd 'retry_policy': {'max_retries': 2} to the job level.
    • CAdd 'timeout_seconds': 3600 to limit execution time.
    • DAdd 'schedule': {'quartz_cron_expression': '0 0 */2 * * ?'} to run every 2 hours.

    Why this is the answer

    The field 'max_retries' specifies the number of retry attempts. The default is 0; setting it to 2 enables two retries.

  4. Question 40Single Choice

    What is the purpose of a job cluster's 'autotermination_minutes' setting?

    • AIt sets the maximum run time of the job.
    • BIt defines the idle time before the cluster is automatically terminated.Correct answer
    • CIt determines the interval between retries.
    • DIt configures the time zone for the job schedule.

    Why this is the answer

    Autotermination_minutes specifies how long a job cluster stays alive after the last activity before being shut down to save costs.

  5. Question 41Multiple Select

    Which two options are valid destinations for job notifications in Databricks?

    • AEmailCorrect answer
    • BSMTP Relay
    • CWebhookCorrect answer
    • DDatabricks CLI

    Why this is the answer

    Email and webhook are directly configurable in job notifications. SMTP Relay is not a configurable destination; Databricks provides built-in email relay.

  6. Question 42Interactive

    In the following sample notebook command, what is missing to read a job parameter named 'source_path'?

    • ADefine the widget using dbutils.widgets.text("source_path", "") before retrieving the parameter.Correct answer
    • BThe code is correct; no changes are needed.
    • CReplace dbutils.job.taskValues with dbutils.widgets.get.
    • DSet 'source_path' as a Spark configuration property.

    Why this is the answer

    The widget must be defined using 'dbutils.widgets.text' before calling 'get', otherwise the parameter is not recognized. This is the standard way to parameterize notebooks.

  7. Question 43Single Choice

    What is the default number of retries for a task in a Databricks job if not explicitly configured?

    • A0Correct answer
    • B3
    • C10
    • D5

    Why this is the answer

    The default retry count is 0, meaning no automatic retries are performed unless explicitly configured.

Frequently asked questions

Everything about the Databricks Certified Data Engineer Associate question bank and how to use it.