The FLATTEN table function expands semi-structured data such as arrays or objects stored in VARIANT columns. Its output includes several metadata columns, and the most important among them isVALUE, which contains the extracted element from the array or object. VALUE is the column that developers typically join on or reference to access the flattened data.
In addition to VALUE, FLATTEN returns KEY (for object keys), INDEX (position in arrays), SEQ (internal ordering), and PATH (hierarchical reference path). These other columns support analytical or transformation logic, but VALUE remains the primary output used for downstream SQL.
The other listed options—OUTPUT, ROWNUM, and LEVEL—are not part of the FLATTEN function’s output schema. ROWNUM and LEVEL may appear in other SQL contexts but not in FLATTEN results. Therefore, the correct answer is VALUE.
==================
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit