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

Can we pass the credentials directly as dictionary/json instead of key json file path? #331

Closed
Mansi-Chauhan27 opened this issue Sep 3, 2021 · 2 comments · Fixed by #737
Assignees
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. type: docs Improvement to the documentation for an API.

Comments

@Mansi-Chauhan27
Copy link

Mansi-Chauhan27 commented Sep 3, 2021

Actually I want to take credentials as input from the user and saving it in the file would be not appropriate, so is there a way where i can directly pass credentals to connect method instead of json key file path?

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. label Sep 3, 2021
@meredithslota meredithslota added the type: question Request for information or clarification. Not an issue. label Sep 10, 2021
@DanielArndt
Copy link

I had a similar issue, so I dug into the source to see how difficult this would be to implement.

Surprise! It already is implemented, it just isn't documented. The argument you're looking for is credentials_info.

create_engine('bigquery://my-project', credentials_info=python_dictionary)

@aribray aribray self-assigned this Jul 26, 2022
@meredithslota meredithslota added type: docs Improvement to the documentation for an API. and removed type: question Request for information or clarification. Not an issue. labels Jan 25, 2023
@meredithslota
Copy link

Reclassifying this as a type: docs issue based on the above comment. Thanks, @DanielArndt!

@alvarowolfx alvarowolfx self-assigned this Jan 26, 2023
gcf-merge-on-green bot pushed a commit that referenced this issue Feb 9, 2023
Document how to pass the credentials directly as dictionary/json instead of key json file path.

Fixes #331  🦕
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. type: docs Improvement to the documentation for an API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants