Skip to content
Last updated

Schedule an Insights Model Build

Schedule an Insights model build in Treasure Data Workflow. Treasure Data discourages hourly builds because they can affect performance for both Treasure Data and the analytics platform.

timezone: UTC
schedule:
  daily>: 00:00:00
+call_post_builds:
  http>: "https://{{baseurl}}/reporting/datamodels/xxxxxx/builds"
  method: POST
  headers:
    - authorization: "TD1 ${secret:td.apikey}"
    - cache-control: "no-cache"
    - accept: "application/json"
    - content-type: "application/json"
  content:
    buildType: "full"
  content_format: "json"
  store_content: true
+echo:
  echo>: ${http.last_content}

Example workflow log:

2020-08-16 06:49:03.037 +0000 [INFO] (0077@[1:test_datamodel_build]+test_datamodel_build+call_post_builds) io.digdag.core.agent.OperatorManager: http>:{{baseurl}}/reporting/datamodels/xxxxx/builds
2020-08-16 06:49:03.057 +0000 [INFO] (0077@[1:test_datamodel_build]+test_datamodel_build+call_post_builds) io.digdag.standards.operator.HttpOperatorFactory$HttpOperator: Sending HTTP request: POST {{baseurl}}/reporting/datamodels/xxxxx/builds
2020-08-16 06:49:03.586 +0000 [INFO] (0077@[1:test_datamodel_build]+test_datamodel_build+call_post_builds) io.digdag.standards.operator.HttpOperatorFactory$HttpOperator: Received HTTP response: POST {{baseurl}}/reporting/datamodels/xxxxx/builds: HttpContentResponse[HTTP/1.1 200 OK - 126 bytes]
2020-08-16 06:49:04.024 +0000 [INFO] (0143@[1:test_datamodel_build]+test_datamodel_build+echo) io.digdag.core.agent.OperatorManager: echo>:
{"oid":"yyyyy","buildType":"full","status":null,"created":null,"started":null,"completed":null}