bq_loader - Interactive Command Line Interface for Google BigQuery
Install
pip install bq_loader
Authentication
This package is built on top of Google libraries. To use this package you need to authenticate with your google account. For more information see: https://cloud.google.com/storage/docs/authentication.
You can use the package gcloud to authenticate yourself.
gcloud auth
Usage
Command Line Interface
bqloader
API
Create a table from a local file or directory
from bq_loader import create_table_from_local
create_table_from_local(table_id='snapshot',
project_id='subugoe-collaborative',
dataset_id='resources',
file_path='test_data/*',
schema_file_path='test_schema/schema_crossref.json',
source_format='jsonl',
write_disposition='WRITE_APPEND',
table_description='Test Table generated by bq_loader',
ignore_unknown_values=True)
Create a table from a Google Bucket
from bq_loader import create_table_from_bucket
create_table_from_bucket(uri='gs://bigschol/tests/*',
table_id='bq_loader_test',
project_id='subugoe-collaborative',
dataset_id='resources',
schema_file_path='test_schema/schema_crossref.json',
source_format='jsonl',
write_disposition='WRITE_EMPTY',
table_description='Test Table generated by bq_loader',
ignore_unknown_values=True)
Upload local files to a Google Bucket
from bq_loader import upload_files_to_bucket
upload_files_to_bucket(bucket_name='bigschol',
file_path='test_data/*',
gcb_dir='tests')
Metadata
Release files for bq-loader 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bq_loader-0.1.7.tar.gz | 7.0 kB | Without provenance | Details |
Release files / bq_loader-0.1.7.tar.gz
| Download URL | bq_loader-0.1.7.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46ce29a98c231ffa22ac234cb8998a469f8475d78f7f2f263e0f2630179fb8e3
|
|
BLAKE2b-256 checksum How to use checksums |
76f7558cfdaeec04dea5c764efa8fb4cd332970d6f05fadc9068d109660a14fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.12
|
Security for bq-loader 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.