You are not logged in.
Announcement
Unanswered posts
|
Pages: 1
Hi All,
I need your help. This is what I am doing:
I am migrating 5 tables(oracle) to another 5 tables in another database(sybase)
partyID
name
address
etc.
partyID column exists in all tables. it should be generated as a sequence like AE000000001, AE000000002, etc. to all tables.
1. I've created the following. This creates a sequence number like AE000000001, AE000000002, etc. and then
saves it to context.partyID.
Job(createPartyID):
tOracleInput --> tJavaRow --> tBufferOutput
properties of Job(createPartyID):
tOracleInput: "SELECT CONCAT('AE', LPAD(TO_CHAR(AE_CUSTOMERNO_SEQ.NEXTVAL), 8 , '0')) FROM DUAL"
tJavaRow: output_row.PARTY_ID = input_row.PARTY_ID;
context.partyID = input_row.PARTY_ID;
2. Here is my problem, I need to pass those generated sequence numbers (AE000000001, etc) in context.partyID
to 5 different Jobs that are inside tRunJobs using tMAP.
* tried to pass context.partyID to target tables in tMAP returns null values.
thanks all.
Regards.
Offline
OK I would like to simplify my previous post.
1). I will be migrating 5 oracle tables to 5 sybase tables. of all tables there is 1 column named partyID that exists to all tables. this column will be generated as a sequence number like AE000000001, AE00000002, etc. and so on...
This is my JOBS:
tRunjob1 --->tRunjob2 ---> tRunJob3 ---> tRunjob4 ---> tRunjob5 ----> tRunjob6
where:
tRunjob1 is the partyID that has the sequence AE00000001, etc.
tRunjob2 is the table1
tRunjob3 is the table2
tRunjob4 is the table3
tRunjob5 is the table4
tRunjob6 is the table5
* all tRunjobs is like tOracleInput --->tMAP ---->tSybaseOutput
My problem is, how to pass tRunJob1 which is the partyID INTO those other jobs (tRunjobs2...tRunjobs6) (sybase partyIDs)
thanks. i hope you can help me solve how to accomplised this (passing data from 1 trunjobs to another)
Offline
Hi,
This ain't an easy task, because passing parameters from child jobs back to parent jobs is not supported by Talend.
I'd suggest you link all sub jobs under the first job so you get:
Job1 (generating the ID)
|_ subjob2
|_ Subjob3
And so on.
Regards,
Arno
Offline
Hi there,
Thanks.
so, instead of having like this:
tRunjob1 ---> tRunjob2 --->tRunjob3 ---->tRunjob4--->tRunjob5---->tRunjob6
This will now be like:
all jobs will be connected and formed a single job and no more tRunjob.
It is correct?
Thanks
Offline
Hi,
No, I'would not create asingle job. What I ment was to perform the ID calculation inside the main job and call the "other" jobs (the ones that need this ID) will be called from this main job. Like below:
------------------ --------------
| tOracleInput_1 |-----(Main)---->| tJavaRow_1 |
------------------ --------------
|
OnSubjobOK
|
-----------
| Subjob1 |
-----------
|
|
OnSubjobOK
|
|
-----------
| Subjob2 |
-----------
|
|
OnSubjobOK
|
|
-----------
| Subjob3 |
-----------Hope this helps.
Regards,
Arno
Offline
Hi There,
Good Day!
Thanks. I will try your scenario. will let you know the results.
Thanks and Regards,
Figo
Offline
Hi,
This is still not working.
this is now what I did and still not working also
1. created temporary table (TEMP) as a target source table for those generated PARTY_IDs. --> this is working.
TEMP table always populates.
2. then, created this scenario:
tSybaseInput ---->tMAP ----> tOracleOutput
where:
tSybaseInput = TEMP (temporary table)
tOracleOutput = Target table where those generated data AE000001, AE00002 will be saved.
All of this scenarios generates NULL values for Target tables
Fellow Talend Masters (except me), I need your help ![]()
peace all. regards ![]()
Offline
Hi,
Using a temp table seems a bit overkill to me. What's the error you get when using my scenario?
Maybe some screenshots that can help us help you.
Regards,
Arno
Offline
Hi there,
Thanks.
There is some progress for this. I was now able to populate records to 4 different subjobs. my problem now is that it only populates 1 records.
lets say I have 10 records to migrate. It only migrate the first 1. that's it.
any tips how to do this?
my regards.
Figo
Offline
Pages: 1