4 ms·
how well does the flatten() translation work in practice? every time i've used localstack or similar the queries work locally then break in subtle ways once dep
by dmarwicke 9mo ago
how well does the flatten() translation work in practice? every time i've used localstack or similar the queries work locally then break in subtle ways once deployed
- sr-white 9mo agoGood question! Currently FLATTEN does a simple translation to DuckDB's UNNEST, which works for basic array expansion but won't give you the full Snowflake output columns (SEQ, KEY, PATH, INDEX, VALUE, THIS) or the named parameter syntax (input => ...). That said, a more complete implementation is definitely doable — DuckDB has the primitives (unnest, generate_subscripts, json_each) to build this properly. If this is something you'd find useful, feel free to open an issue with your use case. Happy to prioritize it if there's demand!