Parameters
Workspace parameters overview
Workspace parameters are part of the parameter system and are scoped to the entire space; that is, all Flows, Offline Sync plans, and other modules in the space can use these workspace parameters. Workspace parameters are divided into preset workspace parameters and custom workspace parameters.
Preset parameters
| Preset parameters | Description |
|---|---|
| Base Date ${bd} | Base date, the base date for data settlement. You need to define its date format and offset when you create the workspace For details, see DataOps space management |
| Base Timezone ${btz} | Base timezone, the base timezone for data settlement. You need to define the timezone when you create the workspace For details, see DataOps space management |
| Theoretical scheduling time ${st} | The point in time when a task instance should theoretically run. The default format is yyyyMMddHHmmss, and you need to define it when you create the workspace For details, see DataOps space management |
| Running Env ${env} | Uses the environment value that matches the running environment. Possible values: dev, product |
| Production database ${ws_prod_db} | The system-preset production database name, which you can use when developing Flows |
| Development database ${ws_dev_db} | The system-preset development database name, which you can use when developing Flows |
| IDE Database ${ws_ide_db} | The system-preset IDE database name |
Workspace parameters (custom)
In the workspace parameter list, you can view all custom workspace parameters available in the current space
You can also click + Workspace Params in the Param Management module to add a custom workspace parameter.
Workspace parameter settings:
| Field | Description |
|---|---|
| Parameter name | The name of the custom workspace parameter
|
| Type | The type of the custom workspace parameter
Plain Text: A plain text value, for example
Expression: You can reference preset parameters in an expression For example, to reference the preset parameter ${bd}, whose default date format is yyyy-MM-dd, you can write the expression as follows
|
| Value |
|
| Description | Description of the workspace parameter |
Workspace parameter expression examples
If you use ${bd} directly, no further adjustment is made, and it returns the default value in the default format
The formatting expressions of ${bd} are similar to DolphinScheduler (DS) direct expressions, such as ${bd:yyyy-MM-dd-1}, ${bd:dd/MM/yy}, and so on. After the custom format (which also uses SimpleDateFormat), you can directly add "+/-" and a number, in days.
Taking the format ${bd:yyyy-MM-dd} as an example:
- N weeks later: ${bd:yyyy-MM-dd+N*week}
- N weeks earlier: ${bd:yyyy-MM-dd-N*week}
- N days later: ${bd:yyyy-MM-dd+N}, ${bd:yyyy-MM-dd+N*day}
- N days earlier: ${bd:yyyy-MM-dd-N}, ${bd:yyyy-MM-dd-N*day}
- N hours later: ${bd:yyyy-MM-dd HH:mm:ss+N*hour}
- N hours earlier: ${bd:yyyy-MM-dd HH:mm:ss-N*hour}
- N minutes later: ${bd:yyyy-MM-dd HH:mm:ss+N*minute}
- N minutes earlier: ${bd:yyyy-MM-dd HH:mm:ss-N*minute}
For year and month offsets, you can use the following:
- N months later: ${bd:yyyy-MM-dd+N*month}
- N months earlier: ${bd:yyyy-MM-dd-N*month}
- N years later: ${bd:yyyy-MM-dd+N*year}
- N years earlier: ${bd:yyyy-MM-dd-N*year}

