Skip to content

write_dataframe() does not finish #250

Description

@LuchiLucs

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

Activity

  1. changed the title [-]write_dataframe() does not finished[/-] [+]write_dataframe() does not finish[/+] on Feb 3, 2025
  2. LuchiLucs commented on Feb 4, 2025

    @LuchiLucs
    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
  3. LuchiLucs commented on Feb 4, 2025

    @LuchiLucs
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions