Databricks Data Analyst study materials
Databricks Data Analyst study resources

Databricks Data Analyst practice questions

One question at a time. Build your Databricks Data Analyst understanding.

First 50 of 199 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1Understanding of Databricks Data + AI Platform

What does Delta Lake add on top of Parquet data files that enables ACID transactions?

  1. Row-level indexes stored in every data file
  2. A transaction log that records each commit Correct answer.
  3. Encryption keys embedded in each file footer
  4. A proprietary binary columnar format

Explanation

Delta Lake keeps table data in Parquet files and records every commit as an ordered set of JSON entries in the _delta_log directory. That log is the source of truth for the table state, so writes either commit fully or not at all, and readers see a consistent snapshot.

Question 2Understanding of Databricks Data + AI Platform

Which naming hierarchy does Unity Catalog use to address a table?

  1. catalog.schema.table Correct answer.
  2. metastore.schema.table
  3. schema.catalog.table
  4. workspace.catalog.table

Explanation

Unity Catalog organizes objects as a three-level namespace of catalog, then schema, then table or view, for example main.sales.orders. The metastore is the top-level container that holds catalogs but is not part of the object name.

Question 3Understanding of Databricks Data + AI Platform

A BI tool needs to run many concurrent SQL queries against tables in Unity Catalog. Which compute resource is purpose-built for this?

  1. A job cluster
  2. A single-node machine learning cluster
  3. An all-purpose cluster with autoscaling
  4. A SQL warehouse Correct answer.

Explanation

SQL warehouses are compute resources configured and tuned for SQL workloads, including high-concurrency serving of dashboards and BI tools. They speak the SQL warehouse protocol and can scale for many simultaneous short queries.

Question 4Understanding of Databricks Data + AI Platform

In the medallion architecture, which layer typically holds raw data exactly as it was ingested?

  1. Silver
  2. Bronze Correct answer.
  3. Gold
  4. Platinum

Explanation

The bronze layer stores raw ingested data with minimal transformation, preserving the source record and often adding ingestion metadata. Silver then cleanses and conforms the data, and gold holds business-level aggregates for reporting.

Question 5Understanding of Databricks Data + AI Platform

A Delta table named sales has several versions. Which clause returns the table as it existed at version 3?

  1. SNAPSHOT AS OF 3
  2. HISTORY VERSION 3
  3. TIMESTAMP VERSION 3
  4. VERSION AS OF 3 Correct answer.

Explanation

Delta time travel uses VERSION AS OF for a version number and TIMESTAMP AS OF for a commit timestamp, appended to the table reference in a query. The statement reads the table snapshot as of that commit rather than the current state.

Question 6Understanding of Databricks Data + AI Platform

A scheduled pipeline must create compute when the run starts and release it when the run ends, with no interactive reuse. Which compute type fits?

  1. A SQL warehouse
  2. An all-purpose cluster
  3. A job cluster Correct answer.
  4. A notebook-scoped cluster

Explanation

Job clusters are created for a single job run and terminated when it finishes, which avoids paying for idle interactive compute. All-purpose clusters persist for interactive work by multiple users.

Question 7Understanding of Databricks Data + AI Platform

In a Databricks notebook, what does the %run magic command do?

  1. Imports and runs another notebook inline Correct answer.
  2. Restarts the attached all-purpose cluster
  3. Runs only the currently selected cell
  4. Schedules the notebook as a recurring job

Explanation

The %run magic executes another notebook inside the current one, so functions and variables defined there become available to the calling notebook. It is commonly used to factor shared logic into a helper notebook.

Question 8Understanding of Databricks Data + AI Platform

An analyst creates a table in Unity Catalog without specifying a LOCATION. What is true of that table?

  1. It is readable only by its creator
  2. It cannot be dropped until it is empty
  3. It is managed by Unity Catalog Correct answer.
  4. It is stored externally at a path you must supply

Explanation

When no location is given, Unity Catalog creates a managed table and stores its files in the managed storage location of the parent schema. Dropping the table removes the metadata and the managed data files according to retention rules.

