1

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?

1 Answers1

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