Basil V
11/11/2020, 11:39 PMsnowflake_resource
in an sqlalchemy connection? Or would you guys be open to a PR to make the snowflake_resource
use sqlalchemy? The reason is, some pandas function such as .to_sql
require an sqlalchemy connection, so as far as I can tell / and via my own testing the pandas SQL utilities won't be available for Snowflake using the Dagster snowflake_resource
directly as it is now. Any thoughts?dwall
11/11/2020, 11:41 PMpandas_tools
module also has a builtin write_pandas()
method for doing this: https://docs.snowflake.com/en/user-guide/python-connector-api.html#label-python-connector-api-write-pandasdf_to_s3
solid that writes the DataFrame as a file to S3 and outputs the S3 object location, and then passes that S3 location to a downstream s3_to_snowflake
solid that dynamically builds the COPY INTO
statement based on the S3 object location:write_pandas
and .to_sql()
routesBasil V
11/11/2020, 11:55 PMwrite_pandas
function. The reason I've been wanting to use .to_sql
from my dataframe is because it will create the table for me if it doesn't exist already, with the proper schema. I'm migrating a postgres DB to snowflake and have 50+ tables to copy over, so I don't want to have to manually create each table, define types etc. Any other workaround you can think for this issue?write_pandas
won't create the table for medwall
11/12/2020, 12:09 AMCREATE TABLE
snowflake command before copying datasandy
11/12/2020, 1:21 AMBasil V
11/12/2020, 8:45 PMsandy
01/09/2021, 12:53 AMBasil V
01/13/2021, 5:26 PMsandy
01/19/2021, 4:15 PMBasil V
01/19/2021, 4:17 PM