Both users and orders are Delta Lake tables. Which statement describes the results of querying recent_orders?
A.
All logic will execute at query time and return the result of joining the valid versions of the source tables at the time the query finishes.
B.
All logic will execute when the table is defined and store the result of joining tables to the DBFS; this stored data will be returned when the table is queried.
C.
Results will be computed and cached when the table is defined; these cached results will incrementally update as new records are inserted into source tables.
D.
All logic will execute at query time and return the result of joining the valid versions of the source tables at the time the query began.
E.
The versions of each source table will be stored in the table transaction log; query results will be saved to DBFS with each query.
The question says "Which statement describes the results of querying recent_orders?"
The question doesn't ask about the code snipped itself. This question is about the logic of "select * from recent_orders" after the creation of recent_orders.
answer is D
D is the right answer
Not sure how so many people misunderstood the actual question. It already says at the top that the table is registered as the code given, they're not executing the code again.
option D mentions "return the result of joining the valid versions of the source tables" but that's not true. when u interrogate the table resulting from a join of two tables u are not re-performing joins operations at query time anymore an the version is the one from the last time the CTAS statement was executed
Only logic there is inside create statemetn and it will execute once while executing "create table" statement. Further select queries will only select any data that was inserted during create table statement , data wont by updated automatically. So B
B. All logic will execute when the table is defined and store the result of joining tables to the DBFS; this stored data will be returned when the table is queried.
The correct answer is:
B. All logic will execute when the table is defined and store the result of joining tables to the DBFS; this stored data will be returned when the table is queried.
When the CREATE TABLE AS statement is executed, it runs the enclosed SELECT statement immediately to pull the current data from the users and orders tables where the order_date is within the last 7 days. This result is then stored as a new table called recent_orders in the Delta Lake on the DBFS (Databricks File System). Subsequent queries against recent_orders will return this stored data, and not recompute the join unless the table is updated or refreshed.
Based on typical Delta Lake behavior, option D is the most accurate description. Delta Lake queries generally execute at query time and retur
n results based on the state of the source tables at the time the query began. Delta Lake provides features for managing data versions and transactions, but it doesn't precompute and store results like option B or cache results like option C.
No. Simple no.
When you execute a create table even with a Join you DONT see the results imediatly unless you query the table.
So correct answer is B. The create table statement by default creates a Managed table, which is stored in DBFS.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
asmayassineg
Highly Voted 1 year, 3 months agopracticioner
Highly Voted 3 months, 1 week agofe3b2fc
3 months agoOnobhas01
2 months, 3 weeks agobenni_ale
1 month agobenni_ale
Most Recent 1 month agonedlo
1 month agobenni_ale
1 month, 1 week agobenni_ale
1 month, 1 week agoIsio05
5 months, 2 weeks agoimatheushenrique
5 months, 3 weeks agocoercion
6 months, 1 week agoPrashantTiwari
9 months, 2 weeks agokz_data
10 months, 2 weeks agoIWantCerts
10 months, 2 weeks agocryptoflam
10 months, 3 weeks agoaragorn_brego
1 year agoBIKRAM063
1 year agosturcu
1 year, 1 month agoSantitoxic
1 year, 2 months agoStarvosxant
1 year, 1 month agoNaveenkm
12 months ago