Member since
06-14-2023
96
Posts
34
Kudos Received
9
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 1694 | 11-04-2024 06:51 PM | |
| 6056 | 12-29-2023 09:36 AM | |
| 9376 | 12-28-2023 01:01 PM | |
| 1961 | 12-27-2023 12:14 PM | |
| 1176 | 12-08-2023 12:47 PM |
10-31-2025
12:53 PM
I also had the same problem I got it to working temporarily with something like this ${literal('#'):append('{blahblah}'):evaluateELString()} however it wont be supported from 1.19 onwards Refer: https://community.cloudera.com/t5/Support-Questions/Dynamically-references-parameters-from-parameter-context/m-p/375008
... View more
10-25-2025
09:04 PM
1 Kudo
Use the Funnel processor to merge the different queues into a single one and then you can specify more than one file for the get def flowFiles = session.get(10)
... View more
04-28-2025
10:40 PM
@joseomjr your code could not work at my end. ChatGPT help me with below code and it is working at my end. import java.util.zip.ZipInputStream
import java.util.zip.ZipEntry
import java.io.ByteArrayOutputStream
def flowFile = session.get()
if (!flowFile) return
try {
session.read(flowFile, { inputStream ->
ZipInputStream zipIn = new ZipInputStream(inputStream)
ZipEntry entry = zipIn.nextEntry
while (entry != null) {
if (!entry.isDirectory()) {
ByteArrayOutputStream baos = new ByteArrayOutputStream()
byte[] buffer = new byte[8192]
int len
while ((len = zipIn.read(buffer)) > 0) {
baos.write(buffer, 0, len)
}
def contentBytes = baos.toByteArray()
def newFlowFile = session.create(flowFile)
newFlowFile = session.write(newFlowFile, { outStream ->
outStream.write(contentBytes)
} as OutputStreamCallback)
newFlowFile = session.putAttribute(newFlowFile, 'filename', entry.getName())
session.transfer(newFlowFile, REL_SUCCESS)
}
zipIn.closeEntry()
entry = zipIn.nextEntry
}
} as InputStreamCallback)
session.remove(flowFile)
} catch (Exception e) {
log.error("Failed to unzip FlowFile due to: ${e.message}", e)
session.transfer(flowFile, REL_FAILURE)
} I hope there is no security concern with this code!
... View more
04-07-2025
03:03 AM
hello Sir, I have just setup a basic NiFi custom processor. when i try to build, one of the module gets built but the nar module fails with error [[1;31mERROR[m] [1;31mRule 3: org.apache.maven.enforcer.rules.dependency.RequireReleaseDeps failed with message:[m [[1;31mERROR[m] [1;31mDependencies outside of Apache NiFi must not use SNAPSHOT versions[m [[1;31mERROR[m] [1;31mcom.example:nifi-my_custom_nifi_processor-nar:nar:1.0-SNAPSHOT[m [[1;31mERROR[m] [1;31m com.example:nifi-my_custom_nifi_processor-processors:jar:1.0-SNAPSHOT <--- is not a release dependency
... View more
11-06-2024
10:47 PM
2 Kudos
@joseomjr , Thank you for responding, I instead chose a hard way approach. I thought why not create a custom Nar, which takes in 2 parameters, 1 for the json template with placeholders and 2 with its respective values. used sort of a recursion to create the final output. for and input like Template {"details":{"name":"${name}","age":"${age}","superpower":"${superpower}"}} value : {"name": "Clark Kent", "age": "35","superpower": "Superman"} gives output as { "details": { "name": "Clark Kent", "age": "35", "superpower": "Superman" } }
... View more
11-04-2024
06:51 PM
1 Kudo
The Groovy processor takes the incoming FlowFile and does stuff with it and writes a new FlowFile with the repsonse. What I tried was a JSON upload but will try "multipart/form-data" if I get a chance and see how that looks.
... View more
11-04-2024
06:09 AM
2 Kudos
@shiva239 You can create an apache "NiFi" jira in the Apache community to highlight this new feature and request modification to existing processor to support it. https://issues.apache.org/jira/ The more detail you provide in your jira the better chance someone might take this on in the community. Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
11-02-2024
06:26 PM
2 Kudos
You can achieve the same with a JOLT shift and this spec: {
"*": "&",
"meHostName": {
"*;*": {
"$(0,1)": "case",
"$(0,2)": "devicename"
}
}
}
... View more
07-23-2024
06:41 AM
I referred to the other article because of the custom listSFTP processor. This would make it possible to use only one PG with the workflow "move file from A to B", read the job configuration by any other processor, put the config values on a flowfile and pass it to this listSFTP processor.
... View more