A table is registered with the following code: 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.
As Benni_ale said - CTAS can be used to create a snapshot of a table. The data will be stored and not updated further, unless table is explicitly updated.
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
It's B because this is different from creating a view (which would use CREATE VIEW instead), where the query logic would be executed each time the view is accessed.
B - it is a table.
Query time answers assume we are talking about a view, which we aren't. Table is not automatically updated whenever the tables used in CTAS change - it is a standalone entity.
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.
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, 7 months agopracticioner
Highly Voted 7 months, 1 week agofe3b2fc
7 months, 1 week agoOnobhas01
6 months, 3 weeks agoHairyTorso
2 months, 3 weeks agobenni_ale
5 months agolakime
Most Recent 2 days, 21 hours agoTedet
4 weeks agoptty
1 month agoarekm
2 months, 3 weeks agoSriramiyer92
3 months, 2 weeks agobenni_ale
5 months agonedlo
5 months agobenni_ale
5 months, 1 week agobenni_ale
5 months, 1 week agoIsio05
9 months, 3 weeks agoimatheushenrique
9 months, 4 weeks agocoercion
10 months, 1 week agoPrashantTiwari
1 year, 1 month agokz_data
1 year, 2 months agoIWantCerts
1 year, 2 months ago