Skip to content

Commit

Permalink
Update README.md (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
ginokent authored Dec 1, 2020
1 parent 8088258 commit 44ee946
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
# bqtableschema

BigQuery table schema struct generator

[![main](https://github.com/djeeno/bqtableschema/workflows/main/badge.svg)](https://github.com/djeeno/bqtableschema/tree/main)
[![codecov](https://codecov.io/gh/djeeno/bqtableschema/branch/main/graph/badge.svg)](https://codecov.io/gh/djeeno/bqtableschema)

## generate

```console
$ cd /path/to/your/repository
$ cd /path/to/your/golang-project-repository

$ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/serviceaccount/keyfile.json
$ ## Create a directory where bqtableschema will generate the code.
$ mkdir -p bqtableschema
$ cd bqtableschema

$ ## Set the required environment variables.
$ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/serviceaccount/keyfile.json
$ export GCLOUD_PROJECT_ID=bigquery-public-data ## ref. https://console.cloud.google.com/bigquery?p=bigquery-public-data&page=project
$ export BIGQUERY_DATASET=hacker_news ## ref. https://console.cloud.google.com/bigquery?p=bigquery-public-data&d=hacker_news&page=dataset

$ ## generate
$ go run github.com/djeeno/bqtableschema
```

0 comments on commit 44ee946

Please sign in to comment.