Skip to main content

Easily integrate data in BigQuery

Project description

PyGBQ

Easily integrate data in BigQuery

Example

The following snippet

from pygbq import gbq, set_dataset
set_dataset('Finance')


@gbq(how='replace')
def transactions(start_date):
    data = ...
    return data

if __name__ == "__main__":
    transactions("2020-11-25")

will (re)create table Finance.transactions in your default project.

Install and set up

pip install pygbq

Set up the authentication.

Documentation

gbq - main decorator update_table_using_temp - if you want to use the decorator as a function table - friendly interface to get a table from BigQuery set_dataset - set default dataset in the project MyError - if you need to return a value with Flask read_jsonl generate_schema - might be useful for the first integration when you want to see schema get_secret add_secret

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygbq-0.11.tar.gz (9.4 kB view hashes)

Uploaded Source

Built Distribution

pygbq-0.11-py3-none-any.whl (10.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page