
Answer-first summary for fast verification
Answer: ```sql CREATE TABLE orders USING org.apache.spark.sql.jdbc OPTIONS ( url “jdbc:sqlite:/bookstore.db“, dbtable “orders“ ) ```
Spark SQL can extract data from any existing relational database that supports JDBC, such as SQLite, using the JDBC library. This method allows for seamless integration and data manipulation within Spark. Reference: [Microsoft Learn](https://learn.microsoft.com/en-us/azure/databricks/external-data/jdbc)
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
How can a data engineer register the table orders from an existing SQLite database?
A
CREATE TABLE orders USING org.apache.spark.sql.jdbc OPTIONS (
url “jdbc:sqlite:/bookstore.db“,
dbtable “orders“
)
CREATE TABLE orders USING org.apache.spark.sql.jdbc OPTIONS (
url “jdbc:sqlite:/bookstore.db“,
dbtable “orders“
)
B
CREATE TABLE orders USING sqlite OPTIONS (
url “jdbc:sqlite:/bookstore.db“,
dbtable “orders“
)
CREATE TABLE orders USING sqlite OPTIONS (
url “jdbc:sqlite:/bookstore.db“,
dbtable “orders“
)
C
CREATE TABLE orders USING cloudfiles OPTIONS (
url “jdbc:sqlite:/bookstore.db“,
dbtable “orders“
)
CREATE TABLE orders USING cloudfiles OPTIONS (
url “jdbc:sqlite:/bookstore.db“,
dbtable “orders“
)
D
CREATE TABLE orders USING EXTERNAL OPTIONS (
url “jdbc:sqlite:/bookstore.db“,
dbtable “orders“
)
CREATE TABLE orders USING EXTERNAL OPTIONS (
url “jdbc:sqlite:/bookstore.db“,
dbtable “orders“
)
E
CREATE TABLE ordersUSING DATABASEOPTIONS (
url “jdbc:sqlite:/bookstore.db“,
dbtable “orders“
)
CREATE TABLE ordersUSING DATABASEOPTIONS (
url “jdbc:sqlite:/bookstore.db“,
dbtable “orders“
)