I want to parse sql file using python code and find any syntatical error present in the file. Is there any way to do it?
Asked
Active
Viewed 458 times
1 Answers
1
You can use https://github.com/tobymao/sqlglot
import sqlglot
sqlglot.parse_one("select (")
>> sqlglot.errors.ParseError: Expecting ). Line 1, Col: 8.
select (

Toby Mao
- 374
- 2
- 6