New Year Sale 2026! 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

Actual exam question for Databricks's Databricks Certified Data Engineer Professional exam
Question #: 45
Topic #: 5
[All Databricks Certified Data Engineer Professional Questions]

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/")

Show Suggested Answer Hide Answer
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.''


Contribute your Thoughts:

0/2000 characters

Currently there are no comments in this discussion, be the first to comment!


Save Cancel