gcutil

module
v0.0.0-...-534e82c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2016 License: Apache-2.0

README

gcutil

Google Cloud Utils in Go

Usage

  1. Download pemission json file from google cloud console and save it to ~/.config/gcloud/application_default_credentials.json, see https://godoc.org/golang.org/x/oauth2/google#DefaultTokenSource

  2. Enable storage JSON API.

  3. Setup bigquery project, dataset and storage bucket.

  4. Create job config files, see bqclient/testdata/goodjobs01/ for example

  5. Run bq queries and export data to local disk

cd bqrun && go build && \
./bqrun --jobs_path=../bqclient/testdata/goodjobs01/*.yml --dst_dir=results \
  --project=950350008903 --dataset=bqclient_test --bucket=bqclient_test

Test Setup

  1. Create project, dataset and storage bucket, set in bqclient_test.go.

Developer Guide

examples:

https://github.com/google/google-api-go-client/tree/master/examples https://cloud.google.com/storage/docs/json_api/v1/json-api-go-samples

Directories

Path Synopsis
package bigquery contains functions to 1.
package bigquery contains functions to 1.
Program pipeline run bq queries and download data to local.
Program pipeline run bq queries and download data to local.
exp
gstorage
Program show_gstoreage downloads a file from google cloud storage.
Program show_gstoreage downloads a file from google cloud storage.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL