Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Databricks Certified Data Engineer Professional Exam - Topic 5 Question 45 Discussion

Posted by Reynalda on Mar 06, 2026 at 03:47 PM

A Data Engineer is building a simple data pipeline using Lakeflow Declarative Pipelines (LDP) in Databricks to ingest customer data. The raw customer data is stored in a cloud storage location in JSON format. The task is to create Lakeflow Declarative Pipelines that read the raw JSON data and write it into a Delta table for further processing.

Which code snippet will correctly ingest the raw JSON data and create a Delta table using LDP?

A.

import dlt

@dlt.table

def raw_customers():

return spark.read.format("csv").load("s3://my-bucket/raw-customers/")

B.

import dlt

@dlt.table

def raw_customers():

return spark.read.json("s3://my-bucket/raw-customers/")

C.

import dlt

@dlt.table

def raw_customers():

return spark.read.format("parquet").load("s3://my-bucket/raw-customers/")

D.

import dlt

@dlt.view

def raw_customers():

return spark.format.json("s3://my-bucket/raw-customers/")

Suggested Answer: B

The correct method to define a table using Lakeflow Declarative Pipelines (LDP) is with the @dlt.table decorator, which persists the output as a managed Delta table. When ingesting raw JSON data, spark.read.json() or spark.read.format('json').load() is the standard approach. This reads JSON-formatted files from the source and stores them in Delta format automatically managed by Databricks.

Reference Source: Databricks Lakeflow Declarative Pipelines Developer Guide -- ''Create tables from raw JSON and Delta sources.''


Get Premium Databricks Certified Data Engineer Professional Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
26 comments · newest first
OZ
Ozell 1 month ago
Definitely B. Delta table needs JSON input.
MA
Matthew 1 month ago
Option A is wrong. CSV won't work for JSON data.
RO
Roxanne 2 months ago
Agreed! JSON format is key here.
BA
Basilia 2 months ago
I think Option B is the right choice. It reads JSON correctly.
NA
Nan 2 months ago
Definitely B. Delta tables need proper JSON ingestion.
MA
Mary 2 months ago
Option A is wrong. CSV won't work for JSON data.
NA
Natalya 2 months ago
Agreed! JSON format is key here.
MI
Micaela 3 months ago
I think Option B is the right choice. It reads JSON correctly.
LU
Lucille 3 months ago
Definitely B. Delta tables need proper JSON ingestion.
YU
Yuonne 3 months ago
Option A is wrong. CSV won't work for JSON data.
SH
Sherly 3 months ago
Agreed! JSON format is what we need here.
TA
Tandra 3 months ago
I think Option B is the right choice. It reads JSON correctly.
YO
Youlanda 3 months ago
Surprised that anyone would choose A or C, they don’t fit the JSON format!
GA
Gail 4 months ago
Totally agree with B, it’s the only one that matches the task!
LY
Lynsey 5 months ago
Wait, is Option D even valid? That syntax looks off.
TE
Temeka 5 months ago
I think Option A is wrong since it uses CSV format.
CH
Chanel 5 months ago
Option B is the right choice! It reads JSON correctly.
RO
Rosenda 6 months ago
I’m not sure about Option C. Parquet isn’t the format we need.
LY
Lynda 6 months ago
Wait, is D even a valid syntax? That looks off.
SA
Samira 6 months ago
Definitely going with Option B! Makes total sense.
FA
Fannie 6 months ago
I think Option A is a mistake. CSV format won't work here.
CU
Curt 6 months ago
Option B is the right choice! It reads JSON correctly.
ST
Stephania 6 months ago
I’m a bit confused about D; it uses `@dlt.view` instead of `@dlt.table`. I think that might not be the right approach for creating a Delta table.
GW
Gwenn 7 months ago
I practiced a similar question where we had to specify the format correctly. I feel like B is the most straightforward choice here.
TO
Toi 7 months ago
I'm not entirely sure, but I remember something about needing to use the correct format method. Option A uses CSV, which doesn't seem right.
LA
Lavera 7 months ago
I think the answer might be B since it specifically uses `spark.read.json`, which matches the JSON format of the data.
0/2000 characters

Save Cancel