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

Allow aws_access_key_id, aws_secret_access_key for wr.redshift.copy(), wr.redshift.unload() #484

Closed
data-bot-st opened this issue Dec 18, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request minor release Will be addressed in the next minor release ready to release
Milestone

Comments

@data-bot-st
Copy link
Contributor

Is your idea related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I'd like to be able to use aws_access_key_id and aws_secret_access_key for copy and unload operations to redshift.

I don't have an iam_role for these operations, but I do have redshift credentials and iam credentials for s3 operations.

I don't have aws glue to tie these services together, but would like to be able to use this library.

Describe the solution you'd like
A clear and concise description of what you want to happen.

import redshift_connector
import awswrangler as wr

connection_dict = dict(host='*.redshift.amazonaws.com',
    database='*',
    user='*',
    password='*',
    port=*)


con_redshift = redshift_connector.connect(**connection_dict)


df = wr.redshift.read_sql_query("select * from *.*", con=con_redshift)


path = 's3://bucket/test_load'


wr.redshift.copy(
    df=df,
    path=path,
    con=con_redshift,
    schema="public",
    table="table_name",
    mode="overwrite",
    aws_access_key_id='*',
    aws_secret_access_key='*'
)


P.S. Don't attach files. Please, prefer add code snippets directly in the message body.

@data-bot-st data-bot-st added the enhancement New feature or request label Dec 18, 2020
@igorborgest igorborgest added this to the 2.2.0 milestone Dec 21, 2020
@igorborgest igorborgest added the WIP Work in progress label Dec 21, 2020
@data-bot-st
Copy link
Contributor Author

@igorborgest ❤️ ❤️ ❤️ ❤️ ❤️

@igorborgest
Copy link
Contributor

Released on version 2.2.0

Thanks @danielwo !

@igorborgest igorborgest added minor release Will be addressed in the next minor release ready to release and removed WIP Work in progress labels Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor release Will be addressed in the next minor release ready to release
Projects
None yet
Development

No branches or pull requests

3 participants