Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Databricks Exam Databricks Certified Data Analyst Associate Topic 4 Question 16 Discussion

Actual exam question for Databricks's Databricks Certified Data Analyst Associate exam
Question #: 16
Topic #: 4
[All Databricks Certified Data Analyst Associate Questions]

The stakeholders.customers table has 15 columns and 3,000 rows of data. The following command is run:

After running SELECT * FROM stakeholders.eur_customers, 15 rows are returned. After the command executes completely, the user logs out of Databricks.

After logging back in two days later, what is the status of the stakeholders.eur_customers view?

Show Suggested Answer Hide Answer
Suggested Answer: B

The command you sent creates a TEMP VIEW, which is a type of view that is only visible and accessible to the session that created it. When the session ends or the user logs out, the TEMP VIEW is automatically dropped and cannot be queried anymore. Therefore, after logging back in two days later, the status of the stakeholders.eur_customers view is that it has been dropped and SELECT * FROM stakeholders.eur_customers will result in an error. The other options are not correct because:

A) The view does not remain available, as it is a TEMP VIEW that is dropped when the session ends or the user logs out.

C) The view is not available in the metastore, as it is a TEMP VIEW that is not registered in the metastore. The underlying data cannot be accessed with SELECT * FROM delta.stakeholders.eur_customers, as this is not a valid syntax for querying a Delta Lake table. The correct syntax would be SELECT * FROM delta.dbfs:/stakeholders/eur_customers, where the location path is enclosed in backticks. However, this would also result in an error, as the TEMP VIEW does not write any data to the file system and the location path does not exist.

D) The view does not remain available, as it is a TEMP VIEW that is dropped when the session ends or the user logs out. Data in views are not automatically deleted after logging out, as views do not store any data. They are only logical representations of queries on base tables or other views.

E) The view has not been converted into a table, as there is no automatic conversion between views and tables in Databricks. To create a table from a view, you need to use a CREATE TABLE AS statement or a similar command.Reference:CREATE VIEW | Databricks on AWS,Solved: How do temp views actually work? - Databricks - 20136,temp tables in Databricks - Databricks - 44012,Temporary View in Databricks - BIG DATA PROGRAMMERS,Solved: What is the difference between a Temporary View an ...


Contribute your Thoughts:

Avery
12 months ago
I think the view remains available but attempting to SELECT from it results in an empty result set because data in views are automatically deleted after logging out.
upvoted 0 times
...
Maynard
12 months ago
But the underlying data can still be accessed with SELECT * FROM delta. `stakeholders.eur_customers`.
upvoted 0 times
...
Ilona
12 months ago
I believe the view has been dropped.
upvoted 0 times
...
Samira
1 years ago
Wait, did the question say the user logged out or got logged out? There's a difference, you know. Anyway, I'm going with B just to be safe.
upvoted 0 times
Dannette
11 months ago
I agree, I also think the view has been dropped.
upvoted 0 times
...
Jettie
12 months ago
I think the view has been dropped.
upvoted 0 times
...
...
Maynard
1 years ago
I think the view remains available and SELECT * FROM stakeholders.eur_customers will execute correctly.
upvoted 0 times
...
Evangelina
1 years ago
Ah, the joys of Databricks and its ever-changing views. Reminds me of that old saying, 'The only constant in life is change, and the only constant in Databricks is confusion.'
upvoted 0 times
...
An
1 years ago
I hope the answer isn't E, or else we'll have to start calling it a 'stakel' instead of a 'view'.
upvoted 0 times
...
Katina
1 years ago
I think the answer is A. The view should remain available even after the user logs out, as views are persistent objects in the metastore.
upvoted 0 times
Jacqueline
12 months ago
Yes, that's correct. Views are stored in the metastore and are not affected by logging out.
upvoted 0 times
...
Daryl
1 years ago
I agree, views are persistent objects so the view should still be available.
upvoted 0 times
...
...

Save Cancel