Member since
03-23-2022
9
Posts
4
Kudos Received
1
Solution
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 3484 | 04-14-2022 09:06 AM |
04-29-2022
02:22 AM
The latest version of Nifi is running (1.16.0) When I say the connection works fine in localhost, I mean that my Nfii service is launched via docker-compose on my computer. When I access Nifi via https://localhost:8443/nifi/ and use a ListenFTP processor on port 2221, the connection via FileZila works. i can transfer files and treat them in Nifi. Localhost : azg_0-1651224052132.png FileZila connection : azg_1-1651224083665.png
... View more
04-27-2022
04:59 AM
Hello ! I have a ListenFTP processor opened on a port and when i am trying to connect to it via FileZila i have an error "Failed to retrieve directory listing". The connection seems to be establish first but then this error occurs. image (17).png Nifi is hosted on an ubuntu server running in a docker image image (16).png ListenFTP processor is opened on port 2221 azg_0-1651060476235.png I tried to change some configuration in FileZila but nothing worked. The connection works well on localhost. Somone has already encoutered that kind of issue ?
... View more
Labels:
- Labels:
-
Apache NiFi
04-14-2022
09:06 AM
I finally used a Jolt transformation on the last ouput content : input : 22516914714270 jolt spec : [
{
"operation": "shift",
"spec": {
"*": {
"$": "usagePointsId"
}
}
}
] ouput : {"usagePointsId": "22516914714270"} Then i used the EvaluateJsonPath to save the value as attributes What a day 😅
... View more
04-14-2022
08:05 AM
I tried to transform the usagePointsId String to an array of element using a jolt transformation : {
"operation": "modify-overwrite-beta",
"spec": {
"usagePointsId": "=split(',',@(1,usagePointsId))"
}
} output : "usagePointsId" : [ "22516914714270", " 22516914714271", " 22516914714272" ] Then i split this array with SplitJson on the usagePointsId path. azg_0-1649948491867.png It results multiple files with a simple string in content : azg_1-1649948555431.png How can i save that kind of data as Attributes ? I try to use EvaluateJsonPath but unfortunatly, there is no path to precise. Is there a way to handle that ?
... View more
04-14-2022
03:36 AM
Hello, I receive a json from a HTTP Request. It looks like this : {
"accessToken" : "token",
"expiresIn" : "12600",
"refreshToken" : "token",
"tokenType" : "Bearer",
"usagePointsId" : "22516914714270, 22516914714270, 22516914714270"
} I have the usagePointsId key containing a string with multiple values. I will need each values to include them in different API calls. I would therefore like to be able to separate the string at the comma level to extract each value. Then the idea is to create a new unique flow file for each value. This value would be associated with a "usagePointId" attribute which would be used in my API calls. Also, the others json key would be added as Attributes for each flow files I don't know if it's possible to create multiple differents flow file based on a split attributes. I tried to use the ExecuteScript (with ECMASCRIPT) to split the string and create Flow Files with something like this : flowFile = session.get()
if (!flowFile) return
usagePointsId = flowFile.getAttribute('usagePointsId')
splitStr = usagePointsId.split(",");
let attrs = []
for (let i = 0; i < spltStr.length, i+) {
newFlowFile = session.create()
newFlowFile = session.write(newFlowFile, splitStr[i] )
session.transfer(newFlowFile, REL_SUCCESS)
} Someone could help me with that kind of issue ? Thanks
... View more
Labels:
- Labels:
-
Apache NiFi
03-24-2022
06:49 AM
3 Kudos
Thanks for your reply @steven-matison . I was trying to use FlowFile Form Data Name in the InvokeHTTP processor azg_0-1648129645103.png Someone gave me the right way to resolve my issue and it worked : https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.15.3/org.apache.nifi.processors.standard.InvokeHTTP/index.html When the HTTP Method is POST, dynamic properties with the property name in the form of post:form:<NAME>, where the will be the form data name, will be used to fill out the multipart form parts. so, post:form:<NAME> could be used for multipart/form-data and you want application/x-www-form-urlencoded format of http body should be parm1=Value1&parm2=Value2 before calling invokeHttp use replaceText with approximately this expression in replacement value: client_secret=${client_secret:urlEncode()}&client_secret=${client_secret:urlEncode()}&... then use invokehttp with Send Message Body = true
Content-Type = application/x-www-form-urlencoded
... View more
03-23-2022
08:00 AM
Hi, I just started using Nifi and i would like to know if it's possible to perform a POST with a content-type set to `x-www-form-urlencoded`. I need to pass these key/values to my request : grant_type refresh_token
client_id myClientId
client_secret myClientSecret
refresh_token myRefreshToken
... View more
Labels:
- Labels:
-
Apache NiFi