
Answer-first summary for fast verification
Answer: CREATE TABLE users USING JDBC OPTIONS (url = "jdbc:sqlite:/${da.username}_ecommerce.db", dbtable = "users")
SQL databases are a common data source, and Databricks provides a standard JDBC driver for connecting to various SQL databases. The correct syntax for creating a connection to an SQLite database, which uses a local file for storage and does not require a port, username, or password, is to use the `USING JDBC` clause. This method captures the schema information from the external system without persisting data locally. The storage properties, including any connection credentials, are automatically redacted for security.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
To create a table named users in Databricks by extracting data from an external SQLite database named ecommerce, which of the following queries should you use?
A
CREATE TABLE users USING SQLite OPTIONS (url = "jdbc:sqlite:/${da.username}_ecommerce.db", dbtable = "users")
B
CREATE TABLE users USING DATABASE OPTIONS (url = "jdbc:sqlite:/${da.username}_ecommerce.db", dbtable = "users")
C
CREATE TABLE users USING SQL OPTIONS (url = "jdbc:sqlite:/${da.username}_ecommerce.db", dbtable = "users")
D
CREATE TABLE users USING JDBC OPTIONS (url = "jdbc:sqlite:/${da.username}_ecommerce.db", dbtable = "users")
E
CREATE TABLE users USING ODBC OPTIONS (url = "jdbc:sqlite:/${da.username}_ecommerce.db", dbtable = "users")
No comments yet.