Home / Data Analyst practice test / Importing Data

Free · 4 questions with explanations

Importing Data: Databricks Data Analyst Associate Practice Questions

Exam-style questions on Importing Data. Pick your answer, then open the explanation to see why it's right — and why the other options are wrong.

Updated November 10, 2026

1 Importing Data

A data analyst needs to upload a 5 MB comma-delimited CSV file to Databricks using only the Workspace UI — without writing any code or using the CLI. The file has a header row and several columns where the inferred data types are incorrect (for example, a column named order_id is inferred as DOUBLE instead of STRING, and order_date is inferred as STRING instead of DATE). Which statement CORRECTLY describes what the analyst can do during the UI upload workflow to fix the type issues before the table is created, and what format the table will be stored in?

  1. AThe upload wizard shows a preview of the parsed data, and the analyst can override the inferred type of individual columns before the table is created, for example changing order_id from DOUBLE to STRING and order_date from STRING to DATE; column names can be edited as well. After the analyst confirms the schema and picks a target catalog and schema, Databricks writes the data as a managed Delta table in Unity Catalog storage, not as a CSV file.
  2. BThe upload wizard infers column types from the CSV header row and does not parse data rows, so the types it shows are a first guess that stays fixed until the table exists. The analyst corrects them afterwards in the SQL Editor with ALTER TABLE catalog.schema.table_name ALTER COLUMN order_id TYPE STRING and the matching statement for order_date. The uploaded table is stored in CSV format on cloud storage to preserve the original file layout.
  3. CThe upload wizard infers types from a statistical profile of the first 1,000 rows and locks them in; overrides are not offered in the wizard, as changing a type would alter how row values are parsed. The table is created with the inferred types and stored in Parquet format. To make order_id a STRING and order_date a DATE, the analyst recreates the table with a CREATE OR REPLACE TABLE statement that casts the columns in its SELECT.
  4. DThe upload creates an external table that points to the uploaded CSV file in DBFS rather than a managed Delta table, and the wizard derives its types from metadata in the CSV header, so they are not editable there. To correct order_date, the analyst renames the header column to order_date_DATE; the Databricks CSV reader recognizes this suffix convention and casts the column to DATE at query time. The table stays in CSV format.
  5. EThe upload wizard lets the analyst change types between numeric and string columns, so order_id can go from DOUBLE to STRING, but DATE and TIMESTAMP are not offered, as date parsing needs a locale and format string. The analyst keeps order_date as STRING and converts it in a downstream view with CAST(order_date AS DATE). The table is stored in Delta format but marked read-only until it is copied with CREATE TABLE ... DEEP CLONE.
Show answer & explanation

Correct answer: A

WHY A: The Workspace UI upload wizard includes a schema preview and editing step in which the analyst sees a sample of the parsed data and can change the inferred type of any column before the table is created. Changing order_id from DOUBLE to STRING and order_date from STRING to DATE are both standard adjustments, and column names can be edited in the same step. After the analyst confirms the schema and selects a target catalog and schema in Unity Catalog, Databricks stores the data as a managed Delta table, not as a CSV file. Delta gives ACID transactions, time travel, schema enforcement, and full SQL DML support from the moment the table exists. WHY NOT B: The wizard parses data rows, not just the header, to infer column types, and it lets the analyst change inferred types before the table is created. The resulting table is stored in Delta format, not CSV. A post-upload ALTER COLUMN is unnecessary when the corrections are made in the wizard. WHY NOT C: The wizard does not lock in inferred types; column type overrides are part of the schema editing step. Tables created through the wizard are in Delta format, not Parquet: Delta uses Parquet files as its storage layer, but the table format is Delta with its transaction log. WHY NOT D: The wizard creates a managed Delta table in Unity Catalog storage, not an external table over a CSV in DBFS. Types are inferred from actual data values, not from header metadata, and the order_date_DATE suffix convention is fabricated and does not exist in Databricks. WHY NOT E: The wizard supports type changes for every column type, including DATE and TIMESTAMP: users pick DATE, TIMESTAMP, STRING, INT, BOOLEAN and other types from a dropdown in the schema editing step. The resulting tables are standard managed Delta tables with full read/write DML; there is no read-only restriction and no DEEP CLONE is required.

2 Importing Data

