Six Stars

user input for .bat execution

I have built my job for execution by creating the .bat file. I have a context variable defined for the initial filepath. Is there a way to take an input from the user for this context variable in the .bat execution. 

 

At present this is what i see in the .bat file for the context variable. 

-context=Default %* 

 

Ideally i would like the user to update the .bat context variable with the file path. Is this possible ? If not how should i solve this problem. 

 

Appreciate your input. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Seven Stars

Re: user input for .bat execution

Hi,

 

You should be able to append onto the invoking command for the bat (or sh) file:

 

talendjob.bat --context_param configurationPath={path to config}

 

Thanks

 

David

Regards

David

Don't forget to give Kudos when an answer is helpful or the solution.
4 REPLIES
Forteen Stars TRF
Forteen Stars

Re: user input for .bat execution

What if you define the context variable (lets say filepath for example) of type file and tick the option prompt?

TRF
Six Stars

Re: user input for .bat execution

a solution is in your question only, you achieve this by passing context file path in your context default value

Regards
Aashish
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seven Stars

Re: user input for .bat execution

Hi,

 

You should be able to append onto the invoking command for the bat (or sh) file:

 

talendjob.bat --context_param configurationPath={path to config}

 

Thanks

 

David

Regards

David

Don't forget to give Kudos when an answer is helpful or the solution.
Six Stars

Re: user input for .bat execution

Don't have an option prompt in TOS_BD 6.5.1