QuestionQ91

Importing Data

A data analyst is enabling analytics for raw Parquet files in an external Amazon S3 bucket. The files must be queried directly through Databricks SQL without copying the data. The analyst also wants to register the table in Unity Catalog to enforce governance policies such as access control and lineage tracking.

Which SQL command should the analyst use to create a Unity Catalog-enabled external table that directly references the Parquet files?

  • A CREATE TABLE catalog.schema.table_name USING PARQUET AS SELECT * FROM parquet.‘s3://my-bucket/data/’;
  • B CREATE TABLE catalog.schema.table_name OPTIONS (‘path’ ‘s3://my-bucket/data/’) STORED AS PARQUET;
  • C CREATE EXTERNAL TABLE catalog.schema.table_name USING DELTA LOCATION ‘s3://my-bucket/data/’;
  • D CREATE TABLE catalog.schema.table_name USING PARQUET LOCATION ‘s3://my-bucket/data/’;
Explanation

A Unity Catalog external table references data at a cloud-storage path through a LOCATION clause while Unity Catalog manages the table metadata and governance. For existing Parquet files, the table provider must be declared as PARQUET; CREATE TABLE catalog.schema.table_name USING PARQUET LOCATION 's3://my-bucket/data/'; satisfies both requirements without copying the files.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!