Member since
11-16-2015
905
Posts
664
Kudos Received
249
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 253 | 09-30-2025 05:23 AM | |
| 665 | 06-26-2025 01:21 PM | |
| 512 | 06-19-2025 02:48 PM | |
| 758 | 05-30-2025 01:53 PM | |
| 11002 | 02-22-2024 12:38 PM |
06-19-2017
07:57 PM
1 Kudo
The following configuration of ReplaceText should work for you: where the Search Value is the following: [\[\]](\{|\}) This matches [{ or ]} (and also [} and ]{ which shouldn't show up if your input is valid JSON) and replaces it with whichever curly brace it found. Note that this is a fairly specific solution, where the array is the last element of an object (i.e. the end pattern is not the end-of-object followed by end-of-array, rather the reverse). A more forgiving solution (for your input JSON) might be to use the following Chain spec in a JoltTransformJSON processor: [
{
"operation": "shift",
"spec": {
"result": {
"curves": {
"*": {
"@": "result.curves"
}
},
"*": "result.&"
},
"*": "&"
}
}
] This "hoists" the object in the 1-element array up one level, achieving the same result as the ReplaceText pattern above.
... View more
06-19-2017
06:24 PM
You can annotate a method (with zero or one arguments, the one being a ProcessContext) with @OnStopped that will get called when the processor is stopped. See the Component Lifecycle section of the Developer Guide for more details.
... View more
06-19-2017
01:03 AM
Is SMPPServerSimulator.run() an asynchronous method, meaning it returns immediately? If so, then the framework may have already committed your session (after returning from the onTrigger() call in AbstractProcessor), in which case the transfer() either didn't work (but it was too late to throw a runtime exception up through to the framework) or it did work but the session now needs another call to commit(). These types of processors that use a separate thread/lifecycle to manage I/O are tricky to integrate into the NiFi architecture, it takes great care to make sure operations are performed in an order that is consistent with the behavior of both the separate entity and the NiFi framework. If the run() method is synchronous, then there is something else going on, but it still seems related to the session not being committed. Can you attach a debugger and see if sesson.commit() gets called after your session.transfer()?
... View more
06-15-2017
10:41 PM
What version of NiFi/HDF are you using? As of NiFi 1.2.0 or HDF 3.0.0, PutHiveQL supports multiple statements (via NIFI-3031) and there is also an EnforceOrder processor (via NIFI-3414), the latter of which could be configured to use the fragment.index attribute for the Order Attribute property and ${fragment.identifier} for the Group Identifier property. Prior to NiFi 1.2.0, you can try adding an UpdateAttribute processor between SplitContent and PutHiveQL, setting the "priority" attribute to ${fragment.index}. Then use a PriorityAttributePrioritizer on the connections between the SplitContent -> UpdateAttribute -> PutHiveQL. I'm not sure if this works as-is because the documentation suggests the priority comparator is lexicographical and not numeric. If that's the case, you'd need some Expression Language functions or an ExecuteScript processor to left-pad the fragment.index values with zeros to make them all the same length.
... View more
06-15-2017
09:06 PM
That property does not currently support Expression Language, I have written NIFI-4080 to address the issue.
... View more
06-15-2017
03:42 AM
+1 ExecuteScript does allow incoming flow files... also if your scripting language is Groovy you can use Sshoogr to execute remote commands, see my example here.
... View more
06-14-2017
02:23 PM
I confirmed this to be a bug in ConvertJSONToSQL, I have written up NIFI-4071, please see the Jira for details.
... View more
06-14-2017
01:09 PM
Or try adding an extra slash before your path (see here for explanation): file:///post/postgresql-42.1.1.jre7.jar
... View more
06-13-2017
08:25 PM
That error is a bit different, can you share the associated stack trace from the log(s) (logs/nifi-app.log, e.g.)?
... View more
06-13-2017
03:40 PM
Do you mind putting this into a new HCC question? Although the problems may be somewhat similar, you will likely get answers that don't apply to the original question here, so to avoid confusion, I think a new question is the right way to go 🙂 Thanks in advance!
... View more