Merge Stage using Two Sequential Files

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sarathi
Participant
Posts: 27
Joined: Thu Feb 11, 2010 4:14 pm
Location: Minneapolis

Merge Stage using Two Sequential Files

Post by sarathi »

Trying to Merge two Sequential files with Primary key (one file coming from insert source and other update source).
Used Merge stage and combined two Sources but 'Output' Properties are disabled and due to this i'm unable to write to FINAL Sequential file.

I have given output file location of two CSV files and its not accepting if not given. How can i merge this type of files.

Sarathi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your description is not clear.

Is this a server job or a parallel job? Can you please draw a picture of your job design (or publish an image of it and link to that from here)?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sarathi
Participant
Posts: 27
Joined: Thu Feb 11, 2010 4:14 pm
Location: Minneapolis

Post by sarathi »

I have published Job flow and send you link below. Let me know if you unable to access it.

http://picasaweb.google.com/sarathit/Da ... 4738266178
gssr
Participant
Posts: 243
Joined: Fri Jan 09, 2009 12:51 am
Location: India

Post by gssr »

sarathi wrote:I have published Job flow and send you link below. Let me know if you unable to access it.

http://picasaweb.google.com/sarathit/Da ... 4738266178
Use Copy stage , Instead of writing the CSV file directly and get anither link from copy stage to Join. Now you can edit the Metadata in the links.
RAJ
ReachKumar
Participant
Posts: 29
Joined: Wed Jan 06, 2010 7:18 am

Post by ReachKumar »

Same sequential file can't be used as input and output.

Since you have used sequential files as outputs in the job.They can't be used as inputs in the same job.Only the reject link is allowed for the output file.

If you want to join the output files, then you can do that in another job.
Regards,
Kumar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

OK you're feeding one of the Merge stage inputs with a Reject link from a Sequential File stage. A reject link has no metadata associated with it, so you won't be able to specify the key to use to effect the merge (I suspect you want a Join in any case). Insert a Column Import stage into the Reject link to re-parse the raw string that is received into it.

What are you trying to achieve?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ReachKumar
Participant
Posts: 29
Joined: Wed Jan 06, 2010 7:18 am

Post by ReachKumar »

Adding one more point to the above post :

You can do as gssr told.
Regards,
Kumar
sarathi
Participant
Posts: 27
Joined: Thu Feb 11, 2010 4:14 pm
Location: Minneapolis

Post by sarathi »

GSSR - I'm little confused as what you are saying below -

Use Copy stage , Instead of writing the CSV file directly and get anither link from copy stage to Join. Now you can edit the Metadata in the links

Should i use TWO Copy stages for each CSV File and then Join them. And then output of Join goes to Final CSV file.

Sarathi
abhijain
Participant
Posts: 88
Joined: Wed Jun 13, 2007 1:10 pm
Location: India

Post by abhijain »

it will be something like this...


Switch Stage-->Copy Stage (in place of Seq file)

And from copy stage, drag two links ...one for Sequential File and one for your join stage.
Rgrds,
Abhi
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Re: Merge Stage using Two Sequential Files

Post by Kryt0n »

sarathi wrote:Used Merge stage and combined two Sources but 'Output' Properties are disabled and due to this i'm unable to write to FINAL Sequential file.
Sarathi
[splitting hairs] That looks like a join stage to me... [/splitting hairs]

Are you trying to join the data or the rejects from each file?
Post Reply