Open
Description
Working with Oracle databases can be tricky sometime, especially with double quotes and aliases. In the current state, there is a bug around the WITH clause that does not encapsulate the alias inside double quotes which is inconsistent with other clauses. It can lead to invalid identifier on Oracale as demonstrated with the query
sub_query = Query().from_(my_table).where(my_table.ID == "12345").select(my_table.ID)
QN = AliasedQuery("sub_query_with")
query = (
Query()
.with_(sub_query, "sub_query_with")
.from_(QN)
.select(
QN.star
)
)
df_temp = claim_conn.read_dataframe(query.get_sql())
A workaround has been proposed here working with UPPERCASE aliases, but with a proper management of double quotes inside WITH clause it would be better
Metadata
Metadata
Assignees
Labels
No labels