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

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

is there a way to put the query already formatted in the "context.query" of talend?

good morning, talend in "context.talend" to insert a query

it uses that Syntax in this style:

example 01:

+" SELECT"

+" DISTINCT"

+"CASE"

+" WHEN current_database() = 'credreal' THEN 'CR'"

+" WHEN current_database() = 'city' THEN 'CI'"

+" WHEN current_database() = 'melc' THEN 'ME'"

+"ELSE 'CH'"

+"END as base"

instead of the default:

example2

select distinct

CASE

WHEN current_database() = 'credreal' THEN 'CR'

WHEN current_database() = 'city' THEN 'CI'

WHEN current_database() = 'melc' THEN 'ME'

ELSE 'CH'

END as "Base"

my question is if there is any way to convert from example2 to example1 other than manually.

Labels (2)
1 Reply
Anonymous
Not applicable

Hi

You have to type in the query manually if you want to insert variable or use the string concatenator "+", the expression using a context variable in a query like this.

"select * form tableName where key1="+context.varName1+" and key2="+context.varName2

 

Regards

Shong