Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
LNYAKA1625749060
Contributor
Contributor

How to get dynamically column name in tFileInputExcel by using talend

Hello,

I have a question if you can help me out, that would be great. I have three excel files A,B and C which are in a special directory of my PC.

The first excel file A has two columns (colA1,colA2), the second excel file B has three columns (ColB1,ColB2,ColB3) and the third excel file C has one column (ColC1). The 3 files have different column names.

My goal is to process each file is to retrieve the data to put the first column in uppercase and make the output in another excel output file.

 I use the component tfileList->tfileiterateFlow->tmap->tlogRow->tjavaRow then a trigger subjok->tFileInputExcel -> tlogRow

The only problem here is in my tfileinputExcel how to retrieve dynamically the column names of each file since the columns are different. In the schema, we can't use globalMap.get(value).

I get the path of the current file via the command ((String)globalMap.get("tFileList_3_CURRENT_FILEPATH")). How to get the column names of the current file to put it in schema of the tFileInputExcel_1 component ?

Thanks in advance

Labels (4)
5 Replies
Anonymous
Not applicable

Hi

Add one column on the schema of tFileInputExcel and select Dynamic data type.

 

Regards

Shong

LNYAKA1625749060
Contributor
Contributor
Author

Hi @shong,

can you explain me your solution by adding a screenshoot please. I have 3 excel files with different column names. How can i add one column of tFileInputExcel ? The first file has two columns, the second has three columns .

please show me your solution by adding a screenshoot with is possible.

 

thanks

Anonymous
Not applicable

Hi

Are you using community edition or enterprise subscription edition? The dynamic schema feature is only available in enterprise subscription edition?

 

Regards

Shong

LNYAKA1625749060
Contributor
Contributor
Author

Hi @Shicong Hong​ ,

I'm using enterprise subscription edition.

Can you explain me with screenshoot how to have dynamic schema in my situation.

Anonymous
Not applicable

see below

0695b00000IdzOOAAZ.png