• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Passing the filename that you are parsing to schema.

#1 2011-11-22 17:16:09

jgomes
Member
Registered: 2011-01-07
Posts: 57

Passing the filename that you are parsing to schema.

Tags: [CSV file, java]

Does anyone in this community know how to pass the filename that you're parsing as one of the columns in the main flow.
I am trying to parse about 400 csv files and would like to include an additional column in the main flow that will that will have the name of the csv file that is being processed.
All of these file sources are located in the same directory. Java.

***All of these files are going to be merged into a single MySQL table.

Last edited by jgomes (2011-11-22 17:25:28)

Offline

#2 2011-11-23 04:11:53

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Passing the filename that you are parsing to schema.

Hi
You may create your job like this:
tFileList--tFileInputExcel--tMap--tMysqlOutput
The following pictures will give you more details.

Best regards!
Pedro


Uploaded Images

Last edited by pedro (2011-11-23 04:18:14)


Only Paranoid Survive.

Offline

#3 2011-11-23 07:55:48

avdbrink
Member
Company: Conspect Consulting & ICT
Registered: 2010-11-08
Posts: 360
Website

Re: Passing the filename that you are parsing to schema.

Hi Pedro,

I know the solution works, but I have a question about why you are using a variable to put the filename in and not put the filename in the output column directly?
I thought using the variable might reduce performance, because for each row, the variable is filled isn't it?

Regards,
Arno

Offline

#4 2011-11-23 08:11:25

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Passing the filename that you are parsing to schema.

Hi, Arno.
Thank you for your feedback.
You are right. My fault.

Best regards!
Pedro


Only Paranoid Survive.

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Passing the filename that you are parsing to schema.

Board footer

Powered by FluxBB