Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write_dataframe() does not finish #250

Open
LuchiLucs opened this issue Feb 3, 2025 · 2 comments
Open

write_dataframe() does not finish #250

LuchiLucs opened this issue Feb 3, 2025 · 2 comments

Comments

@LuchiLucs
Copy link

I'm trying to write a pandas.DataFrame into a table using the write_dataframe function but I tried waiting 10 minutes, and it does not finish.

I limited the size of the dataframe to have around 70 rows and 40 columns, the problem persists.

In the debugger, the code is stuck when calling the libray code self.executemany(sql, arrays) into write_dataframe .

How can I know what is the problem? I can read successfully another table. The table where I want to write was just created for testing purpouses.

Thanks

@LuchiLucs LuchiLucs changed the title write_dataframe() does not finished write_dataframe() does not finish Feb 3, 2025
@LuchiLucs
Copy link
Author

Trying more I faced another problem that was: the cursor used on the write_dataframe function seems to overwrite the cursor params style and uses internally only position based formatting like insert values (%s, %s, ...) so I had to reorder the pandas DataFrame columns based on the same order of the Redshift table columns.

I'm using:

  1. Python 3.9.20
  2. pandas>=2.2.3
  3. redshift-connector>=2.1.5

@LuchiLucs
Copy link
Author

Pinning pandas < 2.0, numpy < 2.0 let me run the query. Are the updated docs where it is stated the supported versions of the libraries integrations?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant