You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importsqlglotsql_code="""SELECT c_name, orders.o_orderkey AS orderkey, index AS orderkey_indexFROM customer_orders_lineitem c, c.c_orders AS orders AT index ORDER BY orderkey_index;"""expressions=sqlglot.parse(sql_code, read="redshift")
Output:
sqlglot.errors.ParseError: Invalid expression / Unexpected token. Line 5, Col: 56. y AS orderkey, index AS orderkey_indexFROM customer_orders_lineitem c, c.c_orders AS orders AT index ORDER BY orderkey_index;
Same for query:
SELECT attr as attribute_name, json_typeof(val) as value_type
FROM customer_orders_lineitem c, UNPIVOT c.c_orders[0] AS val AT attr
WHERE c_custkey =9451;
Fully reproducible code snippet
Code:
Output:
Same for query:
Official Documentation
https://docs.aws.amazon.com/redshift/latest/dg/query-super.html#unnest
The text was updated successfully, but these errors were encountered: