Member since
07-30-2019
3467
Posts
1641
Kudos Received
1018
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 151 | 05-06-2026 09:16 AM | |
| 245 | 05-04-2026 05:20 AM | |
| 236 | 05-01-2026 10:15 AM | |
| 467 | 03-23-2026 05:44 AM | |
| 352 | 02-18-2026 09:59 AM |
09-01-2021
11:47 AM
1 Kudo
@Justee ListSFTP only generate a FlowFile with attributes/metadata about the file on the SFTP processor. It does not look at the content itself. So your filtering options are limited to what is in those generated attributes. The FetchSFTP processor uses these attributes/metadata to retrieve the actual content and add it to the existing FlowFile produced by the ListSFTP processor. So unfortunately you would need to fetch the all files and then keep on those that contain the desired value in the third field. You may want to look at the RouteText [1] processor for handling these Files after they are the content is fetched. [1] https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.14.0/org.apache.nifi.processors.standard.RouteText/index.html If you found this response addressed your query, please take a moment to login and click on "Accept as Solution" below this post. Thank you, Matt
... View more
08-24-2021
10:59 AM
@smartraman This can also be accomplished through a different and more complex configuration of the ReplaceText processor: Using below input content example: {
"TOT_NET_AMT" : "[\"55.00\"]",
"H_OBJECT" : "File",
"H_GROSS_AMNT" : "[\"55.00,58.00\"]",
"TOT_TAX_AMT" : "[9.55]"
} I would set up the replaceText processor as follows: Instead of just searching for those character patterns and replacing them with nothing, I break entire input line-by-line in to a series of capture groups. That way I can omit the capture groups matching the patterns you want removed ([ or [\" or \"] or ]) and then manipulate the capture group containing a possible comma separated list, so that only the last value in that list is returned. I used below java regular expression which results in 5 capture groups: (.*?)([\Q[\E]\\\"|[\Q[\E])(.*?)(\\\"[\Q]\E]|[\Q]\E])(.*?)$ I then used the following Replacement Value in which I used NiFi expression language against the 3rd capture group. If that capture group does not contain any commas, the entire string is returned. With example above and this configuration, you end up with the following new content: {
"TOT_NET_AMT" : "55.00",
"H_OBJECT" : "File",
"H_GROSS_AMNT" : "58.00",
"TOT_TAX_AMT" : "9.55"
} If you found this helped with your latest query, please take a moment to login and click on "Accept as Solution" below this response. Thank you, Matt
... View more
08-13-2021
12:36 PM
@mickt Correct.... This recent bug fix is fixed in the current master and will be part of the next Apache NiFi 1.15 release.
... View more
08-13-2021
12:26 PM
@dupuy_gregory Can you share the configurations for both your GetHDFS processors?
... View more
08-13-2021
12:20 PM
@SolidSnake Site-To-Site is not a proxy. Perhaps a diagram of what you are trying to accomplish may make it easier to follow your use case? Could you share such a diagram that shows flow of connections and what is happening now versus a diagram that shows what you want to happen. You have a 2 node nifi cluster using invokeHTTP processor making a request to a handleHttpRequest processor on the standalone NiFi (1 node cluster) and then the FlowFile generated by the HandleHttpRequest processor is end via Site-To-Site to the NiFi cluster that then routes to a HandleHttpResponse? Maybe i am not following very well, but I don't understand why you are doing that if I understand your flow correctly? Why isn't the same node that receives the the request via the HandleHttpRequest processor also sending the response via a HandleHttpResponse processor? Thanks, Matt
... View more
08-13-2021
08:16 AM
1 Kudo
@mickt I looks as though you may be hitting: https://issues.apache.org/jira/browse/NIFI-8938 This issue was introduced via a change that was introduced as part of NiFi 1.14: https://issues.apache.org/jira/browse/NIFI-8723 If you found this response addressed your query, please take a moment to login and click "Accept as Solution". Thank you, Matt
... View more
08-13-2021
08:06 AM
@midee Not a lot of details in your question here, but the exception: SunCertPathBuilderException: unable to find valid certification path to requested target is telling you that the trust could not be determined in the TLS handshake that occurred between client and server. Essentially this means that yoru truststore did not contain all the necessary TrustedCertEntries. The complete trust chain must exist in the truststore. Lets say you have Certificate "cert-X" signed by Certificate Authority (CA) "CA-A". Owner: CN=cert-X, OU=test Issuer: CN=CA-A, OU=CA-intermediate Then that CA "CA-A" was signed by another CA "CA-root" Owner: CN=CA-A, OU=CA-intermediate Issuer: CN=CA-root, OU=CA-root Then the CA "CA-root" is signed by itself: Owner: CN=CA-root, OU=CA-root Issuer: CN=CA-root, OU=CA-root So in order to trust the certificate CN=cert-X, OU=test, the truststore would need to contain the complete trust chain meaning it would need to have a TrustedCertEntry for both "CA-A" and "CA-root" There may even be more CAs in that trust chain. You need every public cert for each ca all the way to the root CA (owner and issuer the same) to have complete trust chain. A mutual TLS handshake would require trust in both directions. Clients certificate must be trusted by server and server's certificate must be trusted by client. In a 1-way TLS handshake you only need trust in one direction. Client must be able to trust server's certificate only since client would not be sending a certificate to the server. If you found this response addressed yoru query, please take a moment to login and click "Accept as Solution". Thank you, Matt
... View more
08-13-2021
07:42 AM
@dupuy_gregory Yes, a krb5.conf can contain multiple realms in it. The HDFS processor components offered through NiFi can each be configured with different hadoop configuration resources (core-site.xml, hdfs-site.xml, etc..) and different Kerberos credentials (keytab and principal). This will allow various NiFi dataflows to interact with different target Hadoop clusters. If you found this response addressd yoru query, please take a moment to login and click on "Accept as Solution" Thank you, Matt
... View more
08-13-2021
07:33 AM
1 Kudo
@smartraman You can use a ReplaceText processor to remove these special characters from your json. Using your example, I could produce yoru desired output using the following java regular expression: (\\")|[\Q[\E]|[\Q]\E] Source: My ReplaceText processor was configured as follows: result: If you found this response addressed your query, please take a moment to login and click on "Accept as Solution". Thank you, Matt
... View more
08-09-2021
05:37 AM
@midee The condition NEL statement and resulting actions NEL statements will be unique for each rule you create. For example: Rule 1: Conditions: ${attr1:trim():length():minus(${attr1:trim():replaceAll(' ',''):length()}):plus(1):equals(1)} Actions: ${attr1:substring(0,1)} Rule2: Conditions: ${attr1:trim():length():minus(${attr1:trim():replaceAll(' ',''):length()}):plus(1):equals(2)} Actions: ${attr1:substring(0,1)}${attr1:getDelimitedField(2,' '):substring(0,1)} Rule3: Conditions: ${attr1:trim():length():minus(${attr1:trim():replaceAll(' ',''):length()}):plus(1):equals(3)} Actions: ${attr1:substring(0,1)}${attr1:getDelimitedField(2,' '):substring(0,1)}${attr1:getDelimitedField(3,' '):substring(0,1)} Rule4: Conditions: ${attr1:trim():length():minus(${attr1:trim():replaceAll(' ',''):length()}):plus(1):equals(4)} Actions: ${attr1:substring(0,1)}${attr1:getDelimitedField(2,' '):substring(0,1)}${attr1:getDelimitedField(3,' '):substring(0,1)}${attr1:getDelimitedField(4,' '):substring(0,1)} You will notice in the Conditions NEL statement, the last number is incrementing for each rule and in the Actions NEL statement the statement gets a bit longer with each additional string If you found these answers to your query were useful, please take a moment to login and click "Accept as Solution" on all answers that helped. Hope this helps, Matt
... View more