Create a record if entry for a key field does not exist
Posted: Sat Aug 12, 2017 7:27 pm
I have a requirement to make sure there are 3 records for each key fields in an output table regardless of how many come in from the input file.
There are 3 types of records for each account. Types are ABC, DEF, GHI. The Account field is the key field.
Example:
Input File Layout - Account,Type,amount
12345,ABC,1000.25
12345,GHI,2000.15
67890,DEF,100.23
Expected Output:
12345,ABC,1000.25
12345,DEF,0
12345,GHI,2000.15
67890,ABC,0
67890,DEF,100.23
67890,GHI,0
Any suggestions are appreciated. I am still learning datastage and have found this forum to be very helpful.
Thank You
There are 3 types of records for each account. Types are ABC, DEF, GHI. The Account field is the key field.
Example:
Input File Layout - Account,Type,amount
12345,ABC,1000.25
12345,GHI,2000.15
67890,DEF,100.23
Expected Output:
12345,ABC,1000.25
12345,DEF,0
12345,GHI,2000.15
67890,ABC,0
67890,DEF,100.23
67890,GHI,0
Any suggestions are appreciated. I am still learning datastage and have found this forum to be very helpful.
Thank You