Data Engineering Associate with Databricks Practice Exam

Disable ads (and more) with a membership for a one time $4.99 payment

Study for the Data Engineering Associate exam with Databricks. Use flashcards and multiple choice questions with hints and explanations. Prepare effectively and confidently for your certification exam!

Practice this question and more.


What SQL command is used to create a global temporary view?

  1. CREATE GLOBAL TEMP VIEW name AS SELECT * FROM table;

  2. CREATE TEMPORARY GLOBAL VIEW name AS SELECT * FROM table;

  3. CREATE VIEW name AS SELECT * FROM table WITH GLOBAL TEMP;

  4. CREATE GLOBAL VIEW name AS SELECT * FROM table;

The correct answer is: CREATE GLOBAL TEMP VIEW name AS SELECT * FROM table;

The SQL command used to create a global temporary view is accurately represented by the response that states to use "CREATE GLOBAL TEMP VIEW name AS SELECT * FROM table;". This command enables the definition of a temporary view that can be accessed across different sessions. A global temporary view is particularly useful in scenarios where multiple users or sessions need to access the same temporary data without interfering with each other. Once created, this view remains available until the Spark application that created it is terminated, allowing for flexibility and convenience in querying temporary datasets. In contrast, the other options either utilize incorrect syntax or are not aligned with the established SQL standards for defining temporary views within the context of databases, especially when dealing with Spark SQL within Databricks. The essence of “CREATE GLOBAL TEMP VIEW” is specifically designed to cater to the creation of views that have a global scope, making option A the correct choice.