...
Add a DataStage Project Environment Variable to store the state of our feature toggle. It is recommended that all Feature Toggles follow a naming conventions such as “FEATURE_XXX” to ensure they are easy to identify and remain grouped together in DataStage selection dialogs. In this example, we chose
FEATURE_UPGRADED_TARGET
:Create a copy of the job being changed and name it to reflect the logic when the Feature Toggle is on. In this example, we copied the
Load
job and renamed it toLoad_Upgraded
:Rename the job being changed to reflect the logic when the Feature Toggle is off. DataStage may notify you that the job is being referenced by another item, click continue. In this this example, we renamed the
Load
toLoad_Legacy
:Create a new Sequence Job and call it
Load
. This sequence will be run instead of our originalLoad
job and will run eitherLoad_Legacy
orLoad_Upgraded
when the Feature Toggle is On or Off. Ensure that the Sequence has the same parameters as bothLoad_Upgraded
andLoad_Legacy
jobs and the “Automatically handle activities that fail” option is set in the Job properties:Setup the sequence design as follows:
The
Load_Upgraded
andLoad_Legacy
job activities call the relevant job versions. All Job Parameters are transferred directly from the Job Sequence Parameters
Removing a Feature Toggle
...