Skip to content
datastudyguides

DP-750 · 3.2.3 · Prepare and process data

SQL ingestion methods

Ingest data by using SQL methods, including CREATE TABLE … AS (CTAS), CREATE OR REPLACE TABLE, and COPY INTO

Use CTAS for query-created tables, REPLACE for atomic table replacement, and COPY INTO for incremental file loading.

See SQL ingestion in its working surface

Azure Databricks SQL editor showing a query, parameters, workspace navigation, and tabular results.

SQL ingestion methods are authored and validated in the same editor used for table operations and result inspection. Keep the diagrams below for choosing among SQL ingestion patterns.

Match SQL to the loading lifecycle

  • Build a table from query outputCREATE TABLE AS SELECT
  • Replace table definition and dataCREATE OR REPLACE TABLE
  • Repeatedly ingest arriving filesCOPY INTO
SQL ingestion method

CTAS creates and populates a table from a query. CREATE OR REPLACE expresses replacement semantics without a manual drop-and-create sequence.

COPY INTO tracks files

  1. 1Source pathContains files
  2. 2Load historyTracks processed files
  3. 3New filesLoaded into target
  4. 4RerunPreviously processed files are skipped
COPY INTO retry behavior

This file-aware behavior makes repeated loads safer than blindly appending every file again.

Choose by lifecycle

Creation, replacement, and incremental file loading are different problems. Use the SQL pattern that matches the intended table lifecycle.

Key points

  • CTAS: Creates and populates a table from a query
  • CREATE OR REPLACE: Replaces table data and definition atomically
  • COPY INTO: Loads new files into a Delta table
  • Idempotence: COPY INTO skips files already loaded

Exam trap

COPY INTO tracks loaded files, so rerunning it does not normally reload the same files.

Sources · 2 Microsoft Learn pages Show ▾

Checked on October 4, 2026. Report a problem

Go deeper on Microsoft Learn

Checked against Microsoft Learn on October 4, 2026. Report a problem with this card

How well do you know this?