Member since
11-16-2016
40
Posts
7
Kudos Received
1
Solution
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 3331 | 12-19-2016 03:17 PM |
04-28-2017
03:21 PM
It occurred to me that it might be better to just convert the entire flowfile contents to the stringify version rather than isolating the problematic blob first. I attempted this by using the following in the ExecuteScript: var StreamCallback = Java.type("org.apache.nifi.processor.io.StreamCallback");
var IOUtils = Java.type("org.apache.commons.io.IOUtils");
var StandardCharsets = Java.type("java.nio.charset.StandardCharsets");
var flowFile = session.get();
if(flowFile != null) {
// Create a new StreamCallback, passing in a function to define the interface method
flowFile = session.write(flowFile,
new StreamCallback(function(inputStream, outputStream) {
var text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)
outputStream.write(JSON.stringify(text).getBytes(StandardCharsets.UTF_8))
}));
session.transfer(flowFile, REL_SUCCESS);
}
However, the resulting content has been modified where the existing json structure is now masked by the use of escape characters before double quotes for instance. Is there an easy way to convert this object back into a json array? Thanks.
... View more
05-23-2017
09:01 AM
I used GenerateTableFetch for query generation split by id. All queries go to ExecuteScript processor, where I change sql( in you case add join) After that use ExecuteSQL
... View more
01-30-2017
08:30 PM
The issue was with the customized bundle utilizing a NiFi 0.5 api where the NiFi running the processor was at 1.0.0.
... View more
01-23-2017
09:31 PM
Thank you for the prompt reply. I'll your suggestions a try.
... View more
03-15-2018
07:47 PM
In destinationName put this queue:///myQueue?targetClient=1 That works for me.
... View more
12-19-2016
03:17 PM
1 Kudo
Thank you for your reply. The problem was related to the "Support Fragmented Transactions" setting in the PutSQL. This needed to be changed to 'false' in my setting due to filtering logic upstream (i.e. ${fragment.index:plus(1):equals(${executesql.row.count})} which only allowed the last transaction to pass a the routeattribute.
... View more
12-09-2016
02:25 PM
For those who may be at a back level HDF version as we are a good workaround is to use the SplitContent instead as it utilizes many of the attributes Matt has documented above for the SplitJson processor.
... View more
11-30-2016
03:34 PM
The RPG can be used to redistribute the ingested data of a single node using teh primary node strategy mentind here across every node in your NiFi cluster. This is a great way to distribute the work load while ensuring each node is working a unique set of FlowFiles.
... View more
11-16-2016
11:04 PM
Just a quick clarification for others following this post the "SELECT" statement should use 'cast' and not 'case' as I have it above.
... View more