python package for uploading local csv files to google bigquery
$ pip install csv2bq
Place your service account key file in ~/.config/gcloud/application_default_credentials.json
$ csv2bq sample.csv --project_id=sample --dataset_id=sample --table_id=sample
Parameter | Description |
---|---|
project_id | project id (required) |
dataset_id | dataset id (required) |
table_id | table id (required) |
mode | append or overwrite (default: append) |
auto_create_table | auto create table (default: True) |