Forum Discussion
yes @gowdhaman008 I know these things .I have tried in that way also . Same error is coming .
I have tried with this :
"{
"remove": {
"index": $CURRENT_IDX,
"alias": ${_IDX_ALIAS}$Suffix_batch
}
}"
My main issues is for the concatenate part . That is giving the trouble .
The following is working just fine 🙂
"{
"remove": {
"index": $CURRENT_IDX,
"alias": ${_IDX_ALIAS}
}
}"
@Rudradip This is a follow up after a considerable period of time but I wanted to answer the question.
Assuming in input document to the JSON Generator like:
{
"Body": "456",
}
This concatenation in the JSON Generator WILL NOT work:
[
{
"Response": {
"Message": "Thank you for your message, which was $Body"
}
}
]
and will result in an error like
Failed to validate the output
Resolution:
Verify that the table values and the template are correct
Reason:
Unexpected character ('4' (code 52)): was expecting comma to separate Object entries
But if you use a Velocity Directive, the following WILL work:
#set( $message = "Thank you for your message, which was $Body" )
[
{
"Response": {
"Message": $message
}
}
]
The output document will look like:
[{
"Response": {
"Message": "Thank you for your message, which was \"456\""
}
}]
Do note that the $Body
value has been wrapped in quotes. I’ll investigate if there is a way to remove those.
- stephenknilans8 years agoContributor
I have had the same sort of problem. With me, it was reading a zip file. From what I can see there are three possibilities:
- You don’t have a snap connected. Make sure they are all grey, rather than white.(ESPECIALLY unlikely, since it is running when you tell it to run)
- You don’t have a snap set to execute on preview. If it is needed for this, set it.
- MY problem was that the dataset was too big for the preview limit, so it stopped in it’s tracks. You can fix this by creating a smaller sample for a test.