Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to change dynamically tJava content via an application url?

Hi everyone,

I've do a talend project that used tJava , I have a variable in my tJava and I want to change this dynamically by my application url.

So, How to change dynamically tJava content via an application request?

 

Example : 

 

url : https://localhost:80/haha?name='Joe'

 

tJava code : 

String name = ?How to take the url value : "name=Joe"?;

 

Thank you for your responses 0683p000009MA9p.png

Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hi Mialy,

 

     Are you trying to call this job from any url? Or is there any separate batch process which will call the job containing the tjava component you have mentioned?

 

    Could you please give some more details about the flow you are trying to create so that we can help you better. If you are fine, could you please also share a screen shot of your current job flow?

 

Warm Regards,

 

Nikhil Thampi

Anonymous
Not applicable
Author

Yes, I'm trying to call this job from any url.

 

So, I explain my problem to you. I have an web application. When I clic a button from this application, it sends an url like this : 

 

 "https://localhost:80/appli?name='Opel'"

 

So I want to take this parameter "name" and after I want to set it in my tJava, like that : 

 

context.name = "Opel"

 

My question is , how to set this parameter value in the context.

 

Here is my job's picture. 0683p000009MACn.png


Capture.PNG
TRF
Champion II
Champion II

You should consider to use Talend ESB to expose a web service which you can call from your web application, passing parameter and receving result.
Running a job from a web application is possible using a system command with --context_param=yourParameterValue
However, this is not the best choice in my opinion.