mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-30 12:06:00 +00:00
feat(ingest): make query formatting more robust (#10678)
This commit is contained in:
parent
05aee03f3f
commit
1d4977cbb7
@ -315,8 +315,8 @@ def try_format_query(
|
||||
|
||||
try:
|
||||
dialect = get_dialect(platform)
|
||||
expression = parse_statement(expression, dialect=dialect)
|
||||
return expression.sql(dialect=dialect, pretty=True)
|
||||
parsed_expression = parse_statement(expression, dialect=dialect)
|
||||
return parsed_expression.sql(dialect=dialect, pretty=True)
|
||||
except Exception as e:
|
||||
if raises:
|
||||
raise
|
||||
|
Loading…
x
Reference in New Issue
Block a user