• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Dynamic filename for tFileInputXML

#1 2009-04-30 11:06:49

efe4pj
Member
Registered: 2009-04-22
Posts: 17

Dynamic filename for tFileInputXML

Hi


I'm using talend-3.0.4 (r22547)

I try to read data from an XML file and write them to an Oracle DB (one or more table).
My job looks like this:

tFileInputXML -- (main) --> tMap -- (main) --> tOracleOutput

It works fine in TOS.
But I want the job to run exported, and I also want to pass the "filename" when I launch the job from the system shell.

I've done that for the CSV version of the job, using the "--context_param" command line option.

But in the metadata wizard for XML file, you may only select an existing file. It's impossible to input something like "context.myxmlfile_fullpath". If you input any character in the field, you've got that popup telling you the file does not exists.


Any advice ?


Regards

Last edited by efe4pj (2009-04-30 11:13:57)

Offline

#2 2009-04-30 11:20:09

shong
Talend team
Registered: 2007-08-29
Posts: 10289
Website

Re: Dynamic filename for tFileInputXML

Hello

Please read a realted [Forum, topic 1615] Passing variable (context) value from the command line.

Let me know if you have any problem.

Best regards

        shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2009-04-30 13:50:32

efe4pj
Member
Registered: 2009-04-22
Posts: 17

Re: Dynamic filename for tFileInputXML

Thanks, but that does not answer the point.

My problem is that I am unable to define a context on the tFileInputXML in the metadata section.

I have already written a shell script that use --context_param to transmit context value to the exported job.
Passing paramters to the job works fine, _if_ you have a context to read that parameter

A metadata tFileInputDelimited allow a context to be defined on it, whereas it's not permitted on tFileInputXML

I found a workaround by switching the component to built-in mode after initialization in the metadata section. There I can use the "context" on the basic & advanced properties.

At least I can initialize the mapping in the repository, then switch to built-in.
However I will have to repeat that process in every job the file is used, every time the XML schema is modified.

:\


Any evolution scheduled ?

Offline

#4 2009-04-30 16:01:29

shong
Talend team
Registered: 2007-08-29
Posts: 10289
Website

Re: Dynamic filename for tFileInputXML

Hello

A metadata tFileInputDelimited allow a context to be defined on it, whereas it's not permitted on tFileInputXML

Yes, I think it should be added as a new feature. would you like to report it?

Thanks for your support!!

Best regards

          shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Dynamic filename for tFileInputXML

Board footer

Powered by FluxBB