nerdexam
Databricks

DATABRICKS-CERTIFIED-DATA-ENGINEER-ASSOCIATE · Question #36

A data engineer has developed a data pipeline to ingest data from a JSON source using Auto Loader, but the engineer has not provided any type inference or schema hints in their pipeline. Upon…

The correct answer is B. JSON data is a text-based format. JSON is a text-based, human-readable format. While JSON values can semantically represent booleans, numbers, and nulls, they are ultimately stored as character sequences. When Auto Loader processes JSON files without schema hints or the cloudFiles.inferColumnTypes option…

Submitted by helene.fr· Apr 18, 2026ELT with Spark SQL and Python

Question

A data engineer has developed a data pipeline to ingest data from a JSON source using Auto Loader, but the engineer has not provided any type inference or schema hints in their pipeline. Upon reviewing the data, the data engineer has noticed that all of the columns in the target table are of the string type despite some of the fields only including float or boolean values. Which of the following describes why Auto Loader inferred all of the columns to be of the string type?

Options

  • AThere was a type mismatch between the specific schema and the inferred schema
  • BJSON data is a text-based format
  • CAuto Loader only works with string data
  • DAll of the fields had at least one null value
  • EAuto Loader cannot infer the schema of ingested data

How the community answered

(18 responses)
  • B
    94% (17)
  • D
    6% (1)

Explanation

JSON is a text-based, human-readable format. While JSON values can semantically represent booleans, numbers, and nulls, they are ultimately stored as character sequences. When Auto Loader processes JSON files without schema hints or the cloudFiles.inferColumnTypes option enabled, it conservatively defaults to representing all fields as strings - because reading them as strings is always safe and lossless, whereas assuming a numeric or boolean type could cause errors if any record deviates. Auto Loader is fully capable of schema inference and does work with non-string data; the root cause here is specifically the text-based nature of JSON and the absence of explicit type inference configuration.

Topics

#Auto Loader#Schema Inference#JSON Data#Data Ingestion

Community Discussion

No community discussion yet for this question.

Full DATABRICKS-CERTIFIED-DATA-ENGINEER-ASSOCIATE Practice