I have a database table that contains a number of columns that I ned to extract to a csv file. During the extract process I need to dynamically alter some of the column names and values based on a mapping table that I've built.
Example input (database)
col1 col2 col3
And after being mapped the output should look something like
ID Name col3
I'm using Talent open studio so the dynamic schema components are not available to me . Any suggestions on how I can achieve this? I have done something similar previously however that data was pivoted so that the column names and values were obtained in the data and I could use a tmap to do the mapping
ID Attribute Value
connect to tMap
- main table with main connection
- lookup table with lookup
use LEFT join by to columns:
- col1 == id
- col3 == value
map to output
- col1, col3 from main table
- attribute from lookup table
Hi @vapukov thanks for the quick reply. The problem is I need to map the column names dynamically as well, not just the values. My mapping table specifies old and new names for columns so col1 = ID etc. I don't think I can achieve that through a tmap
yes, you can not ...
first of all -dynamic schema - do not help you as well
but, you could:
- redesign schema for more appropriate (if you can)
- use sql for achive what you need - both tables in database (even if it different databases - first step land data to the same database staging table), then use SQL for return mapped data (tSQLinput support any query, bot only table)
Thanks @vapukov Yes, I'm thinking I need to do this in the db and then Talend can handle the results. I guess I posted to see if there were any components to do this in Talend
Watch the recorded webinar!
Introduction to Talend Open Studio for Data Integration.
Test drive Talend's enterprise products.
Practical steps to developing your data integration strategy.