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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
vincent5
Contributor
Contributor

Context variables

Hi,

I'm using Talend V6.4.1 Integration with an Informix database.
I would like to concatenate 2 context variables in a tELTInformixMap.
For example :
My first variable is equal to 'CM0' (context.CM0)
My second variable is equal to '87' (context.CAISSE)
I would like to get 'CM087' to insert it in an informix table.
I tried all kinds of writing but none give me the expected result.
The last try is the following script: 'context.CM0 + context.CAISSE'
Which gives as result: 'CM0+87' (incorrect)
  Thanks for your help.

 

Labels (2)
13 Replies
vincent5
Contributor
Contributor
Author

Hi,

 

In the "ELTInformixMap '" I do not put a single or double quotation mark, they are added by Talend in the SQL code.

 

Regards,

Vincent

vincent5
Contributor
Contributor
Author

Hi,

 

The context variables used alone work very well, but when I want to concatenate two of them, it does not work.
The problem lies in the screen copy in the concat.

 

Regards,

Vincent

Anonymous
Not applicable

Hi Vincent,

 

    I would suggest you to see the code tab also so that you can understand the places where you are having the java errors. The errors are happening because the current code is having single quotes for variables. You will have to remove them and verify the code before running the job.

 

Warm Regards,

 

Nikhil Thampi

vincent5
Contributor
Contributor
Author

Hi,

 

The Informix components have been developed specifically for us, I do not know if they have been made available in Talend for everyone.
Should we review this component to remove quotes or double quotes?
We have just migrated to version 6.4.1 and in the previous version (5.2.2) we did not have this problem.

The sql code generated by the comoposant talend of CONCAT (context.CM0, context.CAISSE):

GlobalMap
.put ("tELTInformixMap_1" + "QUERY" + "table1",
"SELECT distinct substr ('"
+ context.DATE_TRT
+ "', 1.4) -1, CONCAT ("
+ context.CM0
+ ","
+ context.CAISSE
+ "),

 

Regards,

Vincent