SnowPro Advanced: Data Engineer — Question 125
When would a Data Engineer use TABLE with the FLATTEN function instead of the LATERAL FLATTEN combination?
Answer options
- A. When TABLE with FLATTEN requires another source in the FROM clause to refer to.
- B. When TABLE with FLATTEN requires no additional source in the FROM clause to refer to.
- C. When the LATERAL FLATTEN combination requires no other source in the FROM clause to refer to.
- D. When TABLE with FLATTEN is acting like a sub-query executed for each returned row.
Correct answer: B
Explanation
The correct answer is B because TABLE with FLATTEN is designed to operate without needing any other source in the FROM clause, making it simpler for certain use cases. Option A is incorrect since it describes a situation where an additional source is necessary, which contradicts the use of TABLE with FLATTEN. Options C and D do not apply to the specific conditions under which TABLE with FLATTEN is preferred over LATERAL FLATTEN.