Conditional source¶
The conditional source selects an active source 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 source 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": "embedded",
..
},
"test": {
"type": "sql",
..
},
"prod": {
"type": "sql",
..
}
}
}
Properties¶
Property |
Type |
Description |
Default |
Req |
---|---|---|---|---|
|
String |
The key to look up in |
Yes |
|
|
Object |
A dictionary of actual source configurations keyed by the enumerated value of |
Yes |