Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Dynamic Column Mapping

Hi,
I want to perform mapping of column dynamically.
Basically, i have a fixed output Column structure. The incoming column names can be different.
eg:
Output columns: Name, Sex, Age
Input 1 Columns : Name, Gender, Age
Input 2 Columns : Names, Sex, Ages
Input 3 Columns : Names, Gender, Ages
and so on..
I want the Name to be Mapped with Name, Names, ..
Sex to mapped to Sex, Gender, ..
Age to be mapped to Age, Ages, ..
how to work around to get this done? (I tried using tMap but it allows kind of fixed mapping, can we make it dynamic?)
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi AbiJeev,
Here is a response for your situation 
the incoming column name(from Oracle DB) and output table column names (MySQL DB) are different

on forum :http://www.talendforge.org/forum/viewtopic.php?id=37314
Could you please have a look at it?
Best regards
Sabrina

View solution in original post

8 Replies
Anonymous
Not applicable
Author

Hi,
Your input files column order is not fixed? Could you please upload your tMap editor screenshot into forum?
Best regards
Sabrina
Anonymous
Not applicable
Author

Yeah, it is not fixed.
Can we make it work if it is fixed?
In the screenshot columns are in order but it may not be in order sometimes.
0683p000009MEWS.jpg
Anonymous
Not applicable
Author

Hi,
Talend Dynamic Schema allows you to design schema with an unknown column structure (unknown name and number of columns), however, the output Column structure should be dynamic as well not fixed.
How many input files need to be loaded into a fixed output Column structure file? Could you use several input components to read your input files then mapping them in tMap?
Such as: tfileinputdelimited_1(Name, Gender, Age)-->tMap-->output(Name, Sex, Age)
tfileinputdelimited_2(Names, Sex, Ages)
tfileinputdelimited_3(Names, Gender, Ages)
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi ksultania,
Here is a response for your issue, could you please check it?
http://www.talendforge.org/forum/viewtopic.php?id=37314
Best regards
Sabrina
AbiJeev
Creator
Creator

Hi,
  I have the same requirement, I have defined column as dynamic in both input and out. Both my input and out is dynamic. When I run with same column name am able to run the code properly and getting output. But if the incoming column name(from Oracle DB) and output table column names (MySQL DB) are different then am getting error like unknown field list.
  Kindly help me how to resolve this.
Regards,
AbiJeev
Anonymous
Not applicable
Author

Hi AbiJeev,
Here is a response for your situation 
the incoming column name(from Oracle DB) and output table column names (MySQL DB) are different

on forum :http://www.talendforge.org/forum/viewtopic.php?id=37314
Could you please have a look at it?
Best regards
Sabrina
AbiJeev
Creator
Creator

Hi Sabarina,
  The link you have provided was useful. Thank you.
Anonymous
Not applicable
Author

hi,
I have source file with dynamic columns which means it may come with 50 columns or 100 columns or "n" columns
i have to read this file and apply transformations based on column number provided by input. can we achieve this in talend?
Please help me out.