Skip to content

Instantly share code, notes, and snippets.

@asmega
Last active July 9, 2021 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asmega/7cd47caafc02a0ff51d83444ce98e014 to your computer and use it in GitHub Desktop.
Save asmega/7cd47caafc02a0ff51d83444ce98e014 to your computer and use it in GitHub Desktop.
simplest way to upload csv google bigquery
docker pull google/cloud-sdk:latest
docker run --rm -it docker.io/google/cloud-sdk:latest
gcloud auth activate-service-account --key-file=/google-service-account.json
# auto detect csv headers
# replace table contents with csv file
bq load --autodetect --replace mydb.mytable /data.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment