Skip to content

Commit a5cfb4a

Browse files
authored
Update README.md
1 parent ecb308d commit a5cfb4a

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

+25
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,28 @@ API](https://cloud.google.com/dataprep/docs/html/API-Overview_145281442).
77
For triggering Dataprep flows using Dataflow templates directly rather than
88
the Dataprep API, see
99
[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

0 commit comments

Comments
 (0)