Discover this year's submissions to the Dataiku Frontrunner Awards and give kudos to your favorite use cases and success stories!READ MORE

Use both variable name and variable value in processing

raviagrawal
Level 3
Level 3
Use both variable name and variable value in processing
Hi,

I have user case where I have defined a variable like

PHONE: "'iPhone','Samsung Galaxy'"

I am writing a case statement like

when device type in (S{PHONE}) then 'PHONE'

I want to use the variable name itself in the case statement if possible. Could you please let me know if possible ?
0 Kudos
1 Reply
UserBird
Dataiker
Dataiker

Hi, 



You can do variable expansion in SQL with the syntax ${variable_name}, as stated here: https://doc.dataiku.com/dss/latest/advanced/variables_expansion.html#pig-sql



Cheers,



 

0 Kudos