Hi, I am using GX v0.17.22 with following setup of other libraries -
sqlalchemy - 1.4.49
cx_Oracle - 8.3.0
snowflake-sqlalchemy - 1.5.0
I cannot use latest SQLAlchemy as snowflake-sqlalchemy is not compatible with it.
My problem is that if I try to set up a query asset, GX signals SQLAlchemy to add FROM DUAL clause to the query, which screws up the syntax and the validation fails.
Query Asset Definition -
src_table=src_ds.add_query_asset(name=src_table_name+“_filtered”,query=“SELECT * FROM POCSCHEMA.EMP WHERE EMPNO<7800”)
Generated Query -
CREATE GLOBAL TEMPORARY TABLE gx_temp_42a00eb0 ON COMMIT PRESERVE ROWS AS SELECT * FROM (SELECT * FROM POCSCHEMA.EMP WHERE EMPNO<7800 FROM DUAL) anon_1
WHERE 1 = 1
The FROM DUAL clause is added at a wrong place, and with query defined correctly, it is not needed at all. Please let me know if there is a way to prevent this behavior.