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

redshift_fixture does not play nice with pandas.DataFrame.to_sql #25

Closed
the-real-json opened this issue Mar 11, 2019 · 1 comment
Closed

Comments

@the-real-json
Copy link

When attempting to use insert data into the redshift fixture via pandas.DataFrame.to_sql, no error message of any kind is emitted but no rows get inserted. Since there is a workaround (see below), it would be great if at least we can track down any error messages being dropped and report back to the user.

Ideally, of course, we fix the underlying issue to make to_sql work correctly, but the urgency is not as great since a workaround exists.

The workaround is

pandas_sql_engine = SQLDatabase(engine=_redshift, schema=schema)
sql_table = SQLTable(
    name=table,
    pandas_sql_engine=pandas_sql_engine,
    frame=data,
    schema=schema,
    index=False,
)
sql_table.insert()
@oakhan3
Copy link
Collaborator

oakhan3 commented Apr 11, 2019

Closing this for now as I can't seem to reproduce the issue locally or in CI!

@oakhan3 oakhan3 closed this as completed Apr 11, 2019
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

2 participants