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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
DScolari1623331702
Contributor
Contributor

Talend: How can I set global variable into tREST HTTP Body?

I am developing a new REST webservice for our application.

My goal is to pass instead of the fixed date, a date that I retrieve from a database ,

but as I report in the images below the parameter does not work correctly.

While if I pass the date as per the field below the job works correctly.

Would you know how to help me. Thank you

" {

"tokenKey": "ofsodfdsnsd frrfmoic",

"dbKey": "dd_ab",

"customerKey": "lp_ProdG100",

"from":"2022-11-01",

"period": "DAY",

"profile": 1

}

"

0695b00000aDR7dAAG.png

0695b00000aDR7iAAG.png

Labels (5)
13 Replies
DScolari1623331702
Contributor
Contributor
Author

Thank you very much, but I don't know what to do anymore.

I will bring back the job as per your suggestion

0695b00000aDT0PAAW.png 

This is the job in which I hand them the date manually

0695b00000aDT1hAAG.png0695b00000aDT21AAG.png 

Anonymous
Not applicable

You appear to have a space between your globalMap containing the date and your opening double quote ("). You have...

 

\"from\":\" "+((String)globalMap.get("oggi"))+"\",

 

....and I think you need....

 

\"from\":\""+((String)globalMap.get("oggi"))+"\",

 

A tiny change, but it would end up producing your date like this....

 

" 2020-11-01"

 

...instead of this....

 

"2020-11-01"

DScolari1623331702
Contributor
Contributor
Author

You are right, stupid mistake! I thank you, I was going crazy. It works perferctly

Anonymous
Not applicable

It's easy to overlook an empty space. I've wasted days on stuff like this before 😉