Question 9Understanding of Databricks Data + AI Platform

What does Unity Catalog lineage record for a table?

  1. Git commit history for workspace notebooks
  2. Only the SQL text run on SQL warehouses
  3. Column-level links between sources and targets Correct answer.
  4. Cluster resize events over time

Explanation

Unity Catalog captures lineage automatically for supported languages and records relationships at both the table and column level across notebooks, jobs, and SQL queries. Lineage is surfaced in Catalog Explorer so impact analysis can be done before changing an upstream object.

Question 10Understanding of Databricks Data + AI Platform

A Delta table has accumulated a large number of small files. Which command compacts them into fewer, larger files?

  1. ANALYZE TABLE table COMPUTE STATISTICS
  2. FSCK REPAIR TABLE table
  3. VACUUM table RETAIN 0 HOURS
  4. OPTIMIZE table Correct answer.

Explanation

OPTIMIZE rewrites small files into larger ones to reduce per-file overhead during reads. It can optionally apply clustering or Z-ordering, and VACUUM is run afterwards to remove files that are no longer referenced.

Question 11Understanding of Databricks Data + AI Platform

Which feature incrementally ingests newly arriving files from cloud storage into a Delta table using directory listing or file notifications?

  1. Auto Loader (cloudFiles) Correct answer.
  2. COPY INTO with a full re-read
  3. Delta Sharing
  4. VACUUM

Explanation

Auto Loader tracks which files have already been processed and picks up only new ones, using either directory listing or cloud file notification services. It scales to large numbers of files and can infer and evolve the schema.

Question 12Understanding of Databricks Data + AI Platform

In a Lakeflow Declarative Pipeline, an EXPECT clause is defined with ON VIOLATION DROP ROW. What happens to records that fail the constraint?

  1. It fails the pipeline on the first bad record
  2. It writes failing rows to a quarantine table
  3. It drops failing rows and logs violation metrics Correct answer.
  4. It keeps all rows and logs the violations

Explanation

Expectations are data quality constraints checked as data flows through the pipeline. With ON VIOLATION DROP ROW, records that violate the constraint are discarded and metrics for passed and dropped records are recorded for monitoring.

Question 13Understanding of Databricks Data + AI Platform

A team needs a pipeline to run every hour, retry on failure, and notify owners when it finishes. What should they use?

  1. A Delta Live Tables expectation
  2. A scheduled Databricks job Correct answer.
  3. A dashboard refresh schedule
  4. A notebook run manually each hour

Explanation

Databricks jobs provide scheduling, automatic retries, notifications, and dependency orchestration across tasks. A job can run notebooks, SQL, pipelines, and other tasks with parameters and monitoring.

Question 14Understanding of Databricks Data + AI Platform

What is the primary purpose of Delta Sharing?

  1. Secure sharing without copying the data Correct answer.
  2. Replicating tables to a second cloud region
  3. Sharing clusters between workspaces
  4. Archiving old files to cheaper storage

Explanation

Delta Sharing is an open protocol that lets a provider grant recipients access to live data without copying it, with governance enforced by the provider. Recipients can be in other organizations or on other platforms that support the protocol.

Question 15Understanding of Databricks Data + AI Platform

Which Databricks SQL feature sends a notification when a saved query's result crosses a threshold?

  1. A dashboard parameter
  2. A scheduled query
  3. A cluster policy
  4. An alert Correct answer.

Explanation

Alerts evaluate a saved query on a schedule and notify configured destinations when a condition on the result is met. Scheduled queries only refresh results, and parameters change what a dashboard displays.

Question 16Understanding of Databricks Data + AI Platform

What is Photon?

  1. A notebook execution scheduler
  2. A governance layer for Unity Catalog
  3. A vectorized query execution engine Correct answer.
  4. A storage format optimized for Delta tables

Explanation

Photon is a vectorized query engine written in C++ that accelerates SQL and DataFrame workloads on Databricks compute. It works with Delta Lake tables and requires no changes to queries to take advantage of it.

Question 17Understanding of Databricks Data + AI Platform

