<?xml version="1.0" ?>
<template encoding-version="1.1">
  <description></description>
  <groupId>07b2cb23-015d-1000-9ca0-7941d88e968b</groupId>
  <name>SQLFromJSON</name>
  <snippet>
    <processGroups>
      <id>b8c29602-7a64-305f-0000-000000000000</id>
      <parentGroupId>c0033eee-a190-37dc-0000-000000000000</parentGroupId>
      <position>
        <x>0.0</x>
        <y>0.0</y>
      </position>
      <comments></comments>
      <contents>
        <connections>
          <id>b2183133-1415-3774-0000-000000000000</id>
          <parentGroupId>b8c29602-7a64-305f-0000-000000000000</parentGroupId>
          <backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
          <backPressureObjectThreshold>10000</backPressureObjectThreshold>
          <bends>
            <x>1357.47314453125</x>
            <y>661.2102661132812</y>
          </bends>
          <destination>
            <groupId>b8c29602-7a64-305f-0000-000000000000</groupId>
            <id>d692df41-7226-3f49-0000-000000000000</id>
            <type>PROCESSOR</type>
          </destination>
          <flowFileExpiration>0 sec</flowFileExpiration>
          <labelIndex>0</labelIndex>
          <name></name>
          <selectedRelationships>failure</selectedRelationships>
          <selectedRelationships>unmatched</selectedRelationships>
          <source>
            <groupId>b8c29602-7a64-305f-0000-000000000000</groupId>
            <id>5d221f8b-bdfb-3b30-0000-000000000000</id>
            <type>PROCESSOR</type>
          </source>
          <zIndex>0</zIndex>
        </connections>
        <connections>
          <id>d044074d-3116-3adb-0000-000000000000</id>
          <parentGroupId>b8c29602-7a64-305f-0000-000000000000</parentGroupId>
          <backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
          <backPressureObjectThreshold>10000</backPressureObjectThreshold>
          <destination>
            <groupId>b8c29602-7a64-305f-0000-000000000000</groupId>
            <id>5d221f8b-bdfb-3b30-0000-000000000000</id>
            <type>PROCESSOR</type>
          </destination>
          <flowFileExpiration>0 sec</flowFileExpiration>
          <labelIndex>1</labelIndex>
          <name></name>
          <selectedRelationships>split</selectedRelationships>
          <source>
            <groupId>b8c29602-7a64-305f-0000-000000000000</groupId>
            <id>d426ea1c-0444-3c6a-0000-000000000000</id>
            <type>PROCESSOR</type>
          </source>
          <zIndex>0</zIndex>
        </connections>
        <connections>
          <id>04ffb73c-a0df-37c0-0000-000000000000</id>
          <parentGroupId>b8c29602-7a64-305f-0000-000000000000</parentGroupId>
          <backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
          <backPressureObjectThreshold>10000</backPressureObjectThreshold>
          <bends>
            <x>978.6563110351562</x>
            <y>377.4419860839844</y>
          </bends>
          <destination>
            <groupId>b8c29602-7a64-305f-0000-000000000000</groupId>
            <id>d426ea1c-0444-3c6a-0000-000000000000</id>
            <type>PROCESSOR</type>
          </destination>
          <flowFileExpiration>0 sec</flowFileExpiration>
          <labelIndex>0</labelIndex>
          <name></name>
          <selectedRelationships>success</selectedRelationships>
          <source>
            <groupId>b8c29602-7a64-305f-0000-000000000000</groupId>
            <id>266a29a1-8ee2-387f-0000-000000000000</id>
            <type>PROCESSOR</type>
          </source>
          <zIndex>0</zIndex>
        </connections>
        <connections>
          <id>2a799b10-0875-3eeb-0000-000000000000</id>
          <parentGroupId>b8c29602-7a64-305f-0000-000000000000</parentGroupId>
          <backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
          <backPressureObjectThreshold>10000</backPressureObjectThreshold>
          <destination>
            <groupId>b8c29602-7a64-305f-0000-000000000000</groupId>
            <id>15a45395-7d28-3a69-0000-000000000000</id>
            <type>PROCESSOR</type>
          </destination>
          <flowFileExpiration>0 sec</flowFileExpiration>
          <labelIndex>1</labelIndex>
          <name></name>
          <selectedRelationships>matched</selectedRelationships>
          <source>
            <groupId>b8c29602-7a64-305f-0000-000000000000</groupId>
            <id>5d221f8b-bdfb-3b30-0000-000000000000</id>
            <type>PROCESSOR</type>
          </source>
          <zIndex>0</zIndex>
        </connections>
        <labels>
          <id>c7e95f89-fece-34c8-0000-000000000000</id>
          <parentGroupId>b8c29602-7a64-305f-0000-000000000000</parentGroupId>
          <position>
            <x>244.8497452887368</x>
            <y>471.5224891485574</y>
          </position>
          <height>35.406002044677734</height>
          <label>Perform a query using DeviceID and other attributes.</label>
          <style>
            <entry>
              <key>font-size</key>
              <value>12px</value>
            </entry>
          </style>
          <width>363.2547607421875</width>
        </labels>
        <labels>
          <id>d7c1333a-4160-3d07-0000-000000000000</id>
          <parentGroupId>b8c29602-7a64-305f-0000-000000000000</parentGroupId>
          <position>
            <x>423.92683269108056</x>
            <y>267.65014417785426</y>
          </position>
          <height>36.98822021484375</height>
          <label>In order to process each device one by one.</label>
          <style>
            <entry>
              <key>font-size</key>
              <value>12px</value>
            </entry>
          </style>
          <width>251.8807373046875</width>
        </labels>
        <labels>
          <id>073f62f2-683f-31fa-0000-000000000000</id>
          <parentGroupId>b8c29602-7a64-305f-0000-000000000000</parentGroupId>
          <position>
            <x>799.5792374762368</x>
            <y>157.03944166320582</y>
          </position>
          <height>41.32547378540039</height>
          <label>Assuming Devices are passed as JSON representation.</label>
          <style>
            <entry>
              <key>font-size</key>
              <value>12px</value>
            </entry>
          </style>
          <width>373.30682373046875</width>
        </labels>
        <labels>
          <id>430e93cf-9174-3ef1-0000-000000000000</id>
          <parentGroupId>b8c29602-7a64-305f-0000-000000000000</parentGroupId>
          <position>
            <x>951.3106827887368</x>
            <y>469.94027479308863</y>
          </position>
          <height>35.61069869995117</height>
          <label>Extract DeviceID and other values from JSON to attributes.</label>
          <style>
            <entry>
              <key>font-size</key>
              <value>12px</value>
            </entry>
          </style>
          <width>356.5719299316406</width>
        </labels>
        <processors>
          <id>d426ea1c-0444-3c6a-0000-000000000000</id>
          <parentGroupId>b8c29602-7a64-305f-0000-000000000000</parentGroupId>
          <position>
            <x>438.956298828125</x>
            <y>312.6190490722656</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>JsonPath Expression</key>
                <value>
                  <name>JsonPath Expression</name>
                </value>
              </entry>
              <entry>
                <key>Null Value Representation</key>
                <value>
                  <name>Null Value Representation</name>
                </value>
              </entry>
            </descriptors>
            <executionNode>ALL</executionNode>
            <lossTolerant>false</lossTolerant>
            <penaltyDuration>30 sec</penaltyDuration>
            <properties>
              <entry>
                <key>JsonPath Expression</key>
                <value>$</value>
              </entry>
              <entry>
                <key>Null Value Representation</key>
                <value>empty string</value>
              </entry>
            </properties>
            <runDurationMillis>0</runDurationMillis>
            <schedulingPeriod>0 sec</schedulingPeriod>
            <schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
            <yieldDuration>1 sec</yieldDuration>
          </config>
          <name>SplitJson</name>
          <relationships>
            <autoTerminate>true</autoTerminate>
            <name>failure</name>
          </relationships>
          <relationships>
            <autoTerminate>true</autoTerminate>
            <name>original</name>
          </relationships>
          <relationships>
            <autoTerminate>false</autoTerminate>
            <name>split</name>
          </relationships>
          <style></style>
          <type>org.apache.nifi.processors.standard.SplitJson</type>
        </processors>
        <processors>
          <id>d692df41-7226-3f49-0000-000000000000</id>
          <parentGroupId>b8c29602-7a64-305f-0000-000000000000</parentGroupId>
          <position>
            <x>887.7401575342961</x>
            <y>665.3428203082949</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 Ignore</key>
                <value>
                  <name>Attributes to Ignore</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 Ignore</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>
          <style></style>
          <type>org.apache.nifi.processors.standard.LogAttribute</type>
        </processors>
        <processors>
          <id>15a45395-7d28-3a69-0000-000000000000</id>
          <parentGroupId>b8c29602-7a64-305f-0000-000000000000</parentGroupId>
          <position>
            <x>253.57388305664062</x>
            <y>517.2214050292969</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>Database Connection Pooling Service</key>
                <value>
                  <identifiesControllerService>org.apache.nifi.dbcp.DBCPService</identifiesControllerService>
                  <name>Database Connection Pooling Service</name>
                </value>
              </entry>
              <entry>
                <key>SQL select query</key>
                <value>
                  <name>SQL select query</name>
                </value>
              </entry>
              <entry>
                <key>Max Wait Time</key>
                <value>
                  <name>Max Wait Time</name>
                </value>
              </entry>
              <entry>
                <key>dbf-normalize</key>
                <value>
                  <name>dbf-normalize</name>
                </value>
              </entry>
              <entry>
                <key>dbf-user-logical-types</key>
                <value>
                  <name>dbf-user-logical-types</name>
                </value>
              </entry>
              <entry>
                <key>dbf-default-precision</key>
                <value>
                  <name>dbf-default-precision</name>
                </value>
              </entry>
              <entry>
                <key>dbf-default-scale</key>
                <value>
                  <name>dbf-default-scale</name>
                </value>
              </entry>
            </descriptors>
            <executionNode>ALL</executionNode>
            <lossTolerant>false</lossTolerant>
            <penaltyDuration>30 sec</penaltyDuration>
            <properties>
              <entry>
                <key>Database Connection Pooling Service</key>
              </entry>
              <entry>
                <key>SQL select query</key>
                <value>select '${ID}' as ID from Device
where DeviceID = ${DeviceID}</value>
              </entry>
              <entry>
                <key>Max Wait Time</key>
                <value>0 seconds</value>
              </entry>
              <entry>
                <key>dbf-normalize</key>
                <value>false</value>
              </entry>
              <entry>
                <key>dbf-user-logical-types</key>
                <value>false</value>
              </entry>
              <entry>
                <key>dbf-default-precision</key>
                <value>10</value>
              </entry>
              <entry>
                <key>dbf-default-scale</key>
                <value>0</value>
              </entry>
            </properties>
            <runDurationMillis>0</runDurationMillis>
            <schedulingPeriod>0 sec</schedulingPeriod>
            <schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
            <yieldDuration>1 sec</yieldDuration>
          </config>
          <name>ExecuteSQL</name>
          <relationships>
            <autoTerminate>false</autoTerminate>
            <name>failure</name>
          </relationships>
          <relationships>
            <autoTerminate>false</autoTerminate>
            <name>success</name>
          </relationships>
          <style></style>
          <type>org.apache.nifi.processors.standard.ExecuteSQL</type>
        </processors>
        <processors>
          <id>266a29a1-8ee2-387f-0000-000000000000</id>
          <parentGroupId>b8c29602-7a64-305f-0000-000000000000</parentGroupId>
          <position>
            <x>808.110595703125</x>
            <y>211.0854377746582</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" : 14733307,
  "DeviceID" : "40d71f9776cbdca1a39b6f8c5493219f16ce5e8ac77a537f3936d5b81c367320",
  "LogDate" : "2017-07-03 12:27:26.327",
  "Latitude" : -29.98709106445312,
  "Longitude" : -51.1904296875
} ]</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>
          <style></style>
          <type>org.apache.nifi.processors.standard.GenerateFlowFile</type>
        </processors>
        <processors>
          <id>5d221f8b-bdfb-3b30-0000-000000000000</id>
          <parentGroupId>b8c29602-7a64-305f-0000-000000000000</parentGroupId>
          <position>
            <x>886.3625845125343</x>
            <y>520.7035739498886</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>Destination</key>
                <value>
                  <name>Destination</name>
                </value>
              </entry>
              <entry>
                <key>Return Type</key>
                <value>
                  <name>Return Type</name>
                </value>
              </entry>
              <entry>
                <key>Path Not Found Behavior</key>
                <value>
                  <name>Path Not Found Behavior</name>
                </value>
              </entry>
              <entry>
                <key>Null Value Representation</key>
                <value>
                  <name>Null Value Representation</name>
                </value>
              </entry>
              <entry>
                <key>DeviceID</key>
                <value>
                  <name>DeviceID</name>
                </value>
              </entry>
              <entry>
                <key>ID</key>
                <value>
                  <name>ID</name>
                </value>
              </entry>
              <entry>
                <key>Latitude</key>
                <value>
                  <name>Latitude</name>
                </value>
              </entry>
              <entry>
                <key>LogDate</key>
                <value>
                  <name>LogDate</name>
                </value>
              </entry>
              <entry>
                <key>Longitude</key>
                <value>
                  <name>Longitude</name>
                </value>
              </entry>
            </descriptors>
            <executionNode>ALL</executionNode>
            <lossTolerant>false</lossTolerant>
            <penaltyDuration>30 sec</penaltyDuration>
            <properties>
              <entry>
                <key>Destination</key>
                <value>flowfile-attribute</value>
              </entry>
              <entry>
                <key>Return Type</key>
                <value>auto-detect</value>
              </entry>
              <entry>
                <key>Path Not Found Behavior</key>
                <value>ignore</value>
              </entry>
              <entry>
                <key>Null Value Representation</key>
                <value>empty string</value>
              </entry>
              <entry>
                <key>DeviceID</key>
                <value>$.DeviceID</value>
              </entry>
              <entry>
                <key>ID</key>
                <value>$.ID</value>
              </entry>
              <entry>
                <key>Latitude</key>
                <value>$.Latitude</value>
              </entry>
              <entry>
                <key>LogDate</key>
                <value>$.LogDate</value>
              </entry>
              <entry>
                <key>Longitude</key>
                <value>$.Longitude</value>
              </entry>
            </properties>
            <runDurationMillis>0</runDurationMillis>
            <schedulingPeriod>0 sec</schedulingPeriod>
            <schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
            <yieldDuration>1 sec</yieldDuration>
          </config>
          <name>EvaluateJsonPath</name>
          <relationships>
            <autoTerminate>false</autoTerminate>
            <name>failure</name>
          </relationships>
          <relationships>
            <autoTerminate>false</autoTerminate>
            <name>matched</name>
          </relationships>
          <relationships>
            <autoTerminate>false</autoTerminate>
            <name>unmatched</name>
          </relationships>
          <style></style>
          <type>org.apache.nifi.processors.standard.EvaluateJsonPath</type>
        </processors>
      </contents>
      <name>SQLFromJSON</name>
    </processGroups>
  </snippet>
  <timestamp>07/04/2017 09:14:04 JST</timestamp>
</template>