CertLumen

Databricks Data Analyst Associate · Section 4 · 20% of the exam

Create managed tables and external tables, including creating tables by joining data from multiple sources (e.g., CSV, Parquet, Delta tables) to create unified datasets, including Unity Catalog.

One of the objectives of the Databricks Certified Data Analyst Associate exam, in the section “Executing queries using Databricks SQL and Databricks SQL Warehouses”. Here is what it covers, the points to remember and a question to try.

What it covers

Unity Catalog has two kinds of tables: managed tables, where Unity Catalog owns the files, and external tables, where you own them. This lesson covers how to create each, what DROP does, how one CREATE TABLE AS SELECT can unify CSV, Parquet and Delta sources, and how Delta time travel lets you audit, query and restore earlier versions of a table.

Points to remember

  • Managed tables are the default and recommended type: no LOCATION, Delta (or Iceberg), files in Unity Catalog managed storage, eligible for predictive optimization.
  • External tables use LOCATION inside a Unity Catalog external location and need CREATE EXTERNAL TABLE; they support Delta, CSV, JSON, Avro, Parquet, ORC and text.
  • Dropping a managed table purges its data after a recovery period (7 days by default; UNDROP TABLE); dropping an external table leaves the files in place.
  • CTAS derives the schema from the query (no column list); CREATE OR REPLACE keeps history and grants; IF NOT EXISTS and OR REPLACE cannot be combined.
  • read_files reads CSV, Parquet, JSON and other formats from volumes; joining it with Delta tables in one CTAS builds a unified table; it needs READ VOLUME.

Try a question

A team keeps Parquet files in s3://acme-finance/ledger/, and an external tool must keep writing to that path. An analyst wants to query the files as a Unity Catalog table without moving them. What is required?

  1. AA managed table created by CTAS from the path, because Unity Catalog can govern only data in managed storage
  2. BAn external table with LOCATION set to that path, inside a Unity Catalog external location
  3. CA foreign catalog created with CREATE FOREIGN CATALOG on a connection to the S3 bucket
  4. DA volume over the path, followed by CREATE TABLE ... LOCATION '/Volumes/...' pointing at the volume
Show the answer

B. An external table registers files at a path inside a Unity Catalog external location, which is backed by a storage credential. Creating it requires CREATE EXTERNAL TABLE on the external location, plus the usual USE CATALOG, USE SCHEMA and CREATE TABLE. Unity Catalog governs queries through the table, the files stay where the tool writes them, and dropping the table leaves the files in place.

Written for practice in the style of the exam: never a question from the real exam.

In the course

The lesson Managed and External Tables, CTAS and Delta Time Travel teaches this objective (about 45 minutes), and 9 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.

More in this section

← Previous objective · All 39 objectives · Next objective →