This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"flowContents": { | |
"identifier": "f7ec47e6-9057-30b0-abb7-0b38eb709ef6", | |
"instanceIdentifier": "a4c2cb58-0182-1000-565f-6ad654e140b8", | |
"name": "DataFlowFunctionsQuickstart", | |
"comments": "", | |
"position": { | |
"x": 536.0, | |
"y": 768.0 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"subscriptionId": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
# This script is used to automatically sync new flows into the DataFlow Catalog | |
# It assumes that the CDP CLI has been installed first. See: | |
# https://docs.cloudera.com/dataflow/cloud/cli/index.html | |
# It also assumes that the NiFi CLI has been properly configured to interact with the NiFi Registry instance. See: | |
# https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html#nifi_CLI | |
NIFICLI="/opt/cloudera/parcels/CFM/TOOLKIT/bin/cli.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.security.SignatureException | |
import javax.crypto.Mac | |
import javax.crypto.spec.SecretKeySpec | |
def flowFile = session.get() | |
if (!flowFile) return | |
def static hmac(String data, String key) throws java.security.SignatureException | |
{ | |
String result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<template encoding-version="1.3"> | |
<description></description> | |
<groupId>2e083aef-0162-1000-80bc-8c6bbfc00ca8</groupId> | |
<name>FTP-UTF8-Test</name> | |
<snippet> | |
<processGroups> | |
<id>3982c999-cd5f-3ac7-0000-000000000000</id> | |
<parentGroupId>16e377d4-8369-3464-0000-000000000000</parentGroupId> | |
<position> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testNoMatchingRecords() throws InitializationException { | |
TestRunner runner = getRunner(); | |
final JsonTreeReader jsonReader = new JsonTreeReader(); | |
runner.addControllerService("reader", jsonReader); | |
runner.setProperty(jsonReader, SchemaAccessUtils.SCHEMA_ACCESS_STRATEGY, SchemaInferenceUtil.INFER_SCHEMA); | |
final JsonRecordSetWriter jsonWriter = new JsonRecordSetWriter(); | |
runner.addControllerService("writer", jsonWriter); |