cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to put string concatenation inside the JSON Generator snap body?

Rudradip
New Contributor II

Hi Guys ,

My scenario is following : I need to pass the whole Json inside the JSON generator snap .I have checked the velocity documnets that concate works by just appending ,like $a$b will concate the content of $a and $b . But in this case it is not working .

Json_input.zip (383 Bytes)

Here the โ€œ_โ€ are for pipeline parameters and $ is for the variables coming from previous mapper .

Please help regarding this .

Capture Capture2

5 REPLIES 5

psathyanarayan
Employee
Employee

@Rudradip, I think the issue is concatenating a pipeline variable and a regular variable which causes the syntax error. If you concatenate two regular variables it works fine. For example: $CURRENT_IDX$SUFFIX_BATCH

If you concatenate two pipeline variables, it will cause the syntax error:
$_IDX_ALIAS$_IDX_ALIAS

or even with a different syntax: ${_IDX_ALIAS}${_IDX_ALIAS} will cause the syntax error

I am copying @tstack and @cjhoward18 to comment on this as they may be able to share better insights into this.