You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

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.
Last edited by cagey76 (2009-10-15 13:26:24)
Offline

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

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
Pages: 1