Contributor III
2017-03-23
02:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[resolved] Execution of .jar with specific parameters
Hi everyone.
I have a job made in Talend. The job has a tFileList and it iterates on a tFileInputPositional. The tFileInputPositional has the value of ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
And the tFileList has the filemask of "*.FIL"
I need to execute the .jar generated after the build job by the .sh... but I need to send the filemask value of the tFileList in that .sh. The .sh content is this:
But I need add some value like "-fileName=some.FIL" to replace the file mask of the tFileList.
Can I modify the job before build it in order to configure the filemask of the tFileList to be passed as a parameter?
Thanks for your help.
396 Views
1 Solution
Accepted Solutions
Specialist
2017-03-23
03:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You want a context variable. Within your Talend job, click on the Contexts tab and add a variable named fileName. Set the filemask in your tFileList to
context.fileName.
Edit your .sh file to add --context_param fileName="some.fil"
You may not need to edit the .sh file, actually. I think it would be ok to add the --context_param when you call the .sh
Edit your .sh file to add --context_param fileName="some.fil"
You may not need to edit the .sh file, actually. I think it would be ok to add the --context_param when you call the .sh
396 Views
2 Replies
Specialist
2017-03-23
03:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You want a context variable. Within your Talend job, click on the Contexts tab and add a variable named fileName. Set the filemask in your tFileList to
context.fileName.
Edit your .sh file to add --context_param fileName="some.fil"
You may not need to edit the .sh file, actually. I think it would be ok to add the --context_param when you call the .sh
Edit your .sh file to add --context_param fileName="some.fil"
You may not need to edit the .sh file, actually. I think it would be ok to add the --context_param when you call the .sh
397 Views
Contributor III
2017-03-23
09:54 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
cterenzi wrote:
You want a context variable. Within your Talend job, click on the Contexts tab and add a variable named fileName. Set the filemask in your tFileList to context.fileName.
Edit your .sh file to add --context_param fileName="some.fil"
You may not need to edit the .sh file, actually. I think it would be ok to add the --context_param when you call the .sh
Thank you very much for your help. It works.
396 Views