Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Create volumes based on requirements

A worked example

Yes or no

A data engineer needs a governed landing area for CSV files that arrive from external systems. The catalog dev_catalog and the schema bronze_schema already exist. No volume named landing_files exists in that schema. The engineer holds the required privileges and runs the statement in the exhibit. Data is used only inside Azure Databricks.

CREATE VOLUME IF NOT EXISTS dev_catalog.bronze_schema.landing_files COMMENT 'Landing area for CSV files from external systems';

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

StatementYesNo
The files written to landing_files are stored in the managed storage location associated with bronze_schema.

The statement creates a managed volume. For a managed volume, Azure Databricks stores the files in the managed storage location associated with the schema.

Correct
To read /Volumes/dev_catalog/bronze_schema/landing_files/data.csv with pandas, the engineer must supply a storage account key or connection string in the code.

The /Volumes path is POSIX-style. It works with Spark, pandas and SQL without cloud storage credentials or connection strings.

Correct
The statement fails because it does not include a LOCATION clause.

A LOCATION clause is needed only for external volumes. For a managed volume, Unity Catalog manages the storage location automatically, so this statement is valid without one.

Correct
Why

The exhibit creates a managed volume because it has no EXTERNAL keyword and no LOCATION clause. Unity Catalog picks the storage location itself, in the managed storage associated with the schema. Files are then accessed through the /Volumes/<catalog>/<schema>/<volume>/ path, which Spark, pandas and SQL can use without storage credentials.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free