No project description provided
Project description
bq_loader
Install
pip install bq_loader
# toolkit error
# pip install prompt_toolkit==1.0.14
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')
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
bq_loader-0.1.2.tar.gz
(5.6 kB
view hashes)