Data Engineering with Azure Databricks · 17% of the exam

Set up and configure an Azure Databricks environment: free practice questions

5 sample questions from our 43-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real Microsoft exam.

1. A Unity Catalog administrator wants to configure an AI/BI Genie space so that the underlying language model provides more accurate and contextually appropriate responses when business users ask natural-language questions about the `corp_prod.finance.gl_transactions` table. The table has non-obvious column names such as `acct_cd` and `jrnl_dt`. Which approach within Unity Catalog MOST directly improves Genie's response quality for these columns?

  • A. Create a standard view that aliases all columns to human-readable names and point Genie at the view instead
  • B. Add column-level comments and table-level comments (descriptions) to the Unity Catalog table, and provide Genie with natural-language instructions that explain business terminology and column semantics✓ Correct
  • C. Enable Photon on the SQL Warehouse backing the Genie space to reduce query latency, which indirectly improves response relevance
  • D. Grant the Genie service principal ALL PRIVILEGES on the schema so it can introspect all metadata automatically without additional configuration
Explanation

AI/BI Genie uses Unity Catalog metadata — including table comments, column comments/descriptions, and Genie-specific natural-language instructions — to understand the schema and generate accurate SQL. Adding descriptive comments to columns like `acct_cd` ('account code') and `jrnl_dt` ('journal date'), along with business-context instructions in the Genie space, directly improves LLM grounding. Option A is wrong because creating an aliased view adds maintenance overhead and bypasses the rich metadata layer; it is a workaround rather than the intended Genie configuration approach. Option C is wrong because Photon improves query execution speed but has no effect on the language model's ability to interpret column names or generate accurate SQL. Option D is wrong because over-privileging the service principal is a security anti-pattern and does not improve response quality — Genie's accuracy is driven by metadata enrichment, not broad permissions.

2. An organization has a Unity Catalog metastore and wants to allow a team of analysts to query tables in an Azure SQL Database without extracting the data into Databricks storage. The administrator has already created a connection object named `azure_sql_conn` pointing to the Azure SQL server. What is the correct next step to make the Azure SQL tables queryable in Unity Catalog?

  • A. Create an external table in Unity Catalog using the connection as the LOCATION credential.
  • B. Create a foreign catalog in Unity Catalog using CREATE FOREIGN CATALOG ... USING azure_sql_conn.✓ Correct
  • C. Create an external location that maps the Azure SQL connection to a Unity Catalog schema.
  • D. Install the Azure SQL JDBC driver as a cluster-scoped library and query the database directly with spark.read.jdbc.
Explanation

After creating a connection object in Unity Catalog, the next step is to create a foreign catalog using CREATE FOREIGN CATALOG ... USING <connection_name>. The foreign catalog mirrors the remote database's schemas and tables inside Unity Catalog, making them queryable with standard SQL and governed by Unity Catalog permissions. — External tables reference files in object storage, not relational database connections; the connection object cannot be used as a LOCATION credential. — External locations map a storage credential to a cloud storage path (ABFSS/GCS/S3); they are not related to database connections. — Using JDBC directly via spark.read bypasses Unity Catalog governance entirely and does not make the tables visible in the catalog namespace; it also requires manual credential management.

3. A company's data governance policy requires that the production analytics environment (catalog: `prod`) and the development environment (catalog: `dev`) are strictly isolated so that developers cannot accidentally read or write to production data. Which Unity Catalog approach best enforces this isolation?

  • A. Create separate schemas within the same catalog and restrict schema-level permissions
  • B. Use separate catalogs (`prod` and `dev`) and grant developers USE CATALOG and object privileges only on `dev`✓ Correct
  • C. Set table-level ACLs on each production table to deny access to the developer group
  • D. Deploy separate Databricks workspaces for production and development without Unity Catalog
Explanation

Using separate catalogs for production and development, combined with granting developers privileges only on the `dev` catalog, provides the strongest Unity Catalog-native isolation. Developers cannot traverse `prod` without USE CATALOG on it, enforcing environment separation at the catalog boundary. Using separate schemas within the same catalog provides logical separation but is weaker—a misconfigured permission could leak access across schemas in the same catalog. Unity Catalog does not support explicit DENY statements (unlike some traditional RDBMS systems), so table-level ACLs cannot issue a blanket deny; access is controlled by grants, and the absence of a grant on `prod` is effectively a deny, but this is harder to manage at scale than catalog-level separation. Deploying separate workspaces without Unity Catalog abandons the centralized governance and auditing benefits of Unity Catalog and increases operational overhead.

4. A Unity Catalog administrator runs the following DDL: ```sql DROP TABLE corp_prod.finance.ledger; ``` The `ledger` table was created as a managed table. What happens to the underlying data files in cloud storage after this statement executes successfully?

  • A. The table metadata is removed from Unity Catalog, but the data files are retained in the managed storage location for 30 days before being purged.
  • B. The table metadata is removed from Unity Catalog and the underlying data files are permanently deleted from the managed storage location.✓ Correct
  • C. The statement fails because managed tables in Unity Catalog cannot be dropped without first converting them to external tables.
  • D. The data files are moved to a Unity Catalog trash location and can be recovered using UNDROP TABLE within 7 days.
Explanation

In Unity Catalog, dropping a managed table removes both the table metadata from the metastore and permanently deletes the underlying data files from the managed storage location. This is the defining characteristic of managed tables — Unity Catalog owns the data lifecycle, so dropping the table also drops the data. — Unity Catalog does not automatically retain managed table data files for 30 days after a DROP TABLE; the deletion is immediate. (Note: Delta table time travel and the underlying Delta log may retain data briefly depending on VACUUM settings, but the table registration and managed ownership are removed.) — There is no restriction preventing managed tables from being dropped; any user with the DROP TABLE privilege can drop a managed table. — While Databricks has introduced some protections for accidental deletion in certain contexts, a standard DROP TABLE on a managed table does not move files to a recoverable trash location with a guaranteed UNDROP window in the general Unity Catalog model.

5. A Unity Catalog administrator creates the following object: ```sql CREATE SCHEMA marketing.campaigns MANAGED LOCATION 'abfss://unity-catalog@storageaccount.dfs.core.windows.net/marketing/campaigns'; ``` What is the effect of this MANAGED LOCATION clause on tables subsequently created inside this schema?

  • A. All tables created in `marketing.campaigns` without an explicit LOCATION will store their data files under the specified ABFSS path rather than the metastore root storage location.✓ Correct
  • B. The MANAGED LOCATION defines the external storage credential that must be used when creating external tables in this schema.
  • C. The clause has no effect; managed table locations are always determined by the catalog-level storage location.
  • D. The MANAGED LOCATION overrides the catalog location only for external tables; managed tables still use the metastore root.
Explanation

In Unity Catalog, a schema-level MANAGED LOCATION specifies the default storage path for managed tables created within that schema. When a managed table is created without an explicit LOCATION clause, its data is stored under the schema's managed location rather than the parent catalog's or metastore root's default location. This provides granular storage control at the schema level. — The MANAGED LOCATION is not a reference to a storage credential; storage credentials are separate objects used to authorize access to external locations. — Catalog-level storage locations are used as defaults when no schema-level location is set; a schema-level MANAGED LOCATION overrides the catalog-level default. — Managed tables use the schema or catalog managed location; external tables specify their own LOCATION explicitly and are not affected by the schema's MANAGED LOCATION.

38 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free