https://flyte.org logo
#ask-the-community
Title
# ask-the-community
g

Greg Linklater

02/02/2024, 2:10 PM
Question: is anyone actually using the
SQLAlchemyTask
plugin for anything useful? In theory it would be really nice to avoid repeated boilerplate code but I seem to keep running into this problem of being unable to template secrets into the connection uri… specifically the combination of sqlalchemy + pyodbc requires that credentials are passed into the uri and there is no way to pass them using
connect_args
. Anyone else run into problems like this?
m

Maciej Kopczyński

02/05/2024, 10:34 PM
I use it without such issues, I have followed this doc. If you can paste a specific error message I will try my best to help. On the other hand, I am not sure if
SQLAlchemyTask
is the best option in general - while it is fine for selects, it does not seem to do much for inserting data.
k

Ketan (kumare3)

02/06/2024, 3:44 PM
Ya I agree, with fast registration it might be faster to use it directly and revamp it
g

Greg Linklater

02/07/2024, 12:45 PM
My issue is the pyodbc (connector underpinning sqlalchemy connection to MSSQL) cannot accept secrets from
connect_args
and there’s currently no way to template secrets into the uri… I have been able to use
SQLAlchemyTask
to connect to Postgres, but only because psycopg2 is able to consume connection information from the
connect_args
. Otherwise, yes it is seeming that it is just better to use sqlalchemy directly — even when only considering the select statement use case, this also gives control over things like streaming/chunked responses. It is just a little unfortunate that I have to repeat a lot of boilerplate code every time I want to do this.