This is a app which pulls data from trello and puts it into BigQuery (optionally writing it to a gcs bucket)
- Set project account and project id
gcloud config set account <email address> gcloud config set project <project_id>
- Authenticate account and application to use default login
gcloud auth login gcloud auth application-default login
- Create a BigQuery Dataset
- Create tables for each scheme in
./schemas/
- (optional) Create GCS bucket
Run the following commands to see options:
python get_data.py --help
(Tip: you can also use environment variables as outlined below)
- Build docker image
make build
- Push docker image to Google Container registry
make push
- Navigate to cloud run in the google console and "Create Service"
- Name your service
- Select the container created & pushed above
- Under "Advanced"
- Memory Allocated to
1 gb
- Under "Variables" set env vars as outlined in the "Env Vars" below
- Memory Allocated to
Variable Name | Description |
---|---|
TRELLO_KEY | trello api key |
TRELLO_TOKEN | trello secret token |
TRELLO_BOARD_ID | trello board id |
BQ_DATASET_ID | BigQuery dataset id (including gcp project id) |
GCS_BUCKET_NAME | (Required if uploading to to gcs) gcs bucket name. |
WRITE_RAW_LOCAL | (Optional) Whether to save raw json query locally |
WRITE_PROCESSED_LOCAL | (Optional) Whether to save bigquery-safe jsonl locally |
WRITE_RAW_REMOTE | (Optional) Whether to upload raw json query to GCS |
WRITE_PROCESSED_REMOTE | (Optional) Whether to upload bigquery-safe jsonl to GCS |