Member since
08-18-2019
56
Posts
11
Kudos Received
18
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
641 | 11-15-2023 05:38 AM | |
2327 | 07-12-2023 05:38 AM | |
695 | 01-10-2023 01:50 AM | |
983 | 12-06-2022 12:08 AM | |
3815 | 12-02-2022 12:55 AM |
11-15-2023
05:38 AM
Try that value: ${kafka.topic:contains('alerts'):ifElse('customerTopicKafkaTesting1',${kafka.topic:contains('events'):ifElse('customerTopicKafkaTesting2',${kafka.topic:contains('ack'):ifElse('customerTopicKafkaTesting3','Not_Found')})})} You forgot to close ${kafka.topic:contains('events')...}
... View more
07-12-2023
05:50 AM
Hello community, I have currently every ~5 days the problem that FlowFiles from the Wait Processor are not get released, only after the "Expiration Duration" was reached (and then routed to the expired relationship). The DistributedMapCacheClientService/DistributedMapCacheServer is used and the problem was prevalent in 1.17/1.20/1.21. After restarting Nifi everything is working fine again with new arrived flowfiles, except that the old flowfiles are still hanging in the wait relationship. Has anyone also experienced the same problem or know what the problem could be? Thank you!
... View more
Labels:
- Labels:
-
Apache NiFi
07-12-2023
05:38 AM
Hello, could you please check right before UpdateAttribute Processor, if the attribute "name" is filled with your expected content? Normally it is correct what you explain - maybe you loose somewhere after merge, wait/notify, ... your attribute. Greetings
... View more
01-10-2023
01:50 AM
Hello @Techie123, can you tell a bit more about what you want to achive? Do you want just use the first or second object of 'data'? Then you have to change: "data": {
"0": { "data": {
"1": { Or how do you want to progress - can it that the numbers are not similiar? We dont know how your results can be look like Greetings
... View more
12-16-2022
04:09 AM
Hello, the problem you have with the merge is that your property "Merge Strategy" needs to be set to "Defragment" after that it should work if both flowfiles also have the same fragment.identifier set. To merge those pdfs Im not 100% sure how it can be easily done, but one solution would be to set also the property "Merge Format" to tar/zip of your MergeContent processor and do it later via script unpack and merge together. Greetings
... View more
12-09-2022
10:37 PM
Hello, you can add following object as last step to your JOLT Spec: {
"operation": "shift",
"spec": {
"header": "header",
"data": "data"
}
} Greetings
... View more
12-09-2022
08:34 AM
Sorry, I misread 😞 But after convertion to csv you could check out topics like https://community.cloudera.com/t5/Support-Questions/how-to-convert-CSV-to-excel-using-apache-nifi/td-p/332089
... View more
12-09-2022
08:09 AM
Hello, you can use after you received the result from your SQL-Database the ConvertRecord Processor to convert from Avro (Reader) to CSV (Writer). That should handle your question to do it without some Script. Greetings
... View more
12-06-2022
12:08 AM
Hello @Manimaran, to help you it would be good if you go a bit more specific into your question with some sample content and what you want to have as expected output. Greetings
... View more
12-02-2022
12:55 AM
2 Kudos
@Techie123 maybe you can beautify it a bit 😄 import org.apache.commons.io.IOUtils
import java.nio.charset.StandardCharsets
import groovy.json.*
import java.util.ArrayList
def flowFile = session.get()
if (!flowFile) return
try {
flowFile = session.write(flowFile, {
inputStream,
outputStream ->
def text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)
def content = new JsonSlurper().parseText(text)
for (int i = content.size() - 1; i >= 0; --i) {
int objNo = i
int recNo = i + 1
def rec = 'Record ' + recNo
if (rec != content[objNo].enrichment.Record) {
content.remove(content[objNo])
}
}
def jsonOutput = JsonOutput.toJson(content)
outputStream.write(JsonOutput.prettyPrint(jsonOutput).getBytes(StandardCharsets.UTF_8))
}
as StreamCallback)
session.transfer(flowFile, REL_SUCCESS)
} catch (Exception e) {
log.error('Error during JSON operations', e)
session.transfer(flowFile, REL_FAILURE)
}
... View more