user input for .bat execution

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!


Accepted Solutions
Nine 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
Dont forget to give Kudos when an answer is helpful or mark the answer as the solution.

All Replies
Fifteen Stars TRF
Fifteen 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
Seven 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.
Nine 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
Dont forget to give Kudos when an answer is helpful or mark the answer as the solution.
Six Stars

Re: user input for .bat execution

Don't have an option prompt in TOS_BD 6.5.1

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog