This is what I had presented at the DDSUG (German speaking DataStage User Group) 38 last week in Munich.
In DataStage 11.7 there is a functionality to bulk edit keys and attributes which is a bit hidden. I will show some examples in this blog post and also show the current status of this in DaaS/CP4D. I had worked with DataStage for several years before discovering this funtionallity and it can save you a lot of effort if you know it.
I will demonstrate the functionallity for the following stages:
Sort
Column Export
Aggregator
Peek
Change Capture
I have the following example Job
![](https://dw1.s81c.com//IMWUC/MessageImages/59532df671dc43068973e8239d807b65.png)
Sort Stage
On the Stage->Properties Tab, click on the red "Key = ?", then the Icon below the move up/down buttons should come to life, if you click on it, then you go to the bulk edit screen
![](https://dw1.s81c.com//IMWUC/MessageImages/30c2bce3178842d2ae02340425d8a73a.png)
As described on the annotation on the canvas of the job, I want to sort on the four key columns, doing a "don't sort previously sorted" on the first 3. So in the bulk edit screen I mark the 4 key columns with shift+click and click on the arrow to the right button
![](https://dw1.s81c.com//IMWUC/MessageImages/1120c9c619fd46f9aa33862cf815eab0.png)
Now on the right side of the screen I mark the columns again
![](https://dw1.s81c.com//IMWUC/MessageImages/0bc5d016c1404cfc833e6afc88355cd9.png)
and click on the arrow to right on the right side of the screen to select Sort Key Mode for all selected columns
![](https://dw1.s81c.com//IMWUC/MessageImages/bb019c6cdaff4b38821b4394488a22c5.png)
You'll then get the following result on the properties tab
![](https://dw1.s81c.com//IMWUC/MessageImages/b4d909b507a34aab9c2979d912689195.png)
The same then for the other stages
Column Export stage
![](https://dw1.s81c.com//IMWUC/MessageImages/a332405af47349a8931e09ccb4b8c54b.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/ea61d0dbdd364bc9ab97135d0c246b73.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/f23037edaf77400793287aa9db65db5b.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/f23037edaf77400793287aa9db65db5b.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/8e4f931d5a8d4f14bafb44856a5e7485.png)
Aggregator stage
Here you can bulkadd and -edit both Grouping Keys and Column for Calcluation
Grouping Keys
![](https://dw1.s81c.com//IMWUC/MessageImages/dba4d3005bcb4106a7bad377b267ec43.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/39975a114d954671b28152202f703131.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/c4b3d8d3d564407ea2b6635e43f8d4e0.png)
Column for Calculation
![](https://dw1.s81c.com//IMWUC/MessageImages/7204e91dbd7b4a0e83897446fd43187d.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/39fe8b8bf47e4dc085414563ddc3f3a8.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/940c6dfdd252404aaf6e6053ae74b4e2.png)
This is the finial result for the aggregator stage, unfortunately for the columns for Calculations the only bulkediting you can currently to is setting preserve type true/false, maybe in Nextgen DataStage you will be able to set the Aggregation type for several column
![](https://dw1.s81c.com//IMWUC/MessageImages/c7c34a4a9cfa4862b0b0fc62ded4a529.png)
Peek Stage
![](https://dw1.s81c.com//IMWUC/MessageImages/ea1785c9785240c0b61bfb5a9ba8ff4b.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/74401f0d1674402a8e926aa26f0fcc8b.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/6ec4d6916274449c99369e1170ed5ee4.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/c2078cb494a549138ef0d99cc6833a41.png)
Change Capture Stage
Here you can also edit the Keys and Values
Keys:
![](https://dw1.s81c.com//IMWUC/MessageImages/a2c2c352031f410a837029687d350f3e.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/1eee99aced7a4900a9d19d054b737a3c.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/3380d7616477433ca1fc71c5e433230c.png)
Values:
![](https://dw1.s81c.com//IMWUC/MessageImages/750bb87cd3cf445096fd2a2391fd8ccc.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/9f54c099ac294120880c672adf9c6e7b.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/c4e9a637c1ea4d41b07b7b60bd628d0a.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/5ce6821ad7444958a138a52b996836c6.png)
Now the same example flow in DaaS
![](https://dw1.s81c.com//IMWUC/MessageImages/153448839c844bf1819ea797029c3c15.png)
Sort Stage in DaaS
In Daas also on the Stage->Properties tab, click on edit next to the Sorting Keys
![](https://dw1.s81c.com//IMWUC/MessageImages/dafb8d67c1d64f848d72a5b8f7050281.png)
Then in the tear sheet, click on Add key +
![](https://dw1.s81c.com//IMWUC/MessageImages/191aaa5df8b84a6c81f496f244c68e10.png)
For the stages where it is already implemented, bulkadding/-editing is directly build in (no somewhat hidden functionalliyt anymore), just click on the columns you want to add
![](https://dw1.s81c.com//IMWUC/MessageImages/2658d5cf38dd4ad6914b4137cae89e56.png)
and then edit the attributes and click on Apply
![](https://dw1.s81c.com//IMWUC/MessageImages/21592c27ce044e019ae825ba077c1f4e.png)
In our example I added the four key columns and applied "don't sort previously sorted" to all of them, so I have to remove this from the last key column later (or would have to add them without this attribute and bulk edit the first 3 columns afterwards)
![](https://dw1.s81c.com//IMWUC/MessageImages/b1a2de83a8e9476fadd2d3afc7b2f252.png)
This will then be the result
![](https://dw1.s81c.com//IMWUC/MessageImages/219d33218c0e4d1b98ae5f079cf31e07.png)
For the examples shown in DataStage Legacy the currently implemented state in DaaS is:
Sort: Implemented
Column Export: Not implemented yet
Aggregator: Grouping keys implemented for DaaS (not yet in CP4D), Columns for Calculations not implemented yet
Peek : Not implemented yet
Change Capture: Implemented for Keys, not implemented yet for Values
IBM is working on this, when preparing the speech, Grouping keys in the Aggregator stage where not implemented, while a week later they had been added. They will also add the option to filter the columns you want to add via a search/filter box and have the option to check all of them with one click.
I hope the knowledge of this functionallity will help you to work with DataStage more efficiently.
KR Ralf