# \[V2] Workflow configuration file

A Workflow data operation is used to specify one or several data operation IDs that need to be successfully executed for one target data operation to be triggered.

## :eye\_in\_speech\_bubble: Example

```json
{
    "$schema": "http://jsonschema.tailer.ai/schema/workflow-veditor",
    "configuration_type": "workflow",
    "configuration_id": "workflow-Load_Configuration",
    "version":"2",
    "environment": "DEV",
    "short_description": "This is a short description",
    "doc_md": "readme.md",
    "account": "000099",
    "activated": true,
    "archived": false,
    "gcp_project_id": "fd-io-tailer-demo-dlk",
    "schedule_interval_reset": "59 23 * * *",
    "authorized_job_ids": [
        "gbq-to-gbq|000099_assert_of_configuration_DEV"
    ],
    "target_dag": {
        "configuration_type":"table-to-table",
        "configuration_id":"Load_Configuration_DEV"
    }
}
```

## :gear: Parameters

| Parameter                                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>$schema</strong></p><p>type: string</p><p>optional</p>                     | The url of the json-schema that contains the properties that your configuration must verify. Most Code Editor can use that to validate your configuration, display help boxes and enlighten issues.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| <p><strong>configuration\_type</strong></p><p>type: string</p><p>mandatory</p>        | <p>Type of configuration file.<br><br>In this case, the value has to be "workflow".</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| <p><strong>configuration\_id</strong></p><p>type: string</p><p>mandatory</p>          | <p>ID of the workflow.</p><p>You can pick any name you want, but is has to be <strong>unique</strong> for this type of configuration file.</p><p>Note that in case of conflict, the newly deployed data operation will overwrite the previous one.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| <p><strong>version</strong></p><p>type: string</p><p>mandatory</p>                    | <p>Version of the configuration. Must be "2" in order to use the latest features.</p><p><em>Default : "1" for backward compatibility purposes but only version "2" supports the latest features. Version 1 is deprecated.</em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| <p><strong>environment</strong></p><p>type: string</p><p>mandatory</p>                | <p>Deployment context.</p><p>Values: PROD, PREPROD, STAGING, DEV.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| <p><strong>short\_description</strong></p><p>type: string</p><p>optional</p>          | Short description of the context of the configuration file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| <p><strong>doc\_md</strong></p><p>type: string</p><p>optional</p>                     | Path to a file containing a detailed description of the data operation. The file must be in Markdown format.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| <p><strong>account</strong></p><p>type: string</p><p>mandatory</p>                    | Your account ID is a 6-digit number assigned to you by your Tailer Platform administrator.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>activated</strong></p><p>type: boolean</p><p>optional</p>                  | <p>Flag used to enable/disable the execution of the workflow.</p><p>If not specified, the default value will be "true".</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| <p><strong>archived</strong></p><p>type: boolean</p><p>optional</p>                   | <p>Flag used to enable/disable the visibility of the workflow's configuration and runs in Tailer Studio.</p><p>If not specified, the default value will be "false".</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| <p><strong>gcp\_project\_id</strong></p><p>type: string</p><p>mandatory</p>           | ID of the Google Cloud project containing the BigQuery instance to be triggered.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| <p><strong>schedule\_interval\_reset</strong><br>type: string</p><p>optional</p>      | <p>You can choose to reset your workflow regularly by specifying here a Cron expression (see for ex.<a href="https://crontab.guru"> crontab.guru</a>). When you reset a workflow, all the triggering conditions are set to false, so all the previous runs are forgotten.</p><p><strong>Example:</strong></p><p>For a daily job, you may want to reset the workflow everyday at 23:59, so the runs on previous days won't be taken into account for the current day. You need to set it as follows:</p><p><code>"schedule\_interval\_reset": "59 23 \* \* \*"</code></p><p><br><em>Default: None</em></p>                                                                                                                                                                                                                                                                                 |
| <p><strong>authorized\_job\_ids</strong></p><p>type: string array</p><p>mandatory</p> | <p>Data operations that need to be executed and successful for the current workflow to be triggered. It can be retrieved from the Runs on <strong>Tailer Studio</strong>, in the Run Details > Job Id.<br>It is possible to wait for several configurations which will be separated by a comma.<br><strong>Example :</strong><br>"gbq-to-gbq</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| <p><strong>target\_dag</strong></p><p>type: dict</p><p>mandatory</p>                  | <p>Data operation to trigger. Target\_dag is split in two key-value.<br></p><p><strong>configuration\_type (string) :</strong> you specify the type of data operation with one of the following values :<br>- "storage-to-storage"<br>- "storage-to-table"<br>- "table-to-table"<br>- "table-to-storage"<br>- "vm-launcher"<br><br><strong>configuration\_id (string) :</strong> you need to specify the data operation configuration\_id, as it is specified in the last part of your <code>job\_id</code>. If you deployed your target job without any context, then it's the configuration\_id concatenated with the environment (for ex: <code>yourConfId\_PROD</code>). If you deployed your target job with a context, then it's the context id, starting with the account id, concatenated with the configuration id (for ex: <code>000099\_yourContextId\_yourConfId</code>).</p> |
