From 646089162303bb5d2dbb100580e6660efe9936eb Mon Sep 17 00:00:00 2001 From: Mark Chmarny Date: Fri, 23 Nov 2018 13:45:04 -0800 Subject: [PATCH] Raw removed and readme updated --- Makefile | 2 +- README.md | 22 +++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 9952cd3..98a13cd 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ topic: table: bq mk $(BQ_SCHEMA_NAME) - bq mk --schema id:string,repo:string,type:string,actor:string,event_time:timestamp,countable:boolean,raw:record -t $(BQ_SCHEMA_NAME).$(BQ_TABLE_NAME) + bq mk --schema id:string,repo:string,type:string,actor:string,event_time:timestamp,countable:boolean -t $(BQ_SCHEMA_NAME).$(BQ_TABLE_NAME) job: gcloud beta dataflow jobs run $(GCP_FN_NAME)-$(RUN_ID) \ diff --git a/README.md b/README.md index b0b72fd..c6b3848 100644 --- a/README.md +++ b/README.md @@ -46,27 +46,39 @@ First you will need to create a pubsub topic where `github-activity-counter` wil make topic ``` -Then, you will need to define secret that will be shared between GitHub and your Function. Best to use an auto-generated, opaque, string. You can generate 32 character long string using `openssl` like this: +Create BigQuery table + +```shell +make table +``` + +Create Dataflow job to load data from PubSub topic to BigQuery table + +```shell +make job +``` + +Define secret that will be shared between GitHub and your Function. Best to use an auto-generated, opaque, string. You can generate 32 character long string using `openssl` like this: ```shell openssl rand -base64 32 ``` -You will then need to set that secrete as an `HOOK_SECRET` system variable or define it in the `Makefile` +Set that secrete as an `HOOK_SECRET` system variable or define it in the `Makefile` -Now you can deploy the function to GCF +Deploy the function to GCF ```shell make deploy ``` -The response from the deployment will be +The response from the deployment will be... ```shell Deploying function (may take a while - up to 2 minutes) ``` -Followed by metadata about your function. The one we need to capture will be the URL of your function. Should look like this: +...followed by metadata about your function. The one we need to capture will be the URL of your function. Should look like this: ```shell httpsTrigger: