I have come across a situation
where I have a requirement to add a new key field to an existing Hash file (which
contains 2 years of history) in Datastage server. I have two critical points
1) The
existing has file should not lose any history during the process
2) I
need to add the new field as key field to the existing hash by populating “0”
for all existing rows
Here is how we can do
The “Hash
Unload Job” unload all data from the hash file to a flat file, during the
unload process the new field gets add in to the layout with default value of “0”
The “Hash
Reload Job” read the data from the previously unloaded flat file and load
them in to the existing has file, the hash file should be marked as “Clear
before Write” to clear the data from the hash file and load everything from the
flat file with the new key field.
This process will keep the existing “History”
and “Key” as it.
0 comments: