Remove Blank Spaces

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ravikumarreddy
Participant
Posts: 9
Joined: Tue Apr 05, 2005 4:39 am

Remove Blank Spaces

Post by ravikumarreddy »

Hai Friends,

I have two CSVinputs and here is the sample date for you to work out

First file Input
"Code","Name","Color"
"100","CBZ","Silver"
"101","SPLENDOR","Black"
"102","CD100","Red"
"103","KINETIC","Green"
"104","PASSION","Orange"

Second file Input
"Code","Name","Color"
"105","KARISHMA","Silver"
"106","PULSAR","Black"
"107","VICTOR","Red"
"108","FIERO","Green"
"109","YAMAHA","Orange"
"102","CD100","Black"
"104","PASSION","Orange"
"109","SUZUKI100","Orange"

and i have merged them using Merge Stage and used join type of complete set. i could the result of this join type but the issue is iam getting the result with blank spaces and i should not get the blank spaces in the result any suggestion to avoid getting blank spaces and any other way to solve this problem

Thanks in Advance
RAVI
Sunshine2323
Charter Member
Charter Member
Posts: 130
Joined: Mon Sep 06, 2004 3:05 am
Location: Dubai,UAE

Post by Sunshine2323 »

Hi Ravi,

If I have understood your problem correctly then,

You have used a Complete Set as the Join Type so
If the key does not exist in the any of the input files you will get null values for that key

For Example,

You have
First file Input
"Code","Name","Color"
"100","CBZ","Silver"

Assuming that the join has been made on CODE as the key 100 is not found in the second file so for after the join you will get null values
To avoid this you can use Inner Join where the data will only be joined if the key is present in both the input files if that is acceptable by your requirement.

Also can you describe your final reqirement as that will help in better understanding and a giving a better answer :)
Warm Regards,
Amruta Bandekar

<b>If A equals success, then the formula is: A = X + Y + Z, X is work. Y is play. Z is keep your mouth shut. </b>
--Albert Einstein
Post Reply