🔥 3-day streak
Snowflake SnowPro Core (COF-C03)44 / 148
Question 44 of 148
A data engineer is transforming a raw table named ORDERS that has a VARIANT column ITEMS containing a JSON array of line items. Some order rows have an empty ITEMS array or a NULL ITEMS value. The engineer writes a query using LATERAL FLATTEN to explode the array into one row per line item, but notices that orders with empty or NULL arrays disappear entirely from the result set. The requirement is to keep exactly one row for every order, even when it has no line items (returning NULL for the line-item columns in that case). Which change should the engineer make to the FLATTEN call?
Reviewed for accuracy · Report an issueNext question