|
<?xml version="1.0" ?> |
|
<template encoding-version="1.1"> |
|
<description></description> |
|
<groupId>73ae6ed8-015e-1000-89f3-94907fd76646</groupId> |
|
<name>Load CSV to Table with Record</name> |
|
<snippet> |
|
<processGroups> |
|
<id>f81a2949-1728-32f5-0000-000000000000</id> |
|
<parentGroupId>c72c436c-5a63-35af-0000-000000000000</parentGroupId> |
|
<position> |
|
<x>0.0</x> |
|
<y>0.0</y> |
|
</position> |
|
<comments></comments> |
|
<contents> |
|
<connections> |
|
<id>4688ac05-b1e3-3e8d-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold> |
|
<backPressureObjectThreshold>10000</backPressureObjectThreshold> |
|
<destination> |
|
<groupId>f81a2949-1728-32f5-0000-000000000000</groupId> |
|
<id>39fc92eb-59e0-3e02-0000-000000000000</id> |
|
<type>PROCESSOR</type> |
|
</destination> |
|
<flowFileExpiration>0 sec</flowFileExpiration> |
|
<labelIndex>1</labelIndex> |
|
<name></name> |
|
<selectedRelationships>failure</selectedRelationships> |
|
<source> |
|
<groupId>f81a2949-1728-32f5-0000-000000000000</groupId> |
|
<id>ce225866-ef86-3a36-0000-000000000000</id> |
|
<type>PROCESSOR</type> |
|
</source> |
|
<zIndex>0</zIndex> |
|
</connections> |
|
<connections> |
|
<id>6b6877b3-a10d-3536-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold> |
|
<backPressureObjectThreshold>10000</backPressureObjectThreshold> |
|
<bends> |
|
<x>847.5253295898438</x> |
|
<y>92.41309356689453</y> |
|
</bends> |
|
<destination> |
|
<groupId>f81a2949-1728-32f5-0000-000000000000</groupId> |
|
<id>ce225866-ef86-3a36-0000-000000000000</id> |
|
<type>PROCESSOR</type> |
|
</destination> |
|
<flowFileExpiration>0 sec</flowFileExpiration> |
|
<labelIndex>0</labelIndex> |
|
<name></name> |
|
<selectedRelationships>success</selectedRelationships> |
|
<source><?xml version="1.0" ?> |
|
<template encoding-version="1.1"> |
|
<description></description> |
|
<groupId>73ae6ed8-015e-1000-89f3-94907fd76646</groupId> |
|
<name>Load CSV to Table with Record</name> |
|
<snippet> |
|
<processGroups> |
|
<id>f81a2949-1728-32f5-0000-000000000000</id> |
|
<parentGroupId>c72c436c-5a63-35af-0000-000000000000</parentGroupId> |
|
<position> |
|
<x>0.0</x> |
|
<y>0.0</y> |
|
</position> |
|
<comments></comments> |
|
<contents> |
|
<connections> |
|
<id>4688ac05-b1e3-3e8d-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold> |
|
<backPressureObjectThreshold>10000</backPressureObjectThreshold> |
|
<destination> |
|
<groupId>f81a2949-1728-32f5-0000-000000000000</groupId> |
|
<id>39fc92eb-59e0-3e02-0000-000000000000</id> |
|
<type>PROCESSOR</type> |
|
</destination> |
|
<flowFileExpiration>0 sec</flowFileExpiration> |
|
<labelIndex>1</labelIndex> |
|
<name></name> |
|
<selectedRelationships>failure</selectedRelationships> |
|
<source> |
|
<groupId>f81a2949-1728-32f5-0000-000000000000</groupId> |
|
<id>ce225866-ef86-3a36-0000-000000000000</id> |
|
<type>PROCESSOR</type> |
|
</source> |
|
<zIndex>0</zIndex> |
|
</connections> |
|
<connections> |
|
<id>6b6877b3-a10d-3536-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold> |
|
<backPressureObjectThreshold>10000</backPressureObjectThreshold> |
|
<bends> |
|
<x>847.5253295898438</x> |
|
<y>92.41309356689453</y> |
|
</bends> |
|
<destination> |
|
<groupId>f81a2949-1728-32f5-0000-000000000000</groupId> |
|
<id>ce225866-ef86-3a36-0000-000000000000</id> |
|
<type>PROCESSOR</type> |
|
</destination> |
|
<flowFileExpiration>0 sec</flowFileExpiration> |
|
<labelIndex>0</labelIndex> |
|
<name></name> |
|
<selectedRelationships>success</selectedRelationships> |
|
<source> |
|
<groupId>f81a2949-1728-32f5-0000-000000000000</groupId> |
|
<id>e15c2e2b-2638-32ac-0000-000000000000</id> |
|
<type>PROCESSOR</type> |
|
</source> |
|
<zIndex>0</zIndex> |
|
</connections> |
|
<controllerServices> |
|
<id>dfd8da63-1639-3354-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<bundle> |
|
<artifact>nifi-dbcp-service-nar</artifact> |
|
<group>org.apache.nifi</group> |
|
<version>1.4.0-SNAPSHOT</version> |
|
</bundle> |
|
<comments></comments> |
|
<descriptors> |
|
<entry> |
|
<key>Database Connection URL</key> |
|
<value> |
|
<name>Database Connection URL</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Database Driver Class Name</key> |
|
<value> |
|
<name>Database Driver Class Name</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>database-driver-locations</key> |
|
<value> |
|
<name>database-driver-locations</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Database User</key> |
|
<value> |
|
<name>Database User</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Password</key> |
|
<value> |
|
<name>Password</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Max Wait Time</key> |
|
<value> |
|
<name>Max Wait Time</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Max Total Connections</key> |
|
<value> |
|
<name>Max Total Connections</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Validation-query</key> |
|
<value> |
|
<name>Validation-query</name> |
|
</value> |
|
</entry> |
|
</descriptors> |
|
<name>DBCPConnectionPool</name> |
|
<persistsState>false</persistsState> |
|
<properties> |
|
<entry> |
|
<key>Database Connection URL</key> |
|
<value>jdbc:mysql://192.168.99.100:3306/nifi_test</value> |
|
</entry> |
|
<entry> |
|
<key>Database Driver Class Name</key> |
|
<value>com.mysql.jdbc.Driver</value> |
|
</entry> |
|
<entry> |
|
<key>database-driver-locations</key> |
|
<value>/Users/koji/Downloads/mysql-connector-java-5.1.41/mysql-connector-java-5.1.41-bin.jar</value> |
|
</entry> |
|
<entry> |
|
<key>Database User</key> |
|
<value>root</value> |
|
</entry> |
|
<entry> |
|
<key>Password</key> |
|
</entry> |
|
<entry> |
|
<key>Max Wait Time</key> |
|
</entry> |
|
<entry> |
|
<key>Max Total Connections</key> |
|
</entry> |
|
<entry> |
|
<key>Validation-query</key> |
|
</entry> |
|
</properties> |
|
<state>ENABLED</state> |
|
<type>org.apache.nifi.dbcp.DBCPConnectionPool</type> |
|
</controllerServices> |
|
<controllerServices> |
|
<id>02a8d039-7d23-371b-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<bundle> |
|
<artifact>nifi-record-serialization-services-nar</artifact> |
|
<group>org.apache.nifi</group> |
|
<version>1.4.0-SNAPSHOT</version> |
|
</bundle> |
|
<comments></comments> |
|
<descriptors> |
|
<entry> |
|
<key>schema-access-strategy</key> |
|
<value> |
|
<name>schema-access-strategy</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>schema-registry</key> |
|
<value> |
|
<identifiesControllerService>org.apache.nifi.schemaregistry.services.SchemaRegistry</identifiesControllerService> |
|
<name>schema-registry</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>schema-name</key> |
|
<value> |
|
<name>schema-name</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>schema-text</key> |
|
<value> |
|
<name>schema-text</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Date Format</key> |
|
<value> |
|
<name>Date Format</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Time Format</key> |
|
<value> |
|
<name>Time Format</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Timestamp Format</key> |
|
<value> |
|
<name>Timestamp Format</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>CSV Format</key> |
|
<value> |
|
<name>CSV Format</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Value Separator</key> |
|
<value> |
|
<name>Value Separator</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Skip Header Line</key> |
|
<value> |
|
<name>Skip Header Line</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>ignore-csv-header</key> |
|
<value> |
|
<name>ignore-csv-header</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Quote Character</key> |
|
<value> |
|
<name>Quote Character</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Escape Character</key> |
|
<value> |
|
<name>Escape Character</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Comment Marker</key> |
|
<value> |
|
<name>Comment Marker</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Null String</key> |
|
<value> |
|
<name>Null String</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Trim Fields</key> |
|
<value> |
|
<name>Trim Fields</name> |
|
</value> |
|
</entry> |
|
</descriptors> |
|
<name>CSVReader</name> |
|
<persistsState>false</persistsState> |
|
<properties> |
|
<entry> |
|
<key>schema-access-strategy</key> |
|
<value>schema-text-property</value> |
|
</entry> |
|
<entry> |
|
<key>schema-registry</key> |
|
</entry> |
|
<entry> |
|
<key>schema-name</key> |
|
</entry> |
|
<entry> |
|
<key>schema-text</key> |
|
<value>{ |
|
"type": "record", |
|
"namespace": "com.example", |
|
"name": "City", |
|
"fields": [ |
|
{ "name": "ID", "type": "string" }, |
|
{ "name": "CITY_NAME", "type": "string" }, |
|
{ "name": "ZIP_CD", "type": "int" }, |
|
{ "name": "STATE_CD", "type": "string" } |
|
] |
|
}</value> |
|
</entry> |
|
<entry> |
|
<key>Date Format</key> |
|
</entry> |
|
<entry> |
|
<key>Time Format</key> |
|
</entry> |
|
<entry> |
|
<key>Timestamp Format</key> |
|
</entry> |
|
<entry> |
|
<key>CSV Format</key> |
|
</entry> |
|
<entry> |
|
<key>Value Separator</key> |
|
</entry> |
|
<entry> |
|
<key>Skip Header Line</key> |
|
<value>true</value> |
|
</entry> |
|
<entry> |
|
<key>ignore-csv-header</key> |
|
<value>true</value> |
|
</entry> |
|
<entry> |
|
<key>Quote Character</key> |
|
</entry> |
|
<entry> |
|
<key>Escape Character</key> |
|
</entry> |
|
<entry> |
|
<key>Comment Marker</key> |
|
</entry> |
|
<entry> |
|
<key>Null String</key> |
|
</entry> |
|
<entry> |
|
<key>Trim Fields</key> |
|
</entry> |
|
</properties> |
|
<state>ENABLED</state> |
|
<type>org.apache.nifi.csv.CSVReader</type> |
|
</controllerServices> |
|
<processors> |
|
<id>ce225866-ef86-3a36-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<position> |
|
<x>536.2390607198079</x> |
|
<y>173.88254214555786</y> |
|
</position> |
|
<bundle> |
|
<artifact>nifi-standard-nar</artifact> |
|
<group>org.apache.nifi</group> |
|
<version>1.4.0-SNAPSHOT</version> |
|
</bundle> |
|
<config> |
|
<bulletinLevel>WARN</bulletinLevel> |
|
<comments></comments> |
|
<concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount> |
|
<descriptors> |
|
<entry> |
|
<key>put-db-record-record-reader</key> |
|
<value> |
|
<identifiesControllerService>org.apache.nifi.serialization.RecordReaderFactory</identifiesControllerService> |
|
<name>put-db-record-record-reader</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-statement-type</key> |
|
<value> |
|
<name>put-db-record-statement-type</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-dcbp-service</key> |
|
<value> |
|
<identifiesControllerService>org.apache.nifi.dbcp.DBCPService</identifiesControllerService> |
|
<name>put-db-record-dcbp-service</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-catalog-name</key> |
|
<value> |
|
<name>put-db-record-catalog-name</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-schema-name</key> |
|
<value> |
|
<name>put-db-record-schema-name</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-table-name</key> |
|
<value> |
|
<name>put-db-record-table-name</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-translate-field-names</key> |
|
<value> |
|
<name>put-db-record-translate-field-names</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-unmatched-field-behavior</key> |
|
<value> |
|
<name>put-db-record-unmatched-field-behavior</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-unmatched-column-behavior</key> |
|
<value> |
|
<name>put-db-record-unmatched-column-behavior</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-update-keys</key> |
|
<value> |
|
<name>put-db-record-update-keys</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-field-containing-sql</key> |
|
<value> |
|
<name>put-db-record-field-containing-sql</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-quoted-identifiers</key> |
|
<value> |
|
<name>put-db-record-quoted-identifiers</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-quoted-table-identifiers</key> |
|
<value> |
|
<name>put-db-record-quoted-table-identifiers</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-query-timeout</key> |
|
<value> |
|
<name>put-db-record-query-timeout</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>rollback-on-failure</key> |
|
<value> |
|
<name>rollback-on-failure</name> |
|
</value> |
|
</entry> |
|
</descriptors> |
|
<executionNode>ALL</executionNode> |
|
<lossTolerant>false</lossTolerant> |
|
<penaltyDuration>30 sec</penaltyDuration> |
|
<properties> |
|
<entry> |
|
<key>put-db-record-record-reader</key> |
|
<value>02a8d039-7d23-371b-0000-000000000000</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-statement-type</key> |
|
<value>INSERT</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-dcbp-service</key> |
|
<value>dfd8da63-1639-3354-0000-000000000000</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-catalog-name</key> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-schema-name</key> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-table-name</key> |
|
<value>cities</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-translate-field-names</key> |
|
<value>true</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-unmatched-field-behavior</key> |
|
<value>Ignore Unmatched Fields</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-unmatched-column-behavior</key> |
|
<value>Fail on Unmatched Columns</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-update-keys</key> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-field-containing-sql</key> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-quoted-identifiers</key> |
|
<value>false</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-quoted-table-identifiers</key> |
|
<value>false</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-query-timeout</key> |
|
<value>0 seconds</value> |
|
</entry> |
|
<entry> |
|
<key>rollback-on-failure</key> |
|
<value>false</value> |
|
</entry> |
|
</properties> |
|
<runDurationMillis>0</runDurationMillis> |
|
<schedulingPeriod>0 sec</schedulingPeriod> |
|
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy> |
|
<yieldDuration>1 sec</yieldDuration> |
|
</config> |
|
<name>PutDatabaseRecord</name> |
|
<relationships> |
|
<autoTerminate>false</autoTerminate> |
|
<name>failure</name> |
|
</relationships> |
|
<relationships> |
|
<autoTerminate>true</autoTerminate> |
|
<name>retry</name> |
|
</relationships> |
|
<relationships> |
|
<autoTerminate>true</autoTerminate> |
|
<name>success</name> |
|
</relationships> |
|
<state>RUNNING</state> |
|
<style></style> |
|
<type>org.apache.nifi.processors.standard.PutDatabaseRecord</type> |
|
</processors> |
|
<processors> |
|
<id>e15c2e2b-2638-32ac-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<position> |
|
<x>360.0</x> |
|
<y>27.0</y> |
|
</position> |
|
<bundle> |
|
<artifact>nifi-standard-nar</artifact> |
|
<group>org.apache.nifi</group> |
|
<version>1.4.0-SNAPSHOT</version> |
|
</bundle> |
|
<config> |
|
<bulletinLevel>WARN</bulletinLevel> |
|
<comments></comments> |
|
<concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount> |
|
<descriptors> |
|
<entry> |
|
<key>File Size</key> |
|
<value> |
|
<name>File Size</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Batch Size</key> |
|
<value> |
|
<name>Batch Size</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Data Format</key> |
|
<value> |
|
<name>Data Format</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Unique FlowFiles</key> |
|
<value> |
|
<name>Unique FlowFiles</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>generate-ff-custom-text</key> |
|
<value> |
|
<name>generate-ff-custom-text</name> |
|
</value> |
|
</entry> |
|
</descriptors> |
|
<executionNode>ALL</executionNode> |
|
<lossTolerant>false</lossTolerant> |
|
<penaltyDuration>30 sec</penaltyDuration> |
|
<properties> |
|
<entry> |
|
<key>File Size</key> |
|
<value>0B</value> |
|
</entry> |
|
<entry> |
|
<key>Batch Size</key> |
|
<value>1</value> |
|
</entry> |
|
<entry> |
|
<key>Data Format</key> |
|
<value>Text</value> |
|
</entry> |
|
<entry> |
|
<key>Unique FlowFiles</key> |
|
<value>false</value> |
|
</entry> |
|
<entry> |
|
<key>generate-ff-custom-text</key> |
|
<value>ID,CITY_NAME,ZIP_CD,STATE_CD |
|
001,CITY_A,1111,AA |
|
002,CITY_B,2222,BB |
|
003,CITY_C,3333,CC |
|
004,CITY_D,4444,DD</value> |
|
</entry> |
|
</properties> |
|
<runDurationMillis>0</runDurationMillis> |
|
<schedulingPeriod>1d</schedulingPeriod> |
|
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy> |
|
<yieldDuration>1 sec</yieldDuration> |
|
</config> |
|
<name>GenerateFlowFile</name> |
|
<relationships> |
|
<autoTerminate>false</autoTerminate> |
|
<name>success</name> |
|
</relationships> |
|
<state>RUNNING</state> |
|
<style></style> |
|
<type>org.apache.nifi.processors.standard.GenerateFlowFile</type> |
|
</processors> |
|
<processors> |
|
<id>39fc92eb-59e0-3e02-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<position> |
|
<x>352.07363647460943</x> |
|
<y>420.44577392578117</y> |
|
</position> |
|
<bundle> |
|
<artifact>nifi-standard-nar</artifact> |
|
<group>org.apache.nifi</group> |
|
<version>1.4.0-SNAPSHOT</version> |
|
</bundle> |
|
<config> |
|
<bulletinLevel>WARN</bulletinLevel> |
|
<comments></comments> |
|
<concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount> |
|
<descriptors> |
|
<entry> |
|
<key>Log Level</key> |
|
<value> |
|
<name>Log Level</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Log Payload</key> |
|
<value> |
|
<name>Log Payload</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Attributes to Log</key> |
|
<value> |
|
<name>Attributes to Log</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>attributes-to-log-regex</key> |
|
<value> |
|
<name>attributes-to-log-regex</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Attributes to Ignore</key> |
|
<value> |
|
<name>Attributes to Ignore</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>attributes-to-ignore-regex</key> |
|
<value> |
|
<name>attributes-to-ignore-regex</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Log prefix</key> |
|
<value> |
|
<name>Log prefix</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>character-set</key> |
|
<value> |
|
<name>character-set</name> |
|
</value> |
|
</entry> |
|
</descriptors> |
|
<executionNode>ALL</executionNode> |
|
<lossTolerant>false</lossTolerant> |
|
<penaltyDuration>30 sec</penaltyDuration> |
|
<properties> |
|
<entry> |
|
<key>Log Level</key> |
|
<value>info</value> |
|
</entry> |
|
<entry> |
|
<key>Log Payload</key> |
|
<value>false</value> |
|
</entry> |
|
<entry> |
|
<key>Attributes to Log</key> |
|
</entry> |
|
<entry> |
|
<key>attributes-to-log-regex</key> |
|
<value>.*</value> |
|
</entry> |
|
<entry> |
|
<key>Attributes to Ignore</key> |
|
</entry> |
|
<entry> |
|
<key>attributes-to-ignore-regex</key> |
|
</entry> |
|
<entry> |
|
<key>Log prefix</key> |
|
</entry> |
|
<entry> |
|
<key>character-set</key> |
|
<value>UTF-8</value> |
|
</entry> |
|
</properties> |
|
<runDurationMillis>0</runDurationMillis> |
|
<schedulingPeriod>0 sec</schedulingPeriod> |
|
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy> |
|
<yieldDuration>1 sec</yieldDuration> |
|
</config> |
|
<name>LogAttribute</name> |
|
<relationships> |
|
<autoTerminate>false</autoTerminate> |
|
<name>success</name> |
|
</relationships> |
|
<state>STOPPED</state> |
|
<style></style> |
|
<type>org.apache.nifi.processors.standard.LogAttribute</type> |
|
</processors> |
|
</contents> |
|
<name>Load CSV to Table with Record</name> |
|
</processGroups> |
|
</snippet> |
|
<timestamp>09/27/2017 11:03:56 JST</timestamp> |
|
</template> |
|
<groupId>f81a2949-1728-32f5-0000-000000000000</groupId> |
|
<id>e15c2e2b-2638-32ac-0000-000000000000</id> |
|
<type>PROCESSOR</type> |
|
</source> |
|
<zIndex>0</zIndex> |
|
</connections> |
|
<controllerServices> |
|
<id>dfd8da63-1639-3354-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<bundle> |
|
<artifact>nifi-dbcp-service-nar</artifact> |
|
<group>org.apache.nifi</group> |
|
<version>1.4.0-SNAPSHOT</version> |
|
</bundle> |
|
<comments></comments> |
|
<descriptors> |
|
<entry> |
|
<key>Database Connection URL</key> |
|
<value> |
|
<name>Database Connection URL</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Database Driver Class Name</key> |
|
<value> |
|
<name>Database Driver Class Name</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>database-driver-locations</key> |
|
<value> |
|
<name>database-driver-locations</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Database User</key> |
|
<value> |
|
<name>Database User</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Password</key> |
|
<value> |
|
<name>Password</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Max Wait Time</key> |
|
<value> |
|
<name>Max Wait Time</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Max Total Connections</key> |
|
<value> |
|
<name>Max Total Connections</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Validation-query</key> |
|
<value> |
|
<name>Validation-query</name> |
|
</value> |
|
</entry> |
|
</descriptors> |
|
<name>DBCPConnectionPool</name> |
|
<persistsState>false</persistsState> |
|
<properties> |
|
<entry> |
|
<key>Database Connection URL</key> |
|
<value>jdbc:mysql://192.168.99.100:3306/nifi_test</value> |
|
</entry> |
|
<entry> |
|
<key>Database Driver Class Name</key> |
|
<value>com.mysql.jdbc.Driver</value> |
|
</entry> |
|
<entry> |
|
<key>database-driver-locations</key> |
|
<value>/Users/koji/Downloads/mysql-connector-java-5.1.41/mysql-connector-java-5.1.41-bin.jar</value> |
|
</entry> |
|
<entry> |
|
<key>Database User</key> |
|
<value>root</value> |
|
</entry> |
|
<entry> |
|
<key>Password</key> |
|
</entry> |
|
<entry> |
|
<key>Max Wait Time</key> |
|
</entry> |
|
<entry> |
|
<key>Max Total Connections</key> |
|
</entry> |
|
<entry> |
|
<key>Validation-query</key> |
|
</entry> |
|
</properties> |
|
<state>ENABLED</state> |
|
<type>org.apache.nifi.dbcp.DBCPConnectionPool</type> |
|
</controllerServices> |
|
<controllerServices> |
|
<id>02a8d039-7d23-371b-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<bundle> |
|
<artifact>nifi-record-serialization-services-nar</artifact> |
|
<group>org.apache.nifi</group> |
|
<version>1.4.0-SNAPSHOT</version> |
|
</bundle> |
|
<comments></comments> |
|
<descriptors> |
|
<entry> |
|
<key>schema-access-strategy</key> |
|
<value> |
|
<name>schema-access-strategy</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>schema-registry</key> |
|
<value> |
|
<identifiesControllerService>org.apache.nifi.schemaregistry.services.SchemaRegistry</identifiesControllerService> |
|
<name>schema-registry</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>schema-name</key> |
|
<value> |
|
<name>schema-name</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>schema-text</key> |
|
<value> |
|
<name>schema-text</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Date Format</key> |
|
<value> |
|
<name>Date Format</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Time Format</key> |
|
<value> |
|
<name>Time Format</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Timestamp Format</key> |
|
<value> |
|
<name>Timestamp Format</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>CSV Format</key> |
|
<value> |
|
<name>CSV Format</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Value Separator</key> |
|
<value> |
|
<name>Value Separator</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Skip Header Line</key> |
|
<value> |
|
<name>Skip Header Line</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>ignore-csv-header</key> |
|
<value> |
|
<name>ignore-csv-header</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Quote Character</key> |
|
<value> |
|
<name>Quote Character</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Escape Character</key> |
|
<value> |
|
<name>Escape Character</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Comment Marker</key> |
|
<value> |
|
<name>Comment Marker</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Null String</key> |
|
<value> |
|
<name>Null String</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Trim Fields</key> |
|
<value> |
|
<name>Trim Fields</name> |
|
</value> |
|
</entry> |
|
</descriptors> |
|
<name>CSVReader</name> |
|
<persistsState>false</persistsState> |
|
<properties> |
|
<entry> |
|
<key>schema-access-strategy</key> |
|
<value>schema-text-property</value> |
|
</entry> |
|
<entry> |
|
<key>schema-registry</key> |
|
</entry> |
|
<entry> |
|
<key>schema-name</key> |
|
</entry> |
|
<entry> |
|
<key>schema-text</key> |
|
<value>{ |
|
"type": "record", |
|
"namespace": "com.example", |
|
"name": "City", |
|
"fields": [ |
|
{ "name": "ID", "type": "string" }, |
|
{ "name": "CITY_NAME", "type": "string" }, |
|
{ "name": "ZIP_CD", "type": "int" }, |
|
{ "name": "STATE_CD", "type": "string" } |
|
] |
|
}</value> |
|
</entry> |
|
<entry> |
|
<key>Date Format</key> |
|
</entry> |
|
<entry> |
|
<key>Time Format</key> |
|
</entry> |
|
<entry> |
|
<key>Timestamp Format</key> |
|
</entry> |
|
<entry> |
|
<key>CSV Format</key> |
|
</entry> |
|
<entry> |
|
<key>Value Separator</key> |
|
</entry> |
|
<entry> |
|
<key>Skip Header Line</key> |
|
<value>true</value> |
|
</entry> |
|
<entry> |
|
<key>ignore-csv-header</key> |
|
<value>true</value> |
|
</entry> |
|
<entry> |
|
<key>Quote Character</key> |
|
</entry> |
|
<entry> |
|
<key>Escape Character</key> |
|
</entry> |
|
<entry> |
|
<key>Comment Marker</key> |
|
</entry> |
|
<entry> |
|
<key>Null String</key> |
|
</entry> |
|
<entry> |
|
<key>Trim Fields</key> |
|
</entry> |
|
</properties> |
|
<state>ENABLED</state> |
|
<type>org.apache.nifi.csv.CSVReader</type> |
|
</controllerServices> |
|
<processors> |
|
<id>ce225866-ef86-3a36-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<position> |
|
<x>536.2390607198079</x> |
|
<y>173.88254214555786</y> |
|
</position> |
|
<bundle> |
|
<artifact>nifi-standard-nar</artifact> |
|
<group>org.apache.nifi</group> |
|
<version>1.4.0-SNAPSHOT</version> |
|
</bundle> |
|
<config> |
|
<bulletinLevel>WARN</bulletinLevel> |
|
<comments></comments> |
|
<concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount> |
|
<descriptors> |
|
<entry> |
|
<key>put-db-record-record-reader</key> |
|
<value> |
|
<identifiesControllerService>org.apache.nifi.serialization.RecordReaderFactory</identifiesControllerService> |
|
<name>put-db-record-record-reader</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-statement-type</key> |
|
<value> |
|
<name>put-db-record-statement-type</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-dcbp-service</key> |
|
<value> |
|
<identifiesControllerService>org.apache.nifi.dbcp.DBCPService</identifiesControllerService> |
|
<name>put-db-record-dcbp-service</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-catalog-name</key> |
|
<value> |
|
<name>put-db-record-catalog-name</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-schema-name</key> |
|
<value> |
|
<name>put-db-record-schema-name</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-table-name</key> |
|
<value> |
|
<name>put-db-record-table-name</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-translate-field-names</key> |
|
<value> |
|
<name>put-db-record-translate-field-names</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-unmatched-field-behavior</key> |
|
<value> |
|
<name>put-db-record-unmatched-field-behavior</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-unmatched-column-behavior</key> |
|
<value> |
|
<name>put-db-record-unmatched-column-behavior</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-update-keys</key> |
|
<value> |
|
<name>put-db-record-update-keys</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-field-containing-sql</key> |
|
<value> |
|
<name>put-db-record-field-containing-sql</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-quoted-identifiers</key> |
|
<value> |
|
<name>put-db-record-quoted-identifiers</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-quoted-table-identifiers</key> |
|
<value> |
|
<name>put-db-record-quoted-table-identifiers</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-query-timeout</key> |
|
<value> |
|
<name>put-db-record-query-timeout</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>rollback-on-failure</key> |
|
<value> |
|
<name>rollback-on-failure</name> |
|
</value> |
|
</entry> |
|
</descriptors> |
|
<executionNode>ALL</executionNode> |
|
<lossTolerant>false</lossTolerant> |
|
<penaltyDuration>30 sec</penaltyDuration> |
|
<properties> |
|
<entry> |
|
<key>put-db-record-record-reader</key> |
|
<value>02a8d039-7d23-371b-0000-000000000000</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-statement-type</key> |
|
<value>INSERT</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-dcbp-service</key> |
|
<value>dfd8da63-1639-3354-0000-000000000000</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-catalog-name</key> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-schema-name</key> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-table-name</key> |
|
<value>cities</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-translate-field-names</key> |
|
<value>true</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-unmatched-field-behavior</key> |
|
<value>Ignore Unmatched Fields</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-unmatched-column-behavior</key> |
|
<value>Fail on Unmatched Columns</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-update-keys</key> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-field-containing-sql</key> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-quoted-identifiers</key> |
|
<value>false</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-quoted-table-identifiers</key> |
|
<value>false</value> |
|
</entry> |
|
<entry> |
|
<key>put-db-record-query-timeout</key> |
|
<value>0 seconds</value> |
|
</entry> |
|
<entry> |
|
<key>rollback-on-failure</key> |
|
<value>false</value> |
|
</entry> |
|
</properties> |
|
<runDurationMillis>0</runDurationMillis> |
|
<schedulingPeriod>0 sec</schedulingPeriod> |
|
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy> |
|
<yieldDuration>1 sec</yieldDuration> |
|
</config> |
|
<name>PutDatabaseRecord</name> |
|
<relationships> |
|
<autoTerminate>false</autoTerminate> |
|
<name>failure</name> |
|
</relationships> |
|
<relationships> |
|
<autoTerminate>true</autoTerminate> |
|
<name>retry</name> |
|
</relationships> |
|
<relationships> |
|
<autoTerminate>true</autoTerminate> |
|
<name>success</name> |
|
</relationships> |
|
<state>RUNNING</state> |
|
<style></style> |
|
<type>org.apache.nifi.processors.standard.PutDatabaseRecord</type> |
|
</processors> |
|
<processors> |
|
<id>e15c2e2b-2638-32ac-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<position> |
|
<x>360.0</x> |
|
<y>27.0</y> |
|
</position> |
|
<bundle> |
|
<artifact>nifi-standard-nar</artifact> |
|
<group>org.apache.nifi</group> |
|
<version>1.4.0-SNAPSHOT</version> |
|
</bundle> |
|
<config> |
|
<bulletinLevel>WARN</bulletinLevel> |
|
<comments></comments> |
|
<concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount> |
|
<descriptors> |
|
<entry> |
|
<key>File Size</key> |
|
<value> |
|
<name>File Size</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Batch Size</key> |
|
<value> |
|
<name>Batch Size</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Data Format</key> |
|
<value> |
|
<name>Data Format</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Unique FlowFiles</key> |
|
<value> |
|
<name>Unique FlowFiles</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>generate-ff-custom-text</key> |
|
<value> |
|
<name>generate-ff-custom-text</name> |
|
</value> |
|
</entry> |
|
</descriptors> |
|
<executionNode>ALL</executionNode> |
|
<lossTolerant>false</lossTolerant> |
|
<penaltyDuration>30 sec</penaltyDuration> |
|
<properties> |
|
<entry> |
|
<key>File Size</key> |
|
<value>0B</value> |
|
</entry> |
|
<entry> |
|
<key>Batch Size</key> |
|
<value>1</value> |
|
</entry> |
|
<entry> |
|
<key>Data Format</key> |
|
<value>Text</value> |
|
</entry> |
|
<entry> |
|
<key>Unique FlowFiles</key> |
|
<value>false</value> |
|
</entry> |
|
<entry> |
|
<key>generate-ff-custom-text</key> |
|
<value>ID,CITY_NAME,ZIP_CD,STATE_CD |
|
001,CITY_A,1111,AA |
|
002,CITY_B,2222,BB |
|
003,CITY_C,3333,CC |
|
004,CITY_D,4444,DD</value> |
|
</entry> |
|
</properties> |
|
<runDurationMillis>0</runDurationMillis> |
|
<schedulingPeriod>1d</schedulingPeriod> |
|
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy> |
|
<yieldDuration>1 sec</yieldDuration> |
|
</config> |
|
<name>GenerateFlowFile</name> |
|
<relationships> |
|
<autoTerminate>false</autoTerminate> |
|
<name>success</name> |
|
</relationships> |
|
<state>RUNNING</state> |
|
<style></style> |
|
<type>org.apache.nifi.processors.standard.GenerateFlowFile</type> |
|
</processors> |
|
<processors> |
|
<id>39fc92eb-59e0-3e02-0000-000000000000</id> |
|
<parentGroupId>f81a2949-1728-32f5-0000-000000000000</parentGroupId> |
|
<position> |
|
<x>352.07363647460943</x> |
|
<y>420.44577392578117</y> |
|
</position> |
|
<bundle> |
|
<artifact>nifi-standard-nar</artifact> |
|
<group>org.apache.nifi</group> |
|
<version>1.4.0-SNAPSHOT</version> |
|
</bundle> |
|
<config> |
|
<bulletinLevel>WARN</bulletinLevel> |
|
<comments></comments> |
|
<concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount> |
|
<descriptors> |
|
<entry> |
|
<key>Log Level</key> |
|
<value> |
|
<name>Log Level</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Log Payload</key> |
|
<value> |
|
<name>Log Payload</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Attributes to Log</key> |
|
<value> |
|
<name>Attributes to Log</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>attributes-to-log-regex</key> |
|
<value> |
|
<name>attributes-to-log-regex</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Attributes to Ignore</key> |
|
<value> |
|
<name>Attributes to Ignore</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>attributes-to-ignore-regex</key> |
|
<value> |
|
<name>attributes-to-ignore-regex</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>Log prefix</key> |
|
<value> |
|
<name>Log prefix</name> |
|
</value> |
|
</entry> |
|
<entry> |
|
<key>character-set</key> |
|
<value> |
|
<name>character-set</name> |
|
</value> |
|
</entry> |
|
</descriptors> |
|
<executionNode>ALL</executionNode> |
|
<lossTolerant>false</lossTolerant> |
|
<penaltyDuration>30 sec</penaltyDuration> |
|
<properties> |
|
<entry> |
|
<key>Log Level</key> |
|
<value>info</value> |
|
</entry> |
|
<entry> |
|
<key>Log Payload</key> |
|
<value>false</value> |
|
</entry> |
|
<entry> |
|
<key>Attributes to Log</key> |
|
</entry> |
|
<entry> |
|
<key>attributes-to-log-regex</key> |
|
<value>.*</value> |
|
</entry> |
|
<entry> |
|
<key>Attributes to Ignore</key> |
|
</entry> |
|
<entry> |
|
<key>attributes-to-ignore-regex</key> |
|
</entry> |
|
<entry> |
|
<key>Log prefix</key> |
|
</entry> |
|
<entry> |
|
<key>character-set</key> |
|
<value>UTF-8</value> |
|
</entry> |
|
</properties> |
|
<runDurationMillis>0</runDurationMillis> |
|
<schedulingPeriod>0 sec</schedulingPeriod> |
|
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy> |
|
<yieldDuration>1 sec</yieldDuration> |
|
</config> |
|
<name>LogAttribute</name> |
|
<relationships> |
|
<autoTerminate>false</autoTerminate> |
|
<name>success</name> |
|
</relationships> |
|
<state>STOPPED</state> |
|
<style></style> |
|
<type>org.apache.nifi.processors.standard.LogAttribute</type> |
|
</processors> |
|
</contents> |
|
<name>Load CSV to Table with Record</name> |
|
</processGroups> |
|
</snippet> |
|
<timestamp>09/27/2017 11:03:56 JST</timestamp> |
|
</template> |
How to do for inserting a particular content of json file to mysql table using Nifi? Im getting error as none of the field maps to column specified in table. Anyone tell me the processors i need to use.