I am using two steps in Nifi:
Step 1. InvokeHTTP processor to make a REST API call and receive a JSON response, "Put Response Body In Attribute" used to store the JSON response into an attribute.
Step 2. ExecuteStreamCommand processor to invoke Python script. The JSON response attribute from previous passed as input argument here. The Command Argument to the processor:
/home/kavipriya/script/Scaling.py;"${AssetModel}";
But Double quotes are removed from the JSON message and then passed to python script. So when parsing JSON I'm getting following error:
"json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 3 column 5 (char 10)"
Can someone tell me why are the double quotes removed when JSON message passed as argument and also if there is an option to retain the double quotes. Thanks for your help!
I have attached JSON message and also the python logs showing double quotes missing when reading the argument.JSON Attribute with doublequotes passed to Python scriptLog written by Python script missing double quotesNifi flow with errorPython Script