This is a recipe that provides an endpoint that could be used to periodically dump the data from BigQuery to a Postgres database.
This project is based on Nest framework.
$ npm install
- Select or create a Cloud Platform project.
- Enable the Google BigQuery API.
- Set up authentication with a service account so you can access the API from your local workstation.
copy .env.sample to .env
- Update BigQuery credentials
copy ormconfig.json.sample to ormconfig.json
- Update database credentials
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
http://glific.test:3001/bq/contact
- returns the contact data from BigQuery and saves it to local postgres database/
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
You can find the Bhatura recipe here