Austen Bouza
07/18/2021, 5:59 PMDictCursor
with the existing SnowflakeQuery
task? The source shows
try:
with conn:
with conn.cursor() as cursor:
executed = cursor.execute(query, params=data).fetchall()
conn.close()
return executed
while what I would want to use is:
try:
with conn:
with conn.cursor(DictCursor) as cursor:
executed = cursor.execute(query, params=data).fetchall()
conn.close()
return executed
Has anyone else dealt with this before? I’d like to simply inject the DictCursor class if possible, but from the way this block of code is written it looks like the only way to do it is to subclass SnowflakeQuery
and overwrite the entire run
method.Kevin Kho
SnowflakeQuery
task and overwriting the run method would be the way to go here unfortunately. I haven't seen anyone else deal with this, but you can open a feature request with more details if you want.Austen Bouza
07/18/2021, 8:17 PM