DATABRICKS-CERTIFIED-DATA-ENGINEER-ASSOCIATE · Question #1
A data engineer needs to create a table in Databricks using data from their organization's existing SQLite database. They run the following command: Which of the following lines of code fills in the…
The correct answer is A. org.apache.spark.sql.jdbc. When reading from an external relational database like SQLite in Databricks/Spark, you must use the JDBC data source format. The correct format string is 'org.apache.spark.sql.jdbc', which tells Spark to use its built-in JDBC connector to communicate with the external database…
Question
Exhibit
Options
- Aorg.apache.spark.sql.jdbc
- Bautoloader
- CDELTA
- Dsqlite
- Eorg.apache.spark.sql.sqlite
How the community answered
(63 responses)- A87% (55)
- B6% (4)
- C2% (1)
- D3% (2)
- E2% (1)
Explanation
When reading from an external relational database like SQLite in Databricks/Spark, you must use the JDBC data source format. The correct format string is 'org.apache.spark.sql.jdbc', which tells Spark to use its built-in JDBC connector to communicate with the external database. Options like 'autoloader' (used for cloud file ingestion), 'DELTA' (Delta Lake format), 'sqlite' (not a valid Spark format string), and 'org.apache.spark.sql.sqlite' (does not exist) are all incorrect because Spark does not have a SQLite-specific connector - it uses JDBC as the universal bridge for relational databases.
Topics
Community Discussion
No community discussion yet for this question.
