Conditional transform¶
The conditional transform selects an active transform based on a key typically controlled by an environment variable. It is typically used in devops to be able to use the same configuration in different type of environments (i.e. development, staging, production). The actual transform to use is resolved at runtime when the parent pipe is created.
The configuration options are:
Prototype¶
{
"type": "conditional",
"condition": "$ENV(current-environment)",
"alternatives": {
"dev": {
"type": "dtl",
..
},
"test": {
"type": "dtl",
..
},
"prod": {
"type": "dtl",
..
}
}
}
Properties¶
Property |
Type |
Description |
Default |
Req |
---|---|---|---|---|
|
String |
The key to look up in |
Yes |
|
|
Object |
A dictionary of actual transform configurations keyed by the enumerated value of |
Yes |