A team must store and read raw PDF documents from notebooks while keeping access governed in Unity Catalog. Which object should they use?

  1. A Unity Catalog volume Correct answer.
  2. A dashboard
  3. A managed Delta table
  4. A secret scope

Explanation

Volumes are Unity Catalog objects that govern non-tabular files such as documents, images, and binaries, with privileges granted like tables. Files in a volume can be read from notebooks and jobs using normal file paths.

Question 18Understanding of Databricks Data + AI Platform

Which statement describes serverless compute in Databricks?

  1. Tables it writes live outside Unity Catalog
  2. It supports only Scala notebooks
  3. Databricks handles provisioning and sizing Correct answer.
  4. You choose the instance type and autoscaling range

Explanation

With serverless compute, Databricks provisions and sizes the resources, so users submit work without configuring clusters. Resources start quickly and shut down when the work completes, and Unity Catalog governance still applies to any tables produced.

Question 19Understanding of Databricks Data + AI Platform

Which statement about liquid clustering in Delta Lake is correct?

  1. Keys are fixed at creation and cannot change
  2. It replaces the transaction log with an index
  3. The table must be partitioned on the same columns
  4. Keys can be changed later without a rewrite Correct answer.

Explanation

Liquid clustering stores clustering decisions in the transaction log, so clustering keys can be redefined on an existing table instead of requiring a full rewrite as partitioning does. OPTIMIZE then clusters the data incrementally as new data arrives.

Question 20Understanding of Databricks Data + AI Platform

Which set of privileges lets a user read a table governed by Unity Catalog?

  1. SELECT granted on the catalog, which cascades
  2. SELECT on the table alone
  3. OWN on the schema, with nothing else
  4. USE CATALOG, USE SCHEMA, and SELECT on the table Correct answer.

Explanation

Unity Catalog requires both traversal privileges on parent objects and the object-level privilege. A user needs USE CATALOG on the catalog, USE SCHEMA on the schema, and SELECT on the table, because table privileges are not inherited from schema-level grants.

Question 21Understanding of Databricks Data + AI Platform

In Lakeflow Declarative Pipelines, how is a streaming table updated when the pipeline runs?

  1. It appends only new source rows on each run Correct answer.
  2. It recomputes the full result each run
  3. It refreshes only on a manual REFRESH
  4. It requires a static file source

Explanation

Streaming tables process each source row once and append results incrementally, so each run consumes only data that has not been seen before. Materialized views, by contrast, recompute their full result from the underlying sources on refresh.

Question 22Understanding of Databricks Data + AI Platform

What do deletion vectors in Delta Lake enable?

  1. They delete rows and remove files immediately
  2. They mark deleted rows so files need not be rewritten Correct answer.
  3. They store old file versions for time travel
  4. They duplicate rows across clusters for redundancy

Explanation

Deletion vectors record which rows are logically deleted in a side structure instead of rewriting whole Parquet files. This makes DELETE, UPDATE, and MERGE operations cheaper, though readers must support deletion vectors to read such tables correctly.

Question 23Managing Data

In Unity Catalog, which sequence correctly identifies a table by its fully qualified three-level name?

  1. table.schema.catalog
  2. catalog.table.schema
  3. schema.catalog.table
  4. catalog.schema.table Correct answer.

Explanation

Unity Catalog organizes objects in a three-level hierarchy: catalog at the top, then schema (database), then the table or view. A fully qualified reference therefore reads catalog.schema.table, for example main.sales.orders. Swapping any two levels does not resolve to a valid object path.

Question 24Managing Data

Which statement creates a new table and populates it with the rows returned by a query in a single command?

  1. CREATE VIEW sales.orders AS SELECT * FROM staging.orders;
  2. CREATE TABLE sales.orders AS SELECT * FROM staging.orders; Correct answer.
  3. COPY INTO sales.orders FROM 's3://bucket/orders' FILEFORMAT = CSV;
  4. INSERT INTO sales.orders SELECT * FROM staging.orders;

Explanation

