Package codes to execute queries on BigQuery and save to local machine
Project description
Credit
This repository is forked from https://github.com/IcarusSO/bigQueryExporter
Change Log (Compare with original version)
query_to_local()
- Create a temp table with a random hash on BQ as output table, so that simultaneous execution of the function will not overwrite each other.
- Remove the temp table after the execution. (May also set keep_temp_table=True if you wish to keep them).
bigQueryExporter
Export query data from google bigquery to local machine
Installation
pip install bigQueryExporter
For Mac python 2.7
pip install bigQueryExporter --ignore-installed six
Example
from bigQueryExport import BigQueryExporter
bigQueryExporter = BigQueryExporter(project_name, dataset_name, bucket_name)
export_path = query_to_local(query, job_name, '../data')
Requirement
-
Your server/ local machine should have the right to access the project
-
Right should be granted following the insturction on Google SDK
-
Execute the following command
gcloud auth application-default login
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
Built Distribution
Close
Hashes for bigQueryExporterEnhanced-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcf66c2734fafd210f91d5c21772aef5c87e41dd075fa8e2580d65112d130624 |
|
MD5 | cfe0aa9552a72ac193abedb9cb9256db |
|
BLAKE2b-256 | 9d1a77911c9379482c444946962af6224f7d662572a8c2cf4f72ca72f57a64c5 |
Close
Hashes for bigQueryExporterEnhanced-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a9a0bd354f44ce9cffb8c54787e7f6efdb6cecf7541c82bd04f278c09b15090 |
|
MD5 | dcef880365e70e84be486c649878df8e |
|
BLAKE2b-256 | 3952f56a077e80d574cb2fe53d90a35064dfc0d03fa8c3a24505a9343fe2bcaf |