Ellie Redding
07/21/2022, 3:23 PMsnowflake_multiquery
was throwing Object of type SecretStr is not JSON serializable
errors from this line of code in the connector, where it dumps the request body, including connection auth info, into the request. I got around this for now by changing the password here from type SecretStr
to str
, but that’s obviously not a great solution đŸ˜… Has anyone else run into this issue?Kevin Kho
07/21/2022, 3:49 PMEllie Redding
07/21/2022, 3:56 PMfrom prefect_snowflake import SnowflakeCredentials
from prefect_snowflake.database import snowflake_multiquery
@flow(name="my-flow")
def sync_to_snowflake():
...
credentials = SnowflakeCredentials(
account=config['account'],
user=config['user'],
password=config['password'],
database=config['db'],
warehouse=config['wh']
)
for table in tables:
queries = build_queries(table)
snowflake_multiquery(queries, credentials)