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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Generic Talend Job

I want create a generic talend job with File Component , Tmap and Target Db Component.I have multiple files to load in multiple target tables with one talend job.But the metadata for each source and target are different.Let me know.
Labels (2)
22 Replies
Anonymous
Not applicable
Author

For example:
for instance,
Table1.csv -> Generic_Talend_Job -> Oracle Table 1
Table2.csv -> Generic_Talend_Job -> Oracle Table 2
and so on...
Anonymous
Not applicable
Author

Hi
With community version, you have to create many subjobs for each file. With commercial subscription version, you are able to define a dynamic schema to map different structure, so that you only need one general Talend job for all files. For more information, please read this page:
https://help.talend.com/search/all?query=dynamic+schema+

 

Regards
Shong

Anonymous
Not applicable
Author

Thanks Shong
Anonymous
Not applicable
Author

Shong,
I have got the commercial version of talend.Used dynamic schema.It work very fine for the source files to db tables without any transformation logic.How can i achieve the adding transformation logic like nulls etc for individual columns in the Dynamic Schema?
Let me know.I have 10 sources file and 10 tables.Created one job to load this 10 tables using dynamic schema.But i want add different transformation logic for 10 sources.How to i achieve this?
Regards
Vasanth
Anonymous
Not applicable
Author

Hi
But i want add different transformation logic for 10 sources.How to i achieve this?

What's the transformation would you like to do for the column? Below is an example job shows you how to get the column Name, column value of the dynamic schema during the job execution, for example:
the table has the following structure and data:
id;name
1;shong
2;elise
begin code of tJavaFlex:
int ncount=0;
String columnName="";
DynamicMetadata column;

main code of tJavaFlex:
ncount=row7.c.getColumnCount();
column=row7.c.getColumnMetadata(ncount-1);
columnName=column.getName();
String columnValue=(String)row7.c.getColumnValue(columnName);
row7.c.setColumnValue(ncount-1, "Hello "+columnName);
row9.c=row7.c;

It generates a new file with the following result:
id;name
1;Hello shong
2;Hello elise
Shong
0683p000009MDSZ.png
Anonymous
Not applicable
Author

Hi Shong,
I tried to use your code sample in a tJavaFlex, but I get a compile error telling me that DynamicMetadata cannot be resolved to a type. I see that we can import libraries directly into the tJavaFlex using its advanced settings, but I could not figure out which libraries to import before using this DynamicMetadata type. Can you or somebody else help me with this?
Thanks,
Douglas

begin code of tJavaFlex:
int ncount=0;
String columnName="";
DynamicMetadata column;

Shong
alevy
Specialist
Specialist

Does you tJavaFlex have a row with a Dynamic column coming in or going out?
Anonymous
Not applicable
Author

Hi alevy,
Thank you for your answer!
I'm not using dynamic columns and now I realize that this example is specific for dynamic columns.

Douglas
Does you tJavaFlex have a row with a Dynamic column coming in or going out?
Anonymous
Not applicable
Author

After applying this solution. I figured that in Dynamic schema, the whole row is read as string with column value separated using comma(,). Please correct me if I am wrong.
Can we control which column is mapped to which column in the output component?
Please feel free to ask if any other details are needed to answer the question.