Skip to content

Commit

Permalink
add warnings when unable to parse sql query
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylJonny committed Oct 23, 2024
1 parent b0c8c08 commit ff211af
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,12 @@ def _get_affected_tables(self) -> str:
return ""

def get_raw_query(self, sql_query: str) -> str:
parsed = parse_one(sql_query)
return parsed.sql(comments=False)
try:
parsed = parse_one(sql_query)
return parsed.sql(comments=False)
except Exception as e:
logger.warning(e)
return sql_query


class DremioDataset:
Expand Down

0 comments on commit ff211af

Please sign in to comment.