View workflow-xml-reader-writer-fork.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>01621000-4fe2-1d05-8b0e-7111cb416310</groupId>
<name>post-xml-reader-writer-fork</name>
<snippet>
<connections>
<id>13c3b3c1-3610-3a1c-0000-000000000000</id>
<parentGroupId>8f7c4f43-5305-36c8-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
View avro-schema.json
{
"type" : "record",
"name" : "customers",
"namespace" : "customer",
"fields" : [ {
"name" : "customer_id",
"type" : "long"
}, {
"name" : "name",
"type" : "string"
View xml-reader.xml
<customers>
<customer customer_id="1" name="John Doe">
<addresses>
<address type="home" value="1 Apache NiFi street, Nifiville" />
<address type="work" value="10 MiNiFi avenue, Nifiville" />
</addresses>
<accounts>
<account account_id="1" shortname="perso" balance="1234.56" />
<account account_id="2" shortname="joint" balance="2345.67">
<transactions>
View wait-notify.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>2e083aef-0162-1000-80bc-8c6bbfc00ca8</groupId>
<name>wait-notify</name>
<snippet>
<processGroups>
<id>582ee2ef-8a17-3830-0000-000000000000</id>
<parentGroupId>16e377d4-8369-3464-0000-000000000000</parentGroupId>
<position>
View status.avro
{
"type" : "record",
"name" : "status",
"namespace" : "status",
"fields" : [
// common fields
{ "name" : "statusId", "type" : "string"},
{ "name" : "timestampMillis", "type" : "long"},
{ "name" : "timestamp", "type" : "string"},
View bulletins.avro
{
"type" : "record",
"name" : "bulletin",
"namespace" : "bulletin",
"fields" : [
{ "name" : "objectId", "type" : "string"},
{ "name" : "platform", "type" : "string"},
{ "name" : "bulletinId", "type" : "long"},
{ "name" : "bulletinCategory", "type" : "string"},
{ "name" : "bulletinGroupId", "type" : "string"},
View druid_workflow.xml
<?xml version="1.0" ?>
<template encoding-version="1.1">
<description></description>
<groupId>aa246331-015a-1000-fac3-b72f7046408b</groupId>
<name>druid</name>
<snippet>
<processGroups>
<id>0452a6a9-3b2d-3d8c-0000-000000000000</id>
<parentGroupId>6d748a93-8d2f-37d2-0000-000000000000</parentGroupId>
<position>
View XmlToJson.groovy
import org.apache.commons.io.IOUtils
import java.nio.charset.*
import org.json.JSONObject;
import org.json.XML;
def flowFile = session.get()
if (!flowFile) return
flowFile = session.write(flowFile,
{ inputStream, outputStream ->
View XmlToJson.java
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
View ListenTCPRecord.xml
<?xml version="1.0" ?>
<template encoding-version="1.1">
<description></description>
<groupId>aefa0f78-015d-1000-d4c9-279516666f10</groupId>
<name>ListenTCPRecord</name>
<snippet>
<connections>
<id>fb63d048-590a-37c5-0000-000000000000</id>
<parentGroupId>b7bd14b5-3f34-3cb5-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>