dataformTrigger Cloud Run Function
This function may be triggered by a PubSub message or Cloud Scheduler and triggers a Dataform workflow based on the trigger configuration provided.
Trigger types:
-
event
- immediately triggers a Dataform workflow using tags provided in configuration. -
poller
- first triggers a BigQuery polling query. If the query returns TRUE, the Dataform workflow is triggered using the tags provided in configuration.
See available trigger configurations.
Request body example with trigger name:
{
"name": "cwv_tech_report"
}
Run the following command to test the function locally:
npm run start
Then, in a separate terminal, run the following command to trigger the function:
curl -X POST http://localhost:8080/ \
-H "Content-Type: application/json" \
-d '{
"message": {
"name": "cwv_tech_report"
}
}'
When you're under src/
run:
npm run deploy