CREATE TABLE ... AS SELECT (CTAS) defines a new table and materializes the query result into it in one step, with column types inferred from the query. INSERT only adds rows to a table that already exists, and a view stores no data of its own. COPY INTO loads files from a path rather than from a query.

Question 25Managing Data

Which statement creates a schema named sales inside the catalog main and succeeds even if that schema already exists?

  1. CREATE SCHEMA IF NOT EXISTS main.sales; Correct answer.
  2. CREATE TABLE IF NOT EXISTS main.sales;
  3. CREATE DATABASE sales IN main;
  4. CREATE CATALOG IF NOT EXISTS main.sales;

Explanation

CREATE SCHEMA creates a schema and accepts the two-part parent path catalog.schema, and the IF NOT EXISTS clause makes the statement a no-op when the schema is already present. CREATE CATALOG would create a catalog rather than a schema. CREATE DATABASE without a catalog qualifier does not target main.sales explicitly.

Question 26Managing Data

Which command lists the tables defined in the schema main.sales?

  1. DESCRIBE TABLES main.sales;
  2. SELECT * FROM INFORMATION_SCHEMA.TABLES;
  3. SHOW TABLES IN main.sales; Correct answer.
  4. LIST TABLES OF main.sales;

Explanation

SHOW TABLES IN <schema> returns the tables and views belonging to that schema. DESCRIBE TABLE describes the columns of one specific table rather than listing a schema's contents. A query against INFORMATION_SCHEMA.TABLES is a valid inventory approach but the catalog-wide view requires a filter to be limited to main.sales.

Question 27Managing Data

Which statement attaches the description 'Cleaned order lines' to an existing table without altering its data?

  1. UPDATE main.sales.orders SET comment = 'Cleaned order lines';
  2. COMMENT ON TABLE main.sales.orders IS 'Cleaned order lines'; Correct answer.
  3. CREATE COMMENT 'Cleaned order lines' ON main.sales.orders;
  4. ALTER TABLE main.sales.orders SET DESCRIPTION 'Cleaned order lines';

Explanation

COMMENT ON TABLE sets the table's description metadata, which is visible in Catalog Explorer and in DESCRIBE TABLE output without touching any rows. Metadata changes are made with COMMENT or ALTER TABLE ... SET TBLPROPERTIES, never with UPDATE. There is no CREATE COMMENT statement in Databricks SQL.

Question 28Managing Data

A table was created in Unity Catalog with no LOCATION clause, making it a managed table. What happens to its underlying data files when the table is dropped?

  1. They are moved automatically into the catalog's default managed volume.
  2. They stay in cloud storage indefinitely and keep counting toward storage costs.
  3. They remain in place and must be deleted separately by an administrator.
  4. They are deleted, but the table can be restored within a retention window. Correct answer.

Explanation

For managed tables, Databricks owns both the metadata and the storage location, so dropping the table also removes the data files. Unity Catalog keeps the dropped table recoverable for a limited retention period so that UNDROP TABLE can restore it. External tables behave differently, because their files live at a user-specified path that Databricks does not delete.

Question 29Managing Data

Which statement grants the SELECT privilege on a table to the group analysts?

  1. GRANT `analysts` SELECT ON main.sales.orders;
  2. ASSIGN SELECT ON main.sales.orders TO GROUP `analysts`;
  3. ALLOW SELECT ON TABLE main.sales.orders TO `analysts`;
  4. GRANT SELECT ON TABLE main.sales.orders TO `analysts`; Correct answer.

Explanation

The GRANT statement takes the privilege, the securable with its type, and the recipient: GRANT SELECT ON TABLE <name> TO <principal>. Group names containing no special characters may be backtick-quoted. ALLOW and ASSIGN are not Databricks privilege statements.

Question 30Managing Data

An analyst wants to create an external table whose data already sits at a cloud path such as s3://corp-finance/raw/. Which Unity Catalog object must cover that path before the table can be created?

  1. A managed volume mounted on the path
  2. A catalog whose name matches the bucket name
  3. A schema with MANAGED LOCATION set to the path
  4. An external location backed by a storage credential Correct answer.

