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

Support configuring a destination for large result sets #18

Open
edgarrmondragon opened this issue Feb 28, 2024 · 3 comments
Open

Support configuring a destination for large result sets #18

edgarrmondragon opened this issue Feb 28, 2024 · 3 comments
Labels
good first issue Good for newcomers

Comments

@edgarrmondragon
Copy link
Member

BigQuery queries have a limited response size1 so syncs may fail when a large response is generated.

The python-bigquery-sqlalchemy2 library supports passing a destination query parameter so the fix for this probably involves adding a new setting (e.g. destination_table) and passing that to the SQLAlchemy URL construction in

def get_sqlalchemy_url(self, config: dict) -> str:
"""Concatenate a SQLAlchemy URL for use in connecting to the source."""
return f"bigquery://{config['project_id']}"

The string in question is a fully qualified table, e.g. different-project.different-dataset.table.

Footnotes

  1. https://cloud.google.com/bigquery/docs/writing-results

  2. https://github.com/googleapis/python-bigquery-sqlalchemy?tab=readme-ov-file#connection-string-parameters

@edgarrmondragon edgarrmondragon added the good first issue Good for newcomers label Feb 28, 2024
@AlejandroUPC
Copy link

Hello @edgarrmondragon I will happily work on this I am just a bit lost and I do not really understand the issue, how would destination solve this? Also tagging @pnadolny13 to understand why it was decided to go w/ sqlalchemy instead of using standard google.cloud bigquery client?

@edgarrmondragon
Copy link
Member Author

Hello @edgarrmondragon I will happily work on this I am just a bit lost and I do not really understand the issue

@AlejandroUPC You might wanna read through https://cloud.google.com/bigquery/docs/writing-results#large-results.

Have you run into this issue?

@ReubenFrankel
Copy link

Would #24 cover this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants