Translate to your Language

Tuesday, December 18, 2012

Adding a key field to an existing “Hash” file (contains 2 years of History) in Datastage Server

by Unknown  |  in Datastage at  3:31 AM


            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:

© Copyright © 2015Big Data - DW & BI. by