• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Generate Mapping of multiple tMySQLOutput control with foreign keys

#1 2010-12-30 22:50:42

marasheed
New member
Registered: 2010-12-29
Posts: 6

Generate Mapping of multiple tMySQLOutput control with foreign keys

I have created a job to populate dataware house fact and dimension tables from another transactional database. (Attached is the image databasejob.jpg)
From tMYSQLInput  I used a complex query to populate the data from source database.
Every tMYSQLOutput dentos a separte table which populate through tMap(Attached is screen shot tMapMapping.jpg).
Following are the populated tables.
-location (have autogenerated key)
-product (have autogenerated key)
-member (have autogenerated key)
-time (have autogenerated key)
-salesfact (It contains reference of all above tables keys as foreign keys.)
When I execute the job data populated in all tables but all foreign key references are empty in table salesfact.

How I can do it?
Do I need to use tJDBCOutput, tJava, tJavaOutput or some other control to populate data in all tables ?
Really appreciate your prompt replies.


Uploaded Images

Offline

#2 2010-12-31 09:36:47

marasheed
New member
Registered: 2010-12-29
Posts: 6

Re: Generate Mapping of multiple tMySQLOutput control with foreign keys

attached is tMap Mapping

Offline

#3 2010-12-31 11:15:34

marasheed
New member
Registered: 2010-12-29
Posts: 6

Re: Generate Mapping of multiple tMySQLOutput control with foreign keys

see attachment


Uploaded Images

Offline

#4 2011-01-03 20:51:17

JohnGarrettMartin
Member
Registered: 2009-01-07
Posts: 762

Re: Generate Mapping of multiple tMySQLOutput control with foreign keys

You will need to do this in two steps:
1) populate all dimension tables
|
onSubjobOK
|
2) populate fact table, joining to newly populated dimension tables to retrieve keys

Also, it is not necessary to use the variables table to map values to different outputs of your tmap-- you can accomplish this directly--- (i.e. var.itemName can be row1.itemName)

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Generate Mapping of multiple tMySQLOutput control with foreign keys

Board footer

Powered by FluxBB