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
import sqlglot
sql = """ SELECT
'Revenge is a dish best served cold' AS klingon_proverb
UNION ALL BY NAME
SELECT
'You will be assimilated' AS borg_proverb,
'If winning is not important, why keep score?' AS klingon_proverb"""
sqlglot.parse_one(sql, read="duckdb")
Insert By Name
importsqlglotsql="""INSERT INTO proverbs BY NAME SELECT 'Resistance is futile' AS borg_proverb"""sqlglot.parse_one(sql, read="duckdb")
List Comprehensions
importsqlglotsql="""SELECT [x.string_split(' ')[1] FOR x IN ['Enterprise NCC-1701', 'Voyager NCC-74656', 'Discovery NCC-1031'] IF x.contains('1701')] AS ready_to_boldly_go"""sqlglot.parse_one(sql, read="duckdb")
That's it I think. In general I was surprised how much is already supported by sqlglot, thanks a lot for this!
The text was updated successfully, but these errors were encountered:
DuckDB supports a number of interesting features, not all are supported yet.
See https://duckdb.org/2023/08/23/even-friendlier-sql.html
Here's what's not supported:
FROM first
Union BY NAME
Insert By Name
List Comprehensions
That's it I think. In general I was surprised how much is already supported by sqlglot, thanks a lot for this!
The text was updated successfully, but these errors were encountered: