Skip to content

Instantly share code, notes, and snippets.

View pvillard31's full-sized avatar

Pierre Villard pvillard31

View GitHub Profile
FROM apache/nifi-minifi:latest
USER root
ENV MINIFI_HOME /opt/minifi/minifi-0.5.0
ADD config.yml $MINIFI_HOME/conf/config.yml
ADD *.nar $MINIFI_HOME/lib/
RUN chown -R minifi:minifi $MINIFI_HOME
# command to convert the template into yml file for MiNiFi
$MINIFI_HOME/bin/config.sh transform templateConvertRecord.xml config.yml
$ cat test.csv
name,company
Pierre Villard,Google
$ curl --data-binary "@test.csv" -H "Content-Type: text/csv" -X POST http://localhost:9090/
[ {
"name" : "Pierre Villard",
"company" : "Google"
} ]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>2e083aef-0162-1000-80bc-8c6bbfc00ca8</groupId>
<name>oozie</name>
<snippet>
<processGroups>
<id>5a720561-d2b1-3f86-0000-000000000000</id>
<parentGroupId>16e377d4-8369-3464-0000-000000000000</parentGroupId>
<position>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>2e083aef-0162-1000-80bc-8c6bbfc00ca8</groupId>
<name>testKafka</name>
<snippet>
<processGroups>
<id>db42a463-039a-32b1-0000-000000000000</id>
<parentGroupId>16e377d4-8369-3464-0000-000000000000</parentGroupId>
<position>
@pvillard31
pvillard31 / MDD.xml
Created August 29, 2018 16:15
Template for Monitoring Driven Development in NiFi
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>8927f4c0-0160-1000-597a-ea764ccd81a7</groupId>
<name>MDD</name>
<snippet>
<connections>
<id>a2098494-cce9-3fa4-0000-000000000000</id>
<parentGroupId>a8352767-434f-3321-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
<?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>
{
"type" : "record",
"name" : "customers",
"namespace" : "customer",
"fields" : [ {
"name" : "customer_id",
"type" : "long"
}, {
"name" : "name",
"type" : "string"
<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>
<?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>