Explanation

External tables and external volumes read from cloud storage, so Unity Catalog needs a storage credential (holding the cloud identity) and an external location that grants access to a specific path. The external location must already encompass the path used in the table's LOCATION clause. Naming conventions on catalogs or schemas do not grant storage access.

Question 31Managing Data

Which table constraint rejects any inserted row whose amount column is below zero?

  1. PRIMARY KEY (amount)
  2. CHECK (amount >= 0) Correct answer.
  3. NOT NULL (amount)
  4. FOREIGN KEY (amount) REFERENCES limits(amount)

Explanation

A CHECK constraint evaluates a Boolean expression on each row and rejects rows where it is not true, which is exactly how a non-negative rule is enforced. PRIMARY KEY enforces uniqueness and non-nullness, and NOT NULL only forbids nulls, so neither rejects a negative value. A foreign key checks that a value exists in a referenced table.

Question 32Managing Data

You need to remove only the rows where region = 'EMEA' from a Delta table while leaving all other rows and the table itself intact. Which statement does this?

  1. DROP TABLE main.sales.orders WHERE region = 'EMEA';
  2. ALTER TABLE main.sales.orders DROP ROW WHERE region = 'EMEA';
  3. DELETE FROM main.sales.orders WHERE region = 'EMEA'; Correct answer.
  4. TRUNCATE TABLE main.sales.orders WHERE region = 'EMEA';

Explanation

DELETE with a WHERE clause removes exactly the matching rows and leaves the table definition and non-matching rows in place. TRUNCATE removes every row and accepts no filter, and DROP removes the table itself. Databricks SQL has no ALTER TABLE ... DROP ROW statement.

Question 33Managing Data

Which Unity Catalog object is intended for storing and governing non-tabular files such as PDFs, images, and machine-learning model artifacts?

  1. Managed table
  2. Volume Correct answer.
  3. Streaming table
  4. Materialized view

Explanation

Volumes are the Unity Catalog securable designed for files that are not tabular data, providing governance and access control over paths in managed or external storage. Tables and views, whether managed, streaming, or materialized, store structured row data and cannot hold arbitrary files.

Question 34Managing Data

Which statement adds a nullable STRING column named notes to an existing Delta table?

  1. ALTER TABLE main.sales.orders ADD COLUMN notes;
  2. ALTER TABLE main.sales.orders ADD COLUMN notes STRING; Correct answer.
  3. ALTER TABLE main.sales.orders APPEND COLUMN notes STRING;
  4. UPDATE TABLE main.sales.orders ADD notes STRING;

Explanation

ALTER TABLE ... ADD COLUMN followed by a name and a data type is the supported way to add a column, and existing rows receive NULL for the new column. The column type is mandatory, so omitting STRING is invalid. UPDATE and APPEND COLUMN are not the statements used for schema changes.

Question 35Managing Data

A governance team wants to label a table with key-value metadata such as department = finance so the table can be searched and audited, without changing its data or schema. Which approach does this?

  1. CREATE INDEX department ON main.sales.orders ('finance');
  2. COMMENT ON TABLE main.sales.orders IS 'department = finance';
  3. ALTER TABLE main.sales.orders ADD COLUMN department STRING DEFAULT 'finance';
  4. ALTER TABLE main.sales.orders SET TAGS ('department' = 'finance'); Correct answer.

Explanation

Unity Catalog tags are key-value attributes attached to securables; they are searchable in Catalog Explorer and used for governance and auditing without affecting data or schema. Adding a column changes the table structure, and a free-text comment is not a structured, queryable attribute. Tags are set with SET TAGS rather than an index definition.

Question 36Managing Data

A shallow clone of a Delta table references the source table's data files instead of copying them. Which operation on the source can make the shallow clone unreadable?

  1. Running VACUUM on the source, removing referenced files Correct answer.
  2. Running OPTIMIZE on the source table to compact small files
  3. Running ANALYZE TABLE on the source table
  4. Adding a new column to the source table

Explanation

