SQL Tokenization function? #3158
-
I'm trying to tokenize a SQL. For example select table1.`col1 with spaces`, table2.col2 from table1 join table2 order by table2.col2 to ['select', 'table1.`col1 with spaces`', 'table2.col2', 'from', 'table1', 'join', 'table2', 'order', 'by', 'table2.col2'] or something similar. Can someone point to in-built functions for doing this? I'm guessing it should be dialect-specific (e.g. |
Beta Was this translation helpful? Give feedback.
Answered by
tobymao
Mar 18, 2024
Replies: 1 comment
-
sqlglot/sqlglot/dialects/dialect.py Line 506 in 706fac3 check out the tokenizer |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
virendrakabra14
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sqlglot/sqlglot/dialects/dialect.py
Line 506 in 706fac3
check out the tokenizer