Skip to content

Conversation

@maxispeicher
Copy link
Contributor

Issue #545:

Description of changes:
Add a flag for using the column names of the DataFrame in to_sql of mysql, postgresql, sqlserver and redshift for the creation of the INSERT INTO query. When the flag is set to False (the default), the behavior will stay the same, but when it is set to True, data will only be inserted into columns which exist in the DataFrame.

PS: @igorborgest Could you maybe run the new Redshift test as Redshift is unfortunately not available in AWS Educate. sqlserver, postgresql and mysql are tested.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@igorborgest igorborgest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@igorborgest igorborgest self-requested a review March 9, 2021 15:02
Copy link
Contributor

@igorborgest igorborgest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems great @maxispeicher !

You just need to replace "test" by "public" on the Redshift test case.

@igorborgest igorborgest added this to the 2.6.0 milestone Mar 9, 2021
@igorborgest igorborgest added the enhancement New feature or request label Mar 9, 2021
@maxispeicher maxispeicher requested a review from igorborgest March 9, 2021 15:17
Copy link
Contributor

@igorborgest igorborgest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @maxispeicher !

@jaidisido jaidisido merged commit fbea66b into aws:main Mar 9, 2021
@maxispeicher maxispeicher deleted the to_sql_use_column_names branch March 9, 2021 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants