Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

user input for .bat execution

Highlighted
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
Highlighted
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.

View solution in original post


All Replies
Highlighted
Sixteen Stars
Sixteen 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
Highlighted
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.
Highlighted
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.

View solution in original post

Highlighted
Six Stars

Re: user input for .bat execution

Don't have an option prompt in TOS_BD 6.5.1

2019 GARTNER 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

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