CertLumen

Databricks Data Engineer Associate · Section 7 · 15% of the exam

Differentiate between managed and external tables in Unity Catalog and perform basic operations (create, modify, delete, and convert between managed and external tables) on them.

One of the objectives of the Databricks Certified Data Engineer Associate exam, in the section “Governance and Security”. Here is what it covers, the points to remember and a question to try.

What it covers

Unity Catalog always governs a table's metadata, but only managed tables also have their files, lifecycle and optimization managed for you. This lesson covers storage credentials, external locations, managed storage precedence, DROP/UNDROP behavior, and how to convert between the two table types.

Points to remember

  • Managed table: Unity Catalog controls the files in a managed storage location. External table: files live at a LOCATION inside a registered external location.
  • Managed storage precedence is schema > catalog > metastore; Databricks recommends catalog-level managed storage.
  • Storage credential = cloud identity; external location = URL + credential. There is no CREATE STORAGE CREDENTIAL SQL statement: use Catalog Explorer, CLI, API or Terraform.
  • Creating an external table needs CREATE EXTERNAL TABLE on the external location in addition to USE CATALOG, USE SCHEMA and CREATE TABLE.
  • DROP TABLE on a managed table keeps files for the recovery period (7 days by default) and then purges them; on an external table it removes metadata only.

Try a question

A data engineer runs DROP TABLE prod.raw.partner_feed. The table was originally created with the clause LOCATION 's3://acme-landing/partner_feed'. What happens to the data files?

  1. AThey are deleted immediately together with the table's metadata and transaction log
  2. BThey are kept for the 7-day recovery period and then purged asynchronously
  3. CThey are moved into the schema's managed storage location for later reuse
  4. DThey stay at the S3 path; only the metadata is removed
Show the answer

D. A table created with LOCATION is an external table. Dropping an external table removes only its metadata from Unity Catalog; the files stay in cloud storage until someone deletes them there. The keep-for-the-recovery-period-then-purge behavior applies to managed tables.

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

In the course

The lesson Managed vs External Tables teaches this objective (about 45 minutes), and 13 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 29 objectives · Next objective →