Member since
07-30-2019
3406
Posts
1622
Kudos Received
1008
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 150 | 12-17-2025 05:55 AM | |
| 211 | 12-15-2025 01:29 PM | |
| 143 | 12-15-2025 06:50 AM | |
| 261 | 12-05-2025 08:25 AM | |
| 423 | 12-03-2025 10:21 AM |
12-23-2019
09:40 AM
@Former Member This should not be happening unless you are clearing NiFi state between restarts or NiFi is having a state issue. When the listSFTP processor runs, it will record state so it does not list the same files more than once. If the Files being written to the SFTP server from which you are listing are not using dot rename as they are being written, it is possible your ListSFTP processor is listing them while they are still being written to. Since state is based off timestamps, a file still being written to will have its timestamp updated between executions of the listSFTP processor. This would result in the file being listed again. If the standard ssh dot rename method is not being used, you may need to "minimum File Age" property in listSFTP to make sure only files whose timestamp has not updated for X amount of time are listed. This of course depends on your version of NiFi being used since this property was introduced as part of https://issues.apache.org/jira/browse/NIFI-5977 There is also the possibility if you are using NiFi 1.8 you are hitting this known bug: https://issues.apache.org/jira/browse/NIFI-5849 If you found a solution that worked, please tae a moment to accept the solution to resolve this community question. Thank you, Matt
... View more
12-23-2019
09:29 AM
@svasi Sounds like you should be using a RouteOnAttribute processor between your listFile and FetchFile processor so that only those FlowFIles you want to Fetch the content for are routed to the FetchFile processor. The listFile processor produces one FlowFile for each file that is returned during the listing execution. The listFile processor writes a number of FlowFile attributes to the FlowFiles that are produced. The Filename attribute is what you will want to use when writing your NiFi Expression Language (EL) statement for your dynamically created properties added to the RouteOnAttribute processor. You can find a EL guide under "Help" under the NiFi global menu in the upper right corner of the NiFi UI. Hope this helps, Matt
... View more
12-20-2019
07:51 AM
1 Kudo
@Former Member The routeOnAttribute processor expects you to add new dynamic properties. Each of those dynamic properties you add becomes a new relationship on the processor to use for routing. Each new property's value is expected to be a NiFi Expression Language statement that results in a boolean true or false. If based on the FlowFile being processed the expression resolves to "true" then the FlowFile will be routed to this new relationship (property name is used as relationship name). If none of your dynamic properties resolve to true for a given FlowFile, that FlowFile is routed to the pre-existing unmatched relationship. I recommend performing this routing prior to actually fetching the content, if the intent is to drop any of the FlowFiles. No sense it using network or disk I/O if you have no need for some content. The ListFile processor create a number of FlowFile attributes on FlowFile including the file.LastModifiedTime. https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.10.0/org.apache.nifi.processors.standard.ListFile/index.html NiFi Expression Language guide is embedded under help accessible vi the NiFi global menu in the upper right corner of the NiFi UI. It is also available here: https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html Note: Above links from Apache NiFi are valid for most current release. The embedded docs included in your installed release will be most accurate for your release. Hope this helps, Matt
... View more
12-20-2019
07:29 AM
@saivenkatg55 NiFi musty be secured before you can use any form of authentication and authorization. Along with securing NiFi you can configure NiFi's login-identity-providers.xml to use the "ldap-provider" for user authentication. Here are some useful links: Securing NiFi: https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.4.1.1/nifi-authentication/content/nifi_authentication.html Setting up ldap-provider: https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.4.1.1/nifi-security/content/ldap_login_identity_provider.html Setting up authorization: https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.4.1.1/nifi-authorization/content/nifi_authorization.html Hope this helps, Matt
... View more
12-18-2019
04:41 PM
@girish6 Anything you can do via the NiFi UI, can also be done using the NiFi Rest-api. Using the developer tools available ion most browsers is a great way to learn how the rest-api calls work. You can have the developer tools UI open while you perform similar actions on the canvas and then capture those rest-api request directly from the developer tools (most offer an option to "save as curl"). It can be challenging to build dataflows via the UI in terms of placement. While NiFi does not care if all your components are stacked upon one another at position 0,0, if you ever try to access the UI to modify a component that way later it would be nearly impossible as it would be one blob in the center of the canvas. You can find the rest-api docs embedded in your NiFi installation by going to the Global Menu in the upper right corner of your NiFi UI and selecting Help. Hope this helps, Matt
... View more
12-17-2019
07:04 AM
@saciya I am not sure why this is not working for you. I built a test flow and it is working fine for me. Here is how I have my ReplaceText processor component configured: I also used "shift+enter" to create a new line at the end of the header being inserted (note that a blank line "2" is shown) and the "Prepend" replacement strategy. I passed it the following test CSV content: 15-Dec-19,Baltimore,27
17-Dec-19,Baltimore,34 I then listed the queue on the success relationship connection outbound from the ReplaceText processor. From there I could click on "View Details" icon to far left of my FlowFile in the queue list and then click "VIEW' to see what the resulting content looked like. Here is what I see for my sample source content above: I am using Apache NiFi 1.9 Hope this helps, Matt
... View more
12-17-2019
06:30 AM
@PavelPrudnikov The specific error you are seeing in the bulletin produced on your PutDatabaseRecord processor is telling you that the processor is not able to find the schema you have configured in your CSVReader. Did you define a schema in one of the Schema Registry providers? Is the value assigned to the "schema.name" FlowFile Attribute on your inbound FlowFile an exact string match with the schema name in your Schema Registry provider? It may be helpful if you share a screenshot of the FlowFile attributes on your FlowFile in the queue to the putDatabaseRecord processor and share your CSVReader configuration as well. Have you tried just using the infer-schema option in the CSVReader Schema Access Strategy? Hope this helps, Matt
... View more
12-16-2019
11:48 AM
@JSJ Let's assume you have following directory structure: /nifi/test/AX1/ /nifi/test/AX2/ /nifi/test/XY1/ /nifi/test/XY2/ You would configure your listFile processor as follows: Hope this helps, Matt
... View more
12-13-2019
07:02 AM
@fowler7878 You are correct that MonitorActivity can not be used to monitor on activity based on per month thresholds. Your use case is not one NiFi is designed to handle. NiFi is designed to work with FlowFiles and typically NiFi processor are not designed to return directory listings. Your use case may require you to build your own custom NiFi processor or perhaps your own custom script that your can execute via ExecuteStreamCommand or ExecuteScript processors where the script returns number of files in a target directory which you can then make notification routing decisions with. I was just trying to offers a builtin solution/suggestion while not exactly what you are looking for. Thank you, Matt
... View more
12-13-2019
06:51 AM
@Love-Nifi Just wanted to add that as @jsensharma mentioned, NiFi will enforce TLS 1.2 as of Apache NiFi release version 1.2.0 but only for all inbound connections to NiFi. NiFi can still support negotiating lower TLS version when making outbound connections in order to support older destination systems. Those processor would use a sslContextService which can be configured to restrict what TLS version is used/allowed.
... View more