Populate Field with data from an other source.

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
yollsonlegrand
Participant
Posts: 51
Joined: Fri Nov 07, 2008 8:03 pm

Populate Field with data from an other source.

Post by yollsonlegrand »

Hello,
I've a problem by trying to populate SEQ_NUMBER-FIELD values in already populate file.
I've in one side the file 'A' with all FIELD(client_Nr, Client_Name,etc) already populate with data. I want to add a Field-name Client_TK in this File and Populate for each 'Client_Nr' of the File, a Client_TK with the value of each SEQ_NUMBER load in a File 'B'. The problem I meet is that there is no relation between FIELD of Both File to use a Lookup-Stage to add this SEQ_NUMBER value in the FILE A. In Server Job, it was possible to do this using Transformer without considering a Lookup reference.
I've no Idea to adress this problem in IBM parallel Job and will be happy to get some from you.
Thank in advance for all reponse to my problem
Yollson Empereur
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What have you tried? I would imagine the solution would be fairly identical in a parallel Transformer stage, though the expression to generate the sequence number may need to take account of the fact that the Transformer stage is executing on more than one node - or you could force it to execute in sequential mode and definitely use identical generation method.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
yollsonlegrand
Participant
Posts: 51
Joined: Fri Nov 07, 2008 8:03 pm

Post by yollsonlegrand »

Like I was saying , I try with the transformer-stage. But I couldn't introduice the File 'B' with ready SEQ_NUMBER data in this transformer to enable populating of empty FIELD "CLIENT_TK" that I add in the File A with column "CLIENT_TK", "NUM_CLIENT", "NAME_CLIENT" etc..
To summarizing: You suppose you want to Populate C-FIELD of a File F1 with data from CTK-FIELD of File F2. And both File(F1,F2) haven't no same FIELD together.

There is no probleme with the generation of sequence number, because I've already got them in the File F2 with single column"SEQ_NUMBER".
I' have no Idea how to adresse this probleme since 4 days. Perahps there is a easy way to do this. Any Info will be a delivrance!!
Thank' in advance for your response.
Yollson Empereur
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a Column Generator stage on each input to generate an artificial key that you can use to join in a Join stage. This should be the row number perhaps qualified by the node number if you are thinking of parallel execution.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
yollsonlegrand
Participant
Posts: 51
Joined: Fri Nov 07, 2008 8:03 pm

Post by yollsonlegrand »

ray.wurlod wrote:Use a Column Generator stage on each input to generate an artificial key that you can use to join in a Join stage. This should be the row number perhaps qualified by the node number if you are thinki ...
Thank's for your response. Please can you tell me how does it look like? I mean the Column Generator Stage. Or is it possible to send me a link were I can read how to handeln these? I mean the Column generator you are talking about to solve my problem.
Thank's once more.
Yollson Empereur
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

I'm totally at a loss to understand what you're doing.

You say you have a file full of sequence numbers that you've generated, and you want to join this file of sequence numbers to another file, and there is no join key (in other words no relationship) between the files.

What good is the file of sequence numbers? Is there something special about the sequence numbers in the file?

Why not just generate new sequence numbers using one of many other methods?

What business problem are you attempting to solve?

Mike
yollsonlegrand
Participant
Posts: 51
Joined: Fri Nov 07, 2008 8:03 pm

Post by yollsonlegrand »

Mike wrote: Why not just generate new sequence numbers using one of many other methods?

What business problem are you attempting to solve?

Mike
You are right. I'll try generating Sequence Number using The Key Generator-Stage. Thank's for your reply.
I'm developping SCD-2 and SCD-1 Type in datastage. The SCD-Stage doesn't work as I wanted. I decided to develope this two slowly changing dimension in other way Like in datastage server 7.5.
Thank's once more for your help.
I' will come back telling you if all work well.
Yollson Empereur
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hmm... would you be willing to share what it is about the SCD stage that doesn't work for you?
-craig

"You can never have too many knives" -- Logan Nine Fingers
yollsonlegrand
Participant
Posts: 51
Joined: Fri Nov 07, 2008 8:03 pm

Post by yollsonlegrand »

chulett wrote:Hmm... would you be willing to share what it is about the SCD stage that doesn't work for you? ...
It is missing a path to well configuring the communication between the DB Sequence and the Database. It can't work in the now state of the instalation of datastage. it fail some path. That is why I want to do it without the SCD-Stage.
So I want to add the sequenceNumber in the table. how can I do this?
Thank's in advance for your reply.
Yollson Empereur
Post Reply