A data engineering team is evaluating five different data ingestion scenarios for their Databricks platform and needs to identify the BEST-FIT mechanism for each. The scenarios are: (A) continuously ingesting new JSON files dropped into an Amazon S3 bucket by an upstream ETL tool throughout the day, (B) giving a business partner on a non-Databricks platform read-only access to a live Delta table without copying the data to their system, (C) pulling fresh records from a SaaS application's REST API on a scheduled basis, (D) allowing a separate Databricks account (on Azure) to query tables managed in the current AWS-based workspace, and (E) making a curated reference dataset produced internally available to any Databricks customer globally. Which mapping of scenario to ingestion mechanism is CORRECT?

  1. AA → Delta Sharing open sharing; B → Auto Loader in file notification mode; C → a Databricks Marketplace listing; D → a direct S3 mount with a cross-account IAM role; E → API-driven intake through a Databricks Job that calls the Databricks REST API to replicate tables across accounts. Delta Sharing is left out of D on the grounds that its protocol is cloud-specific and the bearer token format differs between AWS, Azure, and GCP.
  2. BA → Auto Loader (the cloudFiles Structured Streaming source); B → Delta Sharing open sharing (bearer token or OIDC, read from a non-Databricks platform); C → API-driven intake (a scheduled Databricks Job or notebook that calls the SaaS REST API and writes the results to Delta); D → Delta Sharing Databricks-to-Databricks sharing (cross-account and cross-cloud, with no tokens to manage); E → Databricks Marketplace (a public listing that Databricks customers can discover and install).
  3. CA → a Lakeflow Jobs cron-triggered batch COPY INTO from S3; B → Auto Loader in file notification mode on the partner's storage; C → a Databricks Marketplace REST connector listing managed by Databricks; D → Delta Sharing open sharing with a long-lived bearer token sent to the Azure account; E → S3 cross-region replication followed by Unity Catalog external table registration. Databricks-to-Databricks sharing is left out of D on the grounds that it is limited to workspaces within one Databricks account.
  4. DA → Databricks Marketplace; B → Auto Loader with schema inference pointed at the partner's cloud storage path; C → Delta Sharing open sharing, on the grounds that SaaS APIs and Delta Sharing both run over HTTPS; D → a Unity Catalog cross-metastore catalog binding that gives read access across accounts without data movement; E → COPY INTO from a public S3 presigned URL. Auto Loader is left out of A on the grounds that it reads PARQUET and AVRO natively while JSON needs a schema registry.
  5. EA → Delta Lake MERGE with a Structured Streaming trigger; B → Databricks Marketplace (a commercial listing visible to the single partner); C → Auto Loader in file notification mode detecting webhook payloads that the SaaS provider writes to a Unity Catalog volume; D → a Lakeflow Jobs cross-account task cluster with unity_catalog_cross_account=true in the cluster policy; E → Delta Sharing Databricks-to-Databricks sharing restricted to internal accounts. API-driven intake is treated as an Auto Loader mode for REST polling.
Show answer & explanation

Correct answer: B

WHY B: Each scenario maps to a documented, purpose-built Databricks ingestion or sharing mechanism. (A) Auto Loader is the recommended feature for incrementally ingesting new files from cloud object storage (including S3) using the cloudFiles Structured Streaming source; it detects new files, tracks ingestion state in a RocksDB checkpoint, and guarantees exactly-once processing. (B) Delta Sharing open sharing lets a provider share a live Delta table with a recipient on any computing platform (pandas, Power BI, Apache Spark outside Databricks) using bearer tokens or OIDC without copying data. (C) API-driven intake, a scheduled Databricks Job (Lakeflow Job) running a notebook that calls the SaaS REST API, is the standard pattern for pulling records from REST APIs. (D) Delta Sharing Databricks-to-Databricks sharing is designed for cross-account, cross-cloud sharing between Unity Catalog-enabled workspaces, needs no token management, and explicitly supports AWS-to-Azure sharing. (E) Databricks Marketplace is the open forum for publishing data products so any Databricks customer globally can discover and install them. WHY NOT A: Auto Loader, not Delta Sharing, ingests files from S3; Delta Sharing shares live data with external consumers and does not ingest files. The stated reason for avoiding Delta Sharing in D is also false: the protocol is cloud-agnostic, and Databricks-to-Databricks sharing explicitly supports AWS to Azure. WHY NOT C: COPY INTO is a one-time or re-triggered batch load command and does not give the continuous, event-driven incremental ingestion that Auto Loader does. Open sharing with a bearer token is usable across accounts, but the claim that Databricks-to-Databricks sharing is limited to one Databricks account is false, so it is the better fit for D. WHY NOT D: Databricks Marketplace publishes datasets to the public or a private exchange and is not used to ingest new files from S3. Auto Loader supports JSON natively: it is one of the documented formats alongside CSV, PARQUET, AVRO, ORC, XML, TEXT, and BINARYFILE. Delta Sharing does not pull records from a SaaS REST API. WHY NOT E: Auto Loader and API-driven intake are distinct mechanisms: Auto Loader ingests files from cloud object storage (S3, ADLS, GCS) with the cloudFiles source, while API-driven intake is code that makes HTTP calls to REST APIs. Databricks-to-Databricks Delta Sharing is not limited to internal accounts; it works across separate Databricks accounts, including different cloud providers, and a globally available dataset belongs in Marketplace.

