Reputation: 23
While loading data from python dataframe to snowflake I am getting below error. Can someone please explain these errors in details?
Python data type [method] cannot be automatically mapped to Snowflake data type. Specify the snowflake data type explicitly.
Below is the code I am using to load data into snowflake:
df.to_sql(table, engine, index=False, method='multi',chunksize=3000)
Upvotes: 1
Views: 1026
Reputation: 12766
You should be using the Snowflake Connector for Python with pandas to read and write data to Snowflake. Assuming you have this set up correctly, then when calling to_sql
you need to use method=pd_writer
, as per the documentation.
You are currently using method=multi
which is probably why you are receiving the above error.
Upvotes: 2