Member since
03-23-2022
9
Posts
4
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1709 | 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 : FileZila connection :
... 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. Nifi is hosted on an ubuntu server running in a docker image ListenFTP processor is opened on port 2221 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. It results multiple files with a simple string in content : 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-29-2022
05:56 AM
1 Kudo
Thanks for your reply @araujo . Indeed, the documentation explain well how to set it up. I just was wondering how to do it with docker-compose (i just recently introduce that technology). I only had to change the docker-compose.yml and adding the listening ftp port to the ports line : nifi:
image: apache/nifi:latest
ports:
- "8443:8443"
- "2221:2221" <---- here
volumes:
- /home/user/nifi/datafiles:/data
- /home/user/local-nifi:/local-data
environment:
- SINGLE_USER_CREDENTIALS_PASSWORD=
- SINGLE_USER_CREDENTIALS_USERNAME= Then i connected to it via FileZilla through `ftp://localhost` `port: 2221` and was able to transfer files.
... View more
03-26-2022
11:38 AM
Hi, I would like to know if it's possible to provide a FTP server via Nifi where a user could put files that can be then treated in Nifi. I saw the ListenFTP processor and i think i can do that with it but I don't really know how to set it up. How will the user proceed to send his files? I would like to try to set up this service locally first, knowing that Nifi runs with a docker-compose file. Should I bring a special configuration in this case ? I did not find any example on internet, hope you could help me.
... 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 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