Copy Stage Example
It is a one of a Processing stage and as the name suggests helps in creating a copy.It can have one input link and n number of output links which helps to create multiple copies of input data.
Copy Stage also helps to make a backup for data while performing another operation on that data. In addition to create multiple copies of data we can also drop or change order of columns, modify data type of columns.
In Copy Stage, we have the option called Force. It will be false in Default and if we keep it to true, it is used to specify that datastage should not try optimize the job by removing a copy operation where there is one input and only one output.
In below example we are having Employee details in a sequential file as an input and needs to be copied to a Dataset.
Follow below steps:
Design you job same as shown below:
Open the Properties tab of Sequential file. Select Sequential File stageàRight Clickàselect Properties and load the Table Definition.
Open the Properties tab of Copy Stage, Under Properties Tab, and Set Force compile option to ‘True’ if input data is copied to only one output/target. Otherwise set this option to ‘False’.
Under mapping tab, select the columns from Left i.e. from Source/Input and drag and drop to Right i.e. Target/Output as shown below.
The Output columns will appear similar to shown below: