Open ArVar opened 3 years ago
Tried similar piece of code with bind parameters which is working fine.
engine = create_engine("netezza+nzpy://admin:password@localhost:5480/testpy")
conn = engine.connect()
stmt = text('select count(*) from _v_table where objid > 200000 and tablename = :name and schema = :schema')
result = conn.execute(stmt, name='TEST', schema='ADMIN')
Output:
$ python3 nzpyparam.py
count: 1
Query is processed in below order(from logs):
select count(*) from _v_table where objid > 200000 and tablename = NULL and schema = NULL
select count(*) from _v_table where objid > 200000 and tablename = \'TEST\' and schema = \'ADMIN\'
Could you please elaborate issue you are facing and provide sample application with logs for further investigation.
The statement
ist processed to
which is transformed by nzpy to
This is the final statement which is executed. As a result the
has_table
method returns a wrong value, namelyFalse
insteadTrue
. Is this somehow an interference of nzpy and nzalchemy?