File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -7,3 +7,28 @@ API](https://cloud.google.com/dataprep/docs/html/API-Overview_145281442).
7
7
For triggering Dataprep flows using Dataflow templates directly rather than
8
8
the Dataprep API, see
9
9
[ gcp-dataflow-gcf-trigger] ( https://github.com/RealKinetic/gcp-dataflow-gcf-trigger ) .
10
+
11
+ ## Deploying
12
+
13
+ Run the following command to deploy this Cloud Function:
14
+
15
+ ```
16
+ $ gcloud functions deploy <function-name> \
17
+ --entry-point trigger \
18
+ --trigger-bucket gs://<my-bucket> \
19
+ --set-env-vars RECIPE_ID=<dataprep-recipe>,DATAPREP_TOKEN=<dataprep-token> \
20
+ --runtime python37
21
+ ```
22
+
23
+ Ensure that the trigger bucket matches the bucket used for the Dataprep
24
+ recipe.
25
+
26
+ ## Environment Variables
27
+
28
+ As shown above, this Cloud Function requires two environment variables:
29
+
30
+ - ` RECIPE_ID ` : the ID of the Dataprep recipe to start jobs for. The provided
31
+ recipe must have a parameterized dataset with a variable called ` file ` which
32
+ is the file to process from the configured bucket.
33
+ - ` DATAPREP_TOKEN ` : [ Dataprep access token] ( https://cloud.google.com/dataprep/docs/html/Access-Tokens-Page_145281436 )
34
+ used to authenticate with the Dataprep API
You can’t perform that action at this time.
0 commit comments