3 Importing Data

A business analyst with no engineering background wants to load a 15 MB CSV file of monthly sales data into Databricks for ad-hoc analysis in a SQL notebook. The analyst has Contributor access to a Unity Catalog workspace. A colleague suggests using the Databricks Workspace UI file upload feature. Which description MOST ACCURATELY describes the file upload experience and what happens to the data after the upload completes?

  1. AThe Workspace UI file upload is reserved for workspace administrators; Contributor-level users do not see it, as uploads bypass Unity Catalog lineage capture and Databricks limits that bypass to administrators. After an administrator uploads the CSV, the raw file sits in the chosen schema, and the analyst converts it to a Delta table by running CONVERT TO DELTA in a SQL notebook before it can be queried with the three-part namespace.
  2. BThe Workspace UI upload accepts Apache Parquet and ORC files, as those formats embed the schema metadata the wizard uses to generate the CREATE TABLE statement. The analyst first converts the CSV to Parquet on a local machine, for example with pandas.DataFrame.to_parquet(), and then uploads it; a CSV submitted directly raises an 'UnsupportedFileTypeException' in the wizard. The resulting table is a managed Delta table.
  3. CThe Workspace UI upload places the raw CSV file in the DBFS root at dbfs:/FileStore/tables/ and creates no table; the upload step has no awareness of Unity Catalog catalogs or schemas. The analyst then opens a notebook, parses the file with a PySpark spark.read.csv() command, and persists it with .write.format('delta').saveAsTable('catalog.schema.table_name') before it can be queried in the SQL notebook.
  4. DThe analyst uploads the CSV from a local machine through the Workspace UI, using the 'Add data' or 'Create table' workflow or the upload entry point in Catalog Explorer. The wizard previews the parsed data, lets the analyst adjust inferred column types and names, and asks for a target catalog and schema. On completion, Databricks writes the data to a new managed Delta table that is queryable as catalog.schema.table with no separate conversion step.
  5. EThe Workspace UI upload creates a temporary table that lasts for the current browser session; when the analyst closes the workspace tab or the session times out, the table and its data are removed, as upload tables live in an in-memory session-scoped schema. For a persistent table, the analyst runs the CLI command databricks fs cp localfile.csv dbfs:/tables/ and then loads the file with a COPY INTO SQL statement.
Show answer & explanation

Correct answer: D

WHY D: The Workspace UI offers a data upload experience for non-admin users with appropriate workspace access (Contributor). The flow, reachable from the SQL Editor's 'Add data' button, AI/BI Dashboard dataset upload, or Catalog Explorer, lets analysts upload files (including CSV) from a local machine. The wizard previews the data, infers column names and data types and allows adjustments, and the target Unity Catalog catalog and schema are selected in the wizard. On completion, Databricks stores the data as a new managed Delta table in that location, queryable right away with the standard three-part namespace and no further conversion or code. The experience is designed for non-technical users who need to bring small datasets into the platform quickly. WHY NOT A: File upload in the Workspace UI is not restricted to workspace administrators; it is available to users with appropriate permissions such as Contributor. The wizard also creates a Delta table directly, so no manual CONVERT TO DELTA step is needed. WHY NOT C: The modern, Unity Catalog-integrated upload flow does not drop files in the DBFS root at dbfs:/FileStore/tables/ and leave a raw file to parse by hand; the wizard handles parsing, type inference and table creation. The DBFS-based pattern is a legacy workflow that this wizard has superseded. WHY NOT B: The upload feature supports CSV files, one of the wizard's primary use cases, so nothing has to be pre-converted to Parquet. The wizard parses the CSV, infers the schema and creates a Delta table, and no 'UnsupportedFileTypeException' is raised for CSV uploads. WHY NOT E: Tables created through the file upload are persistent managed Delta tables in Unity Catalog-managed cloud storage, not session-scoped or in-memory. They survive browser session closures, workspace restarts and cluster terminations like any other managed Delta table. The CLI plus COPY INTO route is a valid alternative but is not required for persistence.

4 Importing Data

A data engineer is setting up an Auto Loader pipeline to ingest new CSV files that land in an Amazon S3 bucket every hour. The files sometimes have new columns added by the upstream system without advance notice, and the team wants the pipeline to handle this gracefully without manual intervention. The engineer also asks their manager whether Auto Loader guarantees that each file is processed only once even if the pipeline is restarted due to a cluster failure. Which combination of statements about Auto Loader's schema handling and fault tolerance behavior is CORRECT?

  1. AAuto Loader does not support schema inference for CSV files — CSV is a schema-less text format and Auto Loader requires the user to provide an explicit schema definition via the .schema() method before the stream can start. If the stream is restarted after a cluster failure, Auto Loader re-reads all previously processed files from the beginning of the S3 directory because there is no external state store to persist the read position; exactly-once semantics require the user to implement their own deduplication logic using a Delta MERGE statement on the target table.
  2. BAuto Loader supports schema inference and schema evolution for CSV and other supported file formats — it automatically samples incoming files to infer the schema on the first run and can detect new columns in subsequent batches. New columns are either added to the inferred schema (when evolution mode is configured) or rescued into a separate JSON column so no data is silently dropped. For fault tolerance, Auto Loader persists file metadata and ingestion state in a RocksDB-backed checkpoint location, allowing the pipeline to resume exactly where it left off after a cluster failure and guaranteeing exactly-once processing without any user-managed deduplication logic.
  3. CAuto Loader provides exactly-once guarantees only when writing to external databases via JDBC connections — when writing to Delta Lake tables the guarantee degrades to at-least-once because Delta Lake's transaction log does not integrate with Auto Loader's checkpoint mechanism. For schema evolution, Auto Loader requires the pipeline to be stopped, the new schema registered manually in the Unity Catalog using ALTER TABLE ADD COLUMN, and the pipeline restarted. Until the new column is registered, data in the new column is silently dropped without raising any error or alert.
  4. DAuto Loader's schema inference samples only the first 50 files in the target directory to build its initial schema — any new columns appearing in later files will cause the stream to throw a SchemaMismatchException and halt. The operator must manually add the column to the schema configuration and restart the stream. Auto Loader does persist a checkpoint, but the checkpoint only stores the directory listing offset and not individual file metadata, so exactly-once semantics are only guaranteed for files that arrive after the checkpoint is initialized — files that were landing during cluster initialization are processed twice.
  5. EAuto Loader guarantees exactly-once processing but only for PARQUET files, because PARQUET files embed a schema that Auto Loader uses to verify whether a file has already been processed by comparing embedded file UUIDs with entries in the checkpoint. For CSV and JSON files (which lack embedded schemas), Auto Loader falls back to at-least-once semantics. Schema evolution is handled through a manual process where the data engineer must run ALTER TABLE REFRESH SCHEMA on the target Delta table after each new upstream column is detected, which triggers a one-time backfill of the new column for all previously ingested rows.
Show answer & explanation

Correct answer: B

WHY B is correct: Auto Loader is documented to support schema inference — it 'can detect schema drifts, notify you when schema changes happen, and rescue data that would have been otherwise ignored or lost.' Schema inference works for all supported file formats including CSV, JSON, PARQUET, AVRO, and others. When new columns appear, Auto Loader's schema evolution feature can automatically widen the schema to include them, or rescue unexpected data into a designated rescue column so nothing is silently dropped. For fault tolerance, Auto Loader explicitly stores file metadata in 'a scalable key-value store (RocksDB) in the checkpoint location.' The documentation states this 'ensures that data is processed exactly once' and that 'Auto Loader can resume from where it left off by information stored in the checkpoint location and continue to provide exactly-once guarantees when writing data into Delta Lake.' No user-managed deduplication is required when using Auto Loader with a Delta table target. WHY NOT A: Auto Loader does support schema inference for CSV files — providing an explicit schema is optional, not mandatory. The checkpoint mechanism (RocksDB) persists individual file metadata (not just directory offsets), enabling exactly-once resume after failures without user-managed deduplication. WHY NOT C: Auto Loader provides exactly-once guarantees specifically when writing to Delta Lake — the checkpoint mechanism and Delta Lake's ACID transaction log together ensure this. The guarantee is stronger with Delta Lake, not weaker. Schema evolution does not require stopping the pipeline and manually running ALTER TABLE — Auto Loader handles schema changes automatically when configured to do so. WHY NOT D: Auto Loader samples files to infer schema but is not limited to the first 50 files, and a SchemaMismatchException that permanently halts the stream is not the standard behavior for new columns — depending on configuration, new columns are evolved into the schema or rescued. The checkpoint stores individual file metadata (using RocksDB), not just a directory listing offset, and exactly-once semantics apply across the full pipeline — not only to post-initialization files. WHY NOT E: Auto Loader's exactly-once guarantee applies to all supported file formats — including CSV and JSON — not just PARQUET. The guarantee is based on the checkpoint mechanism tracking which files have been processed, regardless of file format. There is no ALTER TABLE REFRESH SCHEMA command in Databricks SQL for triggering column backfills.

Take the full Data Analyst practice test →