• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] Over-riding Context Params

#1 2009-10-15 11:42:30

cagey76
Member
Registered: 2008-02-19
Posts: 52

[resolved] Over-riding Context Params

Hi,

Apologies if this has been answered before, I have searched many times for the answer and tried many possible solution, none of which has worked for me.

I have a very simple job to update a database table with the contents of a delimited file. What I want to do is to be able to use any number of files and pass the file_name as a parameter.  Each run the filename will be choase earlier in a wrapper script.

I have set up a context parameter, and added it to the file name in the component.  It has a default value,  and runs ok,  but I am not able to override with a different file_name.


java -Xms256M -Xmx1024M -cp classpath.jar: replication.test_mysql_write_0_1.test_mysql_write --context.FILE_NAME=/tmp/john/temp_mysql_data2.csv

this does not use the file temp_mysql_data2.csv,    it still uses the default file.


Uploaded Images

Last edited by cagey76 (2009-10-15 13:26:24)

Offline

#2 2009-10-15 12:24:58

Morbo
Member
Company: Inserm
Registered: 2009-05-14
Posts: 228

Re: [resolved] Over-riding Context Params

Hello,
Do something like this :
java -Xms256M -Xmx1024M -cp classpath.jar: replication.test_mysql_write_0_1.test_mysql_write --context_param FILE_NAME=/tmp/john/temp_mysql_data2.csv
or maybe
java -Xms256M -Xmx1024M -cp classpath.jar: replication.test_mysql_write_0_1.test_mysql_write "--context_param FILE_NAME=/tmp/john/temp_mysql_data2.csv"

Offline

#3 2009-10-15 13:07:20

cagey76
Member
Registered: 2008-02-19
Posts: 52

Re: [resolved] Over-riding Context Params

Morbo,  superb,  your first suggestion works !

I had tried all these without success,  hehe.

Many thanks.

java -Xms256M -Xmx1024M -cp classpath.jar: replication.test_mysql_write_0_1.test_mysql_write --context.FILE_NAME=/tmp/john/temp_mysql_data2.csv
java -Xms256M -Xmx1024M -cp classpath.jar: replication.test_mysql_write_0_1.test_mysql_write --context.FILE_NAME='/tmp/john/temp_mysql_data2.csv'
java -Xms256M -Xmx1024M -cp classpath.jar: replication.test_mysql_write_0_1.test_mysql_write "--context.FILE_NAME='/tmp/john/temp_mysql_data2.csv'"
java -Xms256M -Xmx1024M -cp classpath.jar: replication.test_mysql_write_0_1.test_mysql_write "--context.FILE_NAME=/tmp/john/temp_mysql_data2.csv"
java -Xms256M -Xmx1024M -cp classpath.jar: replication.test_mysql_write_0_1.test_mysql_write "context param.FILE_NAME='/tmp/john/temp_mysql_data2.csv'"
java -Xms256M -Xmx1024M -cp classpath.jar: replication.test_mysql_write_0_1.test_mysql_write "--FILE_NAME=/tmp/john/temp_mysql_data2.csv"
java -Xms256M -Xmx1024M -cp classpath.jar: replication.test_mysql_write_0_1.test_mysql_write "context param.FILE_NAME=/tmp/john/temp_mysql_data2.csv"

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] Over-riding Context Params

Board footer

Powered by FluxBB