Because a shallow clone points at the source's files, deleting those files breaks the clone. VACUUM physically removes files no longer referenced by the source's current version, and with a short retention it can delete files the clone still needs, which is why a deep clone is used when the copy must be independent. OPTIMIZE and ANALYZE only rewrite or gather statistics on files and do not delete the ones the clone references.

Question 37Managing Data

Which statement about UNDROP TABLE in Unity Catalog is correct?

  1. It restores a dropped managed table to its original name within the retention period. Correct answer.
  2. It restores any dropped table, including external tables, indefinitely.
  3. It restores the table only if its data files were never written by Databricks.
  4. It recreates the table structure only, because the dropped data files cannot be recovered.

Explanation

UNDROP TABLE reverses a drop of a managed table while the table is still inside the retention window, restoring the same name and its data. Once the retention period expires or the data is purged, recovery is no longer possible. External tables are outside this mechanism because their files are never deleted by the drop.

Question 38Managing Data

A scheduled COPY INTO loads CSV files into a Delta table. Newly arriving files contain an extra column that does not exist in the target. Which option lets COPY INTO add that column instead of failing?

  1. COPY_OPTIONS ('inferSchema' = 'true')
  2. COPY_OPTIONS ('mergeSchema' = 'true') Correct answer.
  3. COPY_OPTIONS ('evolveSchema' = 'true')
  4. TBLPROPERTIES ('autoMerge' = 'true')

Explanation

In COPY INTO, schema evolution is enabled with mergeSchema = 'true' inside COPY_OPTIONS, which adds newly detected columns to the target table. inferSchema controls type inference for the source files rather than adding columns to the target. evolveSchema and autoMerge are not recognized COPY INTO options.

Question 39Importing Data

In Databricks SQL, which table-valued function lets you query files stored in a Unity Catalog volume directly, without creating a table first?

  1. read_files Correct answer.
  2. DESCRIBE EXTENDED
  3. COPY INTO
  4. LOAD DATA

Explanation

read_files is a table-valued function that reads files from a volume or cloud storage path and returns a table you can select from, including inside a CREATE TABLE AS SELECT statement. It accepts format-specific options such as header or delimiter directly as named parameters.

Question 40Importing Data

A nightly job runs COPY INTO against a landing directory where new files keep arriving. What happens to files that were already loaded by the previous run of the same command?

  1. They are skipped, since those file names were already recorded. Correct answer.
  2. They cause the command to fail with a duplicate-file error.
  3. They are redirected into a separate quarantine table.
  4. They are loaded again, producing duplicate rows in the target table.

Explanation

COPY INTO is idempotent for a given target table: it keeps track of the source files it has already committed and skips them on later runs unless a file has changed. This lets you point the same statement at a growing directory and load only the new arrivals.

Question 41Importing Data

You call read_files on a CSV file in a Unity Catalog volume and want the first line of the file to become the column names. Which named argument should you pass?

  1. firstRowAsHeader => true
  2. inferSchema => true
  3. skipRows => 1
  4. header => true Correct answer.

Explanation

read_files accepts the same option names as Spark's CSV reader, passed as named arguments, and header set to true treats the first row as the column names. Without it, the header line is read as a data row and columns get generated names such as _c0.

Question 42Importing Data

Which clause can be appended to a COPY INTO statement so that it reports data-quality problems without writing any rows into the target table?

  1. EXPLAIN
  2. DRY RUN
  3. PREVIEW
  4. VALIDATE Correct answer.

Explanation

COPY INTO ... VALIDATE returns the rows that would fail to load along with the reason for each failure, and nothing is committed to the table. It is typically used to check a new source before switching a production pipeline over to it.

Question 43Importing Data

When you ingest files incrementally with Auto Loader (the cloudFiles source), which setting records the state of which files have already been processed?

  1. cloudFiles.format
  2. checkpointLocation Correct answer.
  3. schemaLocation
  4. cloudFiles.includeExistingFiles

Explanation

Auto Loader persists its progress in the streaming checkpoint, so checkpointLocation on the write must point to durable storage the pipeline can resume from. If the checkpoint is deleted or changed, the stream forgets which files it consumed.

Question 44Importing Data

A table is created with CREATE TABLE followed by a LOCATION pointing at an existing cloud storage path. What happens to the files at that path when the table is dropped?

  1. They remain in place, since the table is external. Correct answer.
  2. They become read-only until the table is recreated.
  3. They are moved into the schema's managed storage location.
  4. They are deleted along with the table definition.

Explanation

A table with an explicit LOCATION outside managed storage is an external table, so dropping it removes only the metastore metadata. Managed tables, which have no LOCATION of their own and use the schema's managed storage, do have their data files removed on drop.

Question 45Importing Data

Which Databricks capability lets an analyst query a remote PostgreSQL database in place, without first copying its tables into Delta?

  1. Delta Sharing with an external recipient
  2. Lakehouse Federation via a UC connection Correct answer.
  3. Auto Loader reading the files with cloudFiles
  4. COPY INTO on a Delta target table

Explanation

Lakehouse Federation uses a Unity Catalog connection plus a foreign catalog to expose tables from an external database, and queries are pushed down to that system. This avoids duplicating data into the lakehouse when you only need read access.

Question 46Importing Data

You run COPY INTO from CSV files with inferSchema enabled but have not supplied a schema location. What must you add for the statement to work?

  1. It must be persisted in a schema location. Correct answer.
  2. All target columns must be declared as STRING.
  3. A checkpoint location must be set on the table.
  4. Inference is not supported for CSV files.

Explanation

When COPY INTO infers the schema, Databricks requires a schema location so the inferred schema can be saved and reused consistently across runs. Without it, later runs could infer a different schema from a different batch of files and produce inconsistent results.

Question 47Importing Data

Which statement about a Unity Catalog managed volume is accurate?

  1. Managed volumes can only store Delta Lake table data.
  2. A managed volume can be created without belonging to a schema.
  3. Files in a managed volume must be read via a DBFS mount path.
  4. Dropping a managed volume deletes the data files it holds. Correct answer.

Explanation

A managed volume keeps its files inside the schema's managed storage location, so dropping the volume also removes those files. An external volume points to a storage location you control, and its files survive the volume being dropped.

Question 48Importing Data

A pipeline must ingest millions of small JSON files that arrive continuously in cloud storage, and new fields keep appearing in the JSON. Which ingestion approach fits these requirements best?

  1. An hourly CREATE TABLE AS SELECT using read_files over the directory.
  2. An Auto Loader stream with schema evolution enabled. Correct answer.
  3. A nightly COPY INTO job that re-lists the entire landing directory.
  4. Manually uploading the files into a managed volume before each query.

Explanation

Auto Loader incrementally discovers new files using file notifications or directory listing, scales to very large file counts, and can add newly appearing fields to the target schema as it goes. Re-reading the whole directory on a schedule reprocesses data and does not scale to millions of files per day.

Question 49Executing queries using Databricks SQL and Databricks SQL Warehouses

Which SQL warehouse type runs its compute resources in the Databricks cloud account instead of in your own cloud account?

  1. Classic
  2. Pro
  3. Photon
  4. Serverless Correct answer.

Explanation

Serverless SQL warehouses run in the Databricks account, so Databricks manages the underlying instances and you are billed per usage rather than for provisioned VMs. Classic and Pro warehouses run in your own cloud account's subscription. Photon is a query engine, not a warehouse type.

Question 50Executing queries using Databricks SQL and Databricks SQL Warehouses

Databricks SQL keeps a cache of results to speed up repeated execution. When is a cached result reused?

  1. When the same query is rerun and the tables it reads have not changed. Correct answer.
  2. Whenever the warehouse has been running for more than 24 hours.
  3. Only when the query is executed from a dashboard rather than the editor.
  4. Only when the previous results were downloaded to a local file.

Explanation

Databricks SQL caches the results of a query and reuses them if the same query runs again and the underlying data has not been modified. If the source tables change, the cached result is no longer valid and the query is re-executed. The cache is not tied to the editor, dashboard, or download activity.