The simple workflow template exports and runs a query daily.
Specifies Treasure Data database the workflow will run against
_export:
td:
database: workflow_tempIf it specifies td.database secret parameter is set to the workflow project, the database parameter in YAML is not used.
Runs the query that is provided by Treasure Data. The daily_open query aggregates the average opening and closing price of Nasdaq stocks, per day, as captured in the sample_datasets.nasdaq provided by Treasure Data.
+daily:
td>: queries/daily_open.sqlExecutes a “Drop table if exists + create table as” operation, creating the new table based on the output of the task’s query. The table that is created contains the aggregated price.
create_table: daily_openSimilarly, the second specified task, runs a query that is provided by Treasure Data. The monthly_open query aggregates the average opening and closing price of Nasdaq stocks, per month.
+monthly:
td>: queries/monthly_open.sqlCreates a table that contains the aggregated price
create_table: monthly_openThe + signifies a new task. The text that follows before the : is the name you give the task.
The td> signifies that the query that follows will run in the Treasure Data environment. This is automatically set to run a Presto query. The > signifies that this is where the “action” part of the task is defined—the specific processing to run.