Member since
05-05-2017
15
Posts
0
Kudos Received
0
Solutions
05-26-2017
08:38 AM
stop-nifi.zip Try placing the stop-nifi.bat file from the attached zip file in your bin folder and running it.
... View more
05-25-2017
12:50 AM
Run "nifi.bat stop" from nifi bin folder and it would stop nifi.
... View more
05-12-2017
12:08 PM
Finally was able to achieve this : flowFile = session.write(flowFile,
{ inputStream, outputStream ->
def str= IOUtils.toString(inputStream, StandardCharsets.UTF_8)
...
} as StreamCallback)
... View more
05-12-2017
06:39 AM
Any idea on how to read the payload / content of flowfile to convert the JSON to XML? Please help.
... View more
05-08-2017
10:05 AM
Hi Bekker, Thanks for the response. Find below the code I am trying to work on, which is a modification of the code you shared. I am trying to take the output/flowfile from previous processor (which is a JSON) and trying to convert it to XML flowfile. Please help identify where I am wrong. Code: import net.sf.json.JSON
import net.sf.json.JSONSerializer
import net.sf.json.xml.XMLSerializer
import java.nio.charset.StandardCharsets
JSON json = JSONSerializer.toJSON( session.get() )
XMLSerializer xmlSerializer = new XMLSerializer()
xmlSerializer.setTypeHintsCompatibility( false )
newFlowFile = session.write(session.create(), {outputStream ->
outputStream.write(xmlSerializer.write( json ).getBytes(StandardCharsets.UTF_8))
} as OutputStreamCallback)
session.transfer(newFlowFile, REL_SUCCESS) Error: 06:03:44 EDT
ERROR
d89b9512-015b-1000-3b38-ef64f47e9b90
ExecuteScript[id=d89b9512-015b-1000-3b38-ef64f47e9b90] ExecuteScript[id=d89b9512-015b-1000-3b38-ef64f47e9b90] failed to process session due to org.apache.nifi.processor.exception.FlowFileHandlingException: StandardFlowFileRecord[uuid=11a424b1-dd59-4199-990a-00afb08f45ba,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1493970997597-1, container=default, section=1], offset=81682, length=5214],offset=0,name=TestTemplate.xml,size=5214] transfer relationship not specified: org.apache.nifi.processor.exception.FlowFileHandlingException: StandardFlowFileRecord[uuid=11a424b1-dd59-4199-990a-00afb08f45ba,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1493970997597-1, container=default, section=1], offset=81682, length=5214],offset=0,name=TestTemplate.xml,size=5214] transfer relationship not specified
... View more
05-05-2017
02:40 PM
I am looking for a way to convert DB Query reusult set to XML and XML to SQL and also JSON to XML. Is this doable?
... View more
05-05-2017
02:38 PM
I am looking for a Processor that can convert a JSON to an XML or Translate an XML The main requirement is to replace the value of certain XML Elements in a XML or build an XML from a DB Query output. Would also like to know how to insert XML data to DB Table like JSON to SQL Appreciate any help
... View more
Labels:
- Labels:
-
Apache NiFi