Member since
10-16-2022
4
Posts
0
Kudos Received
0
Solutions
10-16-2022
11:01 AM
Hello! I want to transfer json using curl to ExecuteStreamCommand processor. Problem with deleting double quotes. The ExecuteStreamCommand processor automatically removes double quotes when generating a string for an executable command. there is an ExecuteStreamCommand processor Command Path ---> curl Command Arguments ----> -X PUT dev.exemple.com/api/items/4126664 -vs -H 'Content-Type: application/json' --data '{"details":{"Produce":"Gigabyte","l(sm) ":0.0,"manufacturerCountry"}}' This processor during the formation of the general command curl -X PUT dev...etc. automatically removes double quotes from the command text and sends the command without double quotes. ——-> curl -X PUT dev.exemple.com/api/items/4126664 -vs -H 'Content-Type: application/json' --data '{details:{ If you escape double quotes Command Arguments ----> -X PUT dev.exemple.com/api/items/4126664 -vs -H 'Content-Type: application/json' --data '{\"details\":{\"Produce\":\"Gigabyte\" ,\"l(sm)\":0.0,\"manufacturerCountry\"}}' then nifi does not remove the double quotes, but passes the string to the command also with a screen before the double quotes. doesn't roll either. I found advice to somehow create my own rule / strategy for passing arguments to the command, and there you need to specify that double quotes are not removed. but nowhere did I find an example or a hint. in the documentation of the processor itself, a general description, but there are no examples of creation.
... View more
Labels:
- Labels:
-
Apache NiFi
10-16-2022
07:24 AM
If double quotes are escaped, then the processor does not remove them, but the command is also sent with a backslash before the double quotes. does not work.
... View more
10-16-2022
07:21 AM
A similar situation. the process automatically removes the double quotes and already passes without them. if escaped, the process does not remove them, but leaves a backslash before the double quotes. It is advised to define a strategy for passing arguments, but so far I have not found examples of how to do this. If anyone has an algorithm for creating such a strategy, please share.
... View more