Using `with` control structure yields "unknown token" error

pillsy
Level 2
Using `with` control structure yields "unknown token" error

When I make any use of the `with` control structure in a Dataiku formula in a Prepare recipe, I get an error message complaining that the variable name is  an unknown token. For example, if I use the formula example from the documentation:

 

with("european union".split(" "), a, a.length())

 

Dataiku complains "Formula is invalid : it has some unknown tokens" and highlights both instances of the variable `a` in red.

What am I doing wrong? Thanks!

 
0 Kudos
3 Replies
Turribeach

Is "a" the name of your column? My test column was called Folder. Works for my column when using v10.0.7.

 

Capture.PNG

0 Kudos
pillsy
Level 2
Author

Wait, you can only bind the expression to an existing column name...? 

I'm not sure what the value of the construct is in that case.

0 Kudos
Turribeach

No, but you copied pasted a formula using a sample column name. What exactly are you trying to achieve? Describe your requirement.

0 Kudos