Skip to content

Commit

Permalink
no query parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 committed Sep 27, 2024
1 parent 309e2ad commit 08ad2ab
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions cdci_data_analysis/analysis/ivoa_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,16 @@

def parse_adql_query(query):
try:
# queryparser
adt = ADQLQueryTranslator(query)
qp = PostgreSQLQueryProcessor()
qp.set_query(adt.to_postgresql())
qp.process_query(replace_schema_name={'mmoda_pg_dev': 'public'})

output_obj = dict(
columns=qp.display_columns,
tables=qp.tables,
rest=qp,
mysql_query=None,
psql_query=qp.query
psql_query=adt.to_postgresql()
)

except QuerySyntaxError as qe:
logger.error(f'Error parsing ADQL query: {qe}')
output_obj = dict(
tables=None,
columns=None,
rest=None,
mysql_query=None,
psql_query=None
)
Expand Down

0 comments on commit 08ad2ab

Please sign in to comment.