
Answer-first summary for fast verification
Answer: Use the CREATE VIEW statement followed by a SELECT query that uses the csv prefix to reference the CSV file.
In Databricks SQL, to create a permanent view that directly references a CSV file stored in DBFS, you use the CREATE VIEW statement followed by a SELECT query. Within the SELECT query, you reference the CSV file by using the csv prefix after the FROM keyword. This method allows the view to query data directly from the CSV file without needing to load it into a table first.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
What is the correct method to create a permanent view in Databricks SQL that directly references data from a CSV file stored in DBFS?
A
Use the CREATE PERMANENT VIEW statement and specify the CSV file path directly after the FROM keyword.
B
Permanent views cannot reference CSV files directly; they must be loaded into a table first.
C
Use the CREATE VIEW statement with the USING csv option followed by the path to the CSV file.
D
Use the CREATE VIEW statement followed by a SELECT query that uses the csv prefix to reference the CSV file.
No comments yet.