From fc6f95665ae68c2025dd4579c6b6725d7d84a790 Mon Sep 17 00:00:00 2001 From: Rasmus Luha Date: Sun, 6 Apr 2025 16:46:36 +0300 Subject: nifi json value extraction --- README.md | 10 +- common/core.py | 61 +- config.py | 4 + modules/nifi/clean.json | 1272 --------------------------------- modules/nifi/core.py | 35 +- modules/nifi/templates/basic_ETL.json | 1272 +++++++++++++++++++++++++++++++++ 6 files changed, 1364 insertions(+), 1290 deletions(-) delete mode 100644 modules/nifi/clean.json create mode 100644 modules/nifi/templates/basic_ETL.json diff --git a/README.md b/README.md index 9706bd0..74cbb2a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,2 @@ -TODOs - -API urli kontrollimine - - lihtsalt kontrollimine - - autentimine - - -https://api.open-meteo.com/v1/forecast?latitude=58.38&longitude=26.72¤t_weather=true +Ekstrakti jsonist väljad, anna numbrilistina ette - dict + user valib numbri --> ehitad protsessori. diff --git a/common/core.py b/common/core.py index 44248be..5841d41 100644 --- a/common/core.py +++ b/common/core.py @@ -10,6 +10,24 @@ def ask_binary_input(prompt="Kas jah või ei?: ", valikud=["jah","ei"]): return answer print(f"Ebakorretne sisend.Palun vasta kas '{valikud[0]}' või '{valikud[1]}'") + +def ask_digit_input(max_index): + while True: + user_input = input(f"Vali number (0 - {max_index}): ").strip() + + if not user_input.isdigit(): + print("Palun vali korrektne numer.") + continue # algusesse + + index = int(user_input) + + if 0 <= index <= max_index: + return int(index) + else: + print(f" Number ei kuulu valikusse. Palun vali number vahemikus 0-{max_index}.") + + + def is_app_url_correct(api_url, needs_auth, username,passwd): print("Teostan API kutset...\n") try: @@ -20,21 +38,48 @@ def is_app_url_correct(api_url, needs_auth, username,passwd): response.raise_for_status() ## Check if staus code is 2xx data = response.json() - print(json.dumps(data, indent=2)) - return True +# print(json.dumps(data, indent=2)) + return data, True except requests.exceptions.RequestException as e: print(f"HTTP error: {e}") - return False + return None, False except ValueError: print("andmeallikas ei tagasta vallidset JSON kuju...") - return False + return None, False except Exception as e: print(f"API kutsel tekkis viga: {e}") - return False + return None, False + + +## Func todo - add list level support with porcessors etc +def inspect_json_top_level(json_data): + while True: + print(json.dumps(json_data, indent=2)) + print("\nVali json võti millest soovid väärtuse andmekonveieriga ekstrakteerida\n") + keys = list(json_data.keys()) -##TODO -def add_api_authentication(): - print("Adding api authentication ... (TODO)") + for index, key in enumerate(keys): + value = json_data[key] + value_type = type(value).__name__ ## Mis type json itemgiga tegu + if isinstance(value, list): + suggestion = "SplitJson" + else: + suggestion = "EvaluateJsonPath" + print(f" [{index}] {key} ({value_type})") + selected_index = ask_digit_input(len(list(json_data.keys())) - 1) + selected_key = keys[selected_index] + selected_value = json_data[selected_key] + + # Wrap into new json object + #extracted = {selected_key: selected_value} + + if isinstance(selected_value, dict) or isinstance(selected_value,list): + json_data = selected_value + continue + else: + print(f"\nValitud võti: '{selected_key}':") + #print(json.dumps(selected_value, indent=2)) + return selected_key diff --git a/config.py b/config.py index e69de29..1274541 100644 --- a/config.py +++ b/config.py @@ -0,0 +1,4 @@ +## TODO +DB=influxdb +DB_USER= +DB_PASS= diff --git a/modules/nifi/clean.json b/modules/nifi/clean.json deleted file mode 100644 index 457c783..0000000 --- a/modules/nifi/clean.json +++ /dev/null @@ -1,1272 +0,0 @@ -{ - "flowContents": { - "identifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "instanceIdentifier": "5bb8e7b5-0194-1000-5e19-bee2ad8d9a6e", - "name": "testingName", - "comments": "", - "position": { - "x": -536.0, - "y": -328.0 - }, - "processGroups": [], - "remoteProcessGroups": [], - "processors": [ - { - "identifier": "d7963d52-e8a3-3b27-9543-20db6cc99f6f", - "instanceIdentifier": "9f1ceb8b-f048-3b47-5aec-773690811078", - "name": "ReplaceText", - "comments": "", - "position": { - "x": -208.0, - "y": -968.0 - }, - "type": "org.apache.nifi.processors.standard.ReplaceText", - "bundle": { - "group": "org.apache.nifi", - "artifact": "nifi-standard-nar", - "version": "2.1.0" - }, - "properties": { - "Regular Expression": "(?s)(^.*$)", - "Replacement Value": "energy,building=\"Delta\" kilowattHours=${energy_value}", - "Evaluation Mode": "Entire text", - "Text to Prepend": null, - "Line-by-Line Evaluation Mode": "All", - "Character Set": "UTF-8", - "Maximum Buffer Size": "1 MB", - "Replacement Strategy": "Regex Replace", - "Text to Append": null - }, - "propertyDescriptors": { - "Regular Expression": { - "name": "Regular Expression", - "displayName": "Search Value", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Replacement Value": { - "name": "Replacement Value", - "displayName": "Replacement Value", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Evaluation Mode": { - "name": "Evaluation Mode", - "displayName": "Evaluation Mode", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Text to Prepend": { - "name": "Text to Prepend", - "displayName": "Text to Prepend", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Line-by-Line Evaluation Mode": { - "name": "Line-by-Line Evaluation Mode", - "displayName": "Line-by-Line Evaluation Mode", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Character Set": { - "name": "Character Set", - "displayName": "Character Set", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Maximum Buffer Size": { - "name": "Maximum Buffer Size", - "displayName": "Maximum Buffer Size", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Replacement Strategy": { - "name": "Replacement Strategy", - "displayName": "Replacement Strategy", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Text to Append": { - "name": "Text to Append", - "displayName": "Text to Append", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - } - }, - "style": {}, - "schedulingPeriod": "0 sec", - "schedulingStrategy": "TIMER_DRIVEN", - "executionNode": "ALL", - "penaltyDuration": "30 sec", - "yieldDuration": "1 sec", - "bulletinLevel": "WARN", - "runDurationMillis": 25, - "concurrentlySchedulableTaskCount": 1, - "autoTerminatedRelationships": [], - "scheduledState": "ENABLED", - "retryCount": 10, - "retriedRelationships": [], - "backoffMechanism": "PENALIZE_FLOWFILE", - "maxBackoffPeriod": "10 mins", - "componentType": "PROCESSOR", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - }, - { - "identifier": "ba013c53-d8f2-3718-b7dd-d935e8b1413f", - "instanceIdentifier": "44bbe9ed-51fa-3d2b-2bff-e04fc0673ebd", - "name": "InvokeHTTP", - "comments": "", - "position": { - "x": -1416.0, - "y": -752.0 - }, - "type": "org.apache.nifi.processors.standard.InvokeHTTP", - "bundle": { - "group": "org.apache.nifi", - "artifact": "nifi-standard-nar", - "version": "2.1.0" - }, - "properties": { - "Request Content-Encoding": "DISABLED", - "proxy-configuration-service": null, - "Request Multipart Form-Data Filename Enabled": "true", - "Request Chunked Transfer-Encoding Enabled": "false", - "Response Header Request Attributes Prefix": null, - "HTTP/2 Disabled": "False", - "Connection Timeout": "5 secs", - "Response Cookie Strategy": "DISABLED", - "Socket Read Timeout": "15 secs", - "Socket Idle Connections": "5", - "Request Body Enabled": "true", - "HTTP URL": "https://delta.iot.cs.ut.ee/measurement/measurements?source=780&dateFrom=${now():toNumber():minus(86400000):format(\"yyyy-MM-dd\")}T00:00:00Z&dateTo=${now():toNumber():minus(86400000):format(\"yyyy-MM-dd\")}T23:59:59Z&pageSize=200&type=KogEN", - "Request OAuth2 Access Token Provider": null, - "Socket Idle Timeout": "5 mins", - "Response Redirects Enabled": "True", - "Socket Write Timeout": "15 secs", - "Request Header Attributes Pattern": null, - "Response FlowFile Naming Strategy": "RANDOM", - "Response Cache Enabled": "false", - "Request Date Header Enabled": "True", - "Request Failure Penalization Enabled": "false", - "Response Body Attribute Size": "256", - "SSL Context Service": null, - "Response Generation Required": "false", - "Request User-Agent": null, - "Response Header Request Attributes Enabled": "false", - "HTTP Method": "GET", - "Request Username": "rasmus.luha", - "Request Content-Type": "${mime.type}", - "Response Body Attribute Name": null, - "Request Digest Authentication Enabled": "false", - "Request Multipart Form-Data Name": null, - "Response Cache Size": "10MB", - "Response Body Ignored": "false", - "Replacement Value": "energy,building=\"Delta\" kilowattHours=${energy_value}" - }, - "propertyDescriptors": { - "Request Content-Encoding": { - "name": "Request Content-Encoding", - "displayName": "Request Content-Encoding", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "proxy-configuration-service": { - "name": "proxy-configuration-service", - "displayName": "Proxy Configuration Service", - "identifiesControllerService": true, - "sensitive": false, - "dynamic": false - }, - "Request Multipart Form-Data Filename Enabled": { - "name": "Request Multipart Form-Data Filename Enabled", - "displayName": "Request Multipart Form-Data Filename Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Chunked Transfer-Encoding Enabled": { - "name": "Request Chunked Transfer-Encoding Enabled", - "displayName": "Request Chunked Transfer-Encoding Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Header Request Attributes Prefix": { - "name": "Response Header Request Attributes Prefix", - "displayName": "Response Header Request Attributes Prefix", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "HTTP/2 Disabled": { - "name": "HTTP/2 Disabled", - "displayName": "HTTP/2 Disabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Connection Timeout": { - "name": "Connection Timeout", - "displayName": "Connection Timeout", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Cookie Strategy": { - "name": "Response Cookie Strategy", - "displayName": "Response Cookie Strategy", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Password": { - "name": "Request Password", - "displayName": "Request Password", - "identifiesControllerService": false, - "sensitive": true, - "dynamic": false - }, - "Socket Read Timeout": { - "name": "Socket Read Timeout", - "displayName": "Socket Read Timeout", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Socket Idle Connections": { - "name": "Socket Idle Connections", - "displayName": "Socket Idle Connections", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Body Enabled": { - "name": "Request Body Enabled", - "displayName": "Request Body Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "HTTP URL": { - "name": "HTTP URL", - "displayName": "HTTP URL", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request OAuth2 Access Token Provider": { - "name": "Request OAuth2 Access Token Provider", - "displayName": "Request OAuth2 Access Token Provider", - "identifiesControllerService": true, - "sensitive": false, - "dynamic": false - }, - "Socket Idle Timeout": { - "name": "Socket Idle Timeout", - "displayName": "Socket Idle Timeout", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Redirects Enabled": { - "name": "Response Redirects Enabled", - "displayName": "Response Redirects Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Socket Write Timeout": { - "name": "Socket Write Timeout", - "displayName": "Socket Write Timeout", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Header Attributes Pattern": { - "name": "Request Header Attributes Pattern", - "displayName": "Request Header Attributes Pattern", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response FlowFile Naming Strategy": { - "name": "Response FlowFile Naming Strategy", - "displayName": "Response FlowFile Naming Strategy", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Cache Enabled": { - "name": "Response Cache Enabled", - "displayName": "Response Cache Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Date Header Enabled": { - "name": "Request Date Header Enabled", - "displayName": "Request Date Header Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Failure Penalization Enabled": { - "name": "Request Failure Penalization Enabled", - "displayName": "Request Failure Penalization Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Body Attribute Size": { - "name": "Response Body Attribute Size", - "displayName": "Response Body Attribute Size", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "SSL Context Service": { - "name": "SSL Context Service", - "displayName": "SSL Context Service", - "identifiesControllerService": true, - "sensitive": false, - "dynamic": false - }, - "Response Generation Required": { - "name": "Response Generation Required", - "displayName": "Response Generation Required", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request User-Agent": { - "name": "Request User-Agent", - "displayName": "Request User-Agent", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Header Request Attributes Enabled": { - "name": "Response Header Request Attributes Enabled", - "displayName": "Response Header Request Attributes Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "HTTP Method": { - "name": "HTTP Method", - "displayName": "HTTP Method", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Username": { - "name": "Request Username", - "displayName": "Request Username", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Content-Type": { - "name": "Request Content-Type", - "displayName": "Request Content-Type", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Body Attribute Name": { - "name": "Response Body Attribute Name", - "displayName": "Response Body Attribute Name", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Digest Authentication Enabled": { - "name": "Request Digest Authentication Enabled", - "displayName": "Request Digest Authentication Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Multipart Form-Data Name": { - "name": "Request Multipart Form-Data Name", - "displayName": "Request Multipart Form-Data Name", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Cache Size": { - "name": "Response Cache Size", - "displayName": "Response Cache Size", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Body Ignored": { - "name": "Response Body Ignored", - "displayName": "Response Body Ignored", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - } - }, - "style": {}, - "schedulingPeriod": "86400 sec", - "schedulingStrategy": "TIMER_DRIVEN", - "executionNode": "ALL", - "penaltyDuration": "30 sec", - "yieldDuration": "1 sec", - "bulletinLevel": "WARN", - "runDurationMillis": 0, - "concurrentlySchedulableTaskCount": 1, - "autoTerminatedRelationships": [ - "Original" - ], - "scheduledState": "ENABLED", - "retryCount": 10, - "retriedRelationships": [], - "backoffMechanism": "PENALIZE_FLOWFILE", - "maxBackoffPeriod": "10 mins", - "componentType": "PROCESSOR", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - }, - { - "identifier": "fb9a5b80-aa9a-3e1b-86f5-c17db5783812", - "instanceIdentifier": "0bd7b16d-0195-1000-32ad-5b4055f37b22", - "name": "SplitJson", - "comments": "", - "position": { - "x": -1184.0, - "y": -440.0 - }, - "type": "org.apache.nifi.processors.standard.SplitJson", - "bundle": { - "group": "org.apache.nifi", - "artifact": "nifi-standard-nar", - "version": "2.1.0" - }, - "properties": { - "Max String Length": "20 MB", - "Null Value Representation": "empty string", - "JsonPath Expression": "$.measurements[*]" - }, - "propertyDescriptors": { - "Max String Length": { - "name": "Max String Length", - "displayName": "Max String Length", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Null Value Representation": { - "name": "Null Value Representation", - "displayName": "Null Value Representation", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "JsonPath Expression": { - "name": "JsonPath Expression", - "displayName": "JsonPath Expression", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - } - }, - "style": {}, - "schedulingPeriod": "0 sec", - "schedulingStrategy": "TIMER_DRIVEN", - "executionNode": "ALL", - "penaltyDuration": "30 sec", - "yieldDuration": "1 sec", - "bulletinLevel": "WARN", - "runDurationMillis": 0, - "concurrentlySchedulableTaskCount": 1, - "autoTerminatedRelationships": [], - "scheduledState": "ENABLED", - "retryCount": 10, - "retriedRelationships": [], - "backoffMechanism": "PENALIZE_FLOWFILE", - "maxBackoffPeriod": "10 mins", - "componentType": "PROCESSOR", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - }, - { - "identifier": "b00e49a7-d25a-3d5a-8705-ef4c5e2919e7", - "instanceIdentifier": "6802228d-1680-3d01-dcb3-83febf10560d", - "name": "EvaluateJsonPath", - "comments": "", - "position": { - "x": -648.0, - "y": -608.0 - }, - "type": "org.apache.nifi.processors.standard.EvaluateJsonPath", - "bundle": { - "group": "org.apache.nifi", - "artifact": "nifi-standard-nar", - "version": "2.1.0" - }, - "properties": { - "Destination": "flowfile-attribute", - "Max String Length": "20 MB", - "Return Type": "auto-detect", - "energy_value": "$.KogEN.T.value", - "Null Value Representation": "empty string", - "Path Not Found Behavior": "ignore" - }, - "propertyDescriptors": { - "Destination": { - "name": "Destination", - "displayName": "Destination", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Max String Length": { - "name": "Max String Length", - "displayName": "Max String Length", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Return Type": { - "name": "Return Type", - "displayName": "Return Type", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "energy_value": { - "name": "energy_value", - "displayName": "energy_value", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": true - }, - "Null Value Representation": { - "name": "Null Value Representation", - "displayName": "Null Value Representation", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Path Not Found Behavior": { - "name": "Path Not Found Behavior", - "displayName": "Path Not Found Behavior", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - } - }, - "style": {}, - "schedulingPeriod": "0 sec", - "schedulingStrategy": "TIMER_DRIVEN", - "executionNode": "ALL", - "penaltyDuration": "30 sec", - "yieldDuration": "1 sec", - "bulletinLevel": "WARN", - "runDurationMillis": 0, - "concurrentlySchedulableTaskCount": 1, - "autoTerminatedRelationships": [], - "scheduledState": "ENABLED", - "retryCount": 10, - "retriedRelationships": [], - "backoffMechanism": "PENALIZE_FLOWFILE", - "maxBackoffPeriod": "10 mins", - "componentType": "PROCESSOR", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - }, - { - "identifier": "5834e54d-4509-3fb8-b672-fb1f450ef408", - "instanceIdentifier": "87c23d87-fa77-32d7-4a2b-d425cddba4c7", - "name": "InvokeHTTP", - "comments": "", - "position": { - "x": -128.0, - "y": -624.0 - }, - "type": "org.apache.nifi.processors.standard.InvokeHTTP", - "bundle": { - "group": "org.apache.nifi", - "artifact": "nifi-standard-nar", - "version": "2.1.0" - }, - "properties": { - "Request Content-Encoding": "DISABLED", - "proxy-configuration-service": null, - "Request Multipart Form-Data Filename Enabled": "true", - "Request Chunked Transfer-Encoding Enabled": "false", - "Response Header Request Attributes Prefix": null, - "HTTP/2 Disabled": "False", - "Connection Timeout": "5 secs", - "Response Cookie Strategy": "DISABLED", - "Socket Read Timeout": "15 secs", - "Socket Idle Connections": "5", - "Request Body Enabled": "true", - "HTTP URL": "http://influxdb:8086/write?db=nifi_deltaEnergy", - "Request OAuth2 Access Token Provider": null, - "Socket Idle Timeout": "5 mins", - "Response Redirects Enabled": "True", - "Socket Write Timeout": "15 secs", - "Request Header Attributes Pattern": null, - "Response FlowFile Naming Strategy": "RANDOM", - "Response Cache Enabled": "false", - "Request Date Header Enabled": "True", - "Request Failure Penalization Enabled": "false", - "Response Body Attribute Size": "256", - "SSL Context Service": null, - "Response Generation Required": "false", - "Request User-Agent": null, - "Response Header Request Attributes Enabled": "false", - "HTTP Method": "POST", - "Request Username": "admin", - "Request Content-Type": "${mime.type}", - "Response Body Attribute Name": null, - "Request Digest Authentication Enabled": "false", - "Request Multipart Form-Data Name": null, - "Response Cache Size": "10MB", - "Response Body Ignored": "false" - }, - "propertyDescriptors": { - "Request Content-Encoding": { - "name": "Request Content-Encoding", - "displayName": "Request Content-Encoding", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "proxy-configuration-service": { - "name": "proxy-configuration-service", - "displayName": "Proxy Configuration Service", - "identifiesControllerService": true, - "sensitive": false, - "dynamic": false - }, - "Request Multipart Form-Data Filename Enabled": { - "name": "Request Multipart Form-Data Filename Enabled", - "displayName": "Request Multipart Form-Data Filename Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Chunked Transfer-Encoding Enabled": { - "name": "Request Chunked Transfer-Encoding Enabled", - "displayName": "Request Chunked Transfer-Encoding Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Header Request Attributes Prefix": { - "name": "Response Header Request Attributes Prefix", - "displayName": "Response Header Request Attributes Prefix", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "HTTP/2 Disabled": { - "name": "HTTP/2 Disabled", - "displayName": "HTTP/2 Disabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Connection Timeout": { - "name": "Connection Timeout", - "displayName": "Connection Timeout", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Cookie Strategy": { - "name": "Response Cookie Strategy", - "displayName": "Response Cookie Strategy", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Password": { - "name": "Request Password", - "displayName": "Request Password", - "identifiesControllerService": false, - "sensitive": true, - "dynamic": false - }, - "Socket Read Timeout": { - "name": "Socket Read Timeout", - "displayName": "Socket Read Timeout", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Socket Idle Connections": { - "name": "Socket Idle Connections", - "displayName": "Socket Idle Connections", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Body Enabled": { - "name": "Request Body Enabled", - "displayName": "Request Body Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "HTTP URL": { - "name": "HTTP URL", - "displayName": "HTTP URL", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request OAuth2 Access Token Provider": { - "name": "Request OAuth2 Access Token Provider", - "displayName": "Request OAuth2 Access Token Provider", - "identifiesControllerService": true, - "sensitive": false, - "dynamic": false - }, - "Socket Idle Timeout": { - "name": "Socket Idle Timeout", - "displayName": "Socket Idle Timeout", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Redirects Enabled": { - "name": "Response Redirects Enabled", - "displayName": "Response Redirects Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Socket Write Timeout": { - "name": "Socket Write Timeout", - "displayName": "Socket Write Timeout", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Header Attributes Pattern": { - "name": "Request Header Attributes Pattern", - "displayName": "Request Header Attributes Pattern", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response FlowFile Naming Strategy": { - "name": "Response FlowFile Naming Strategy", - "displayName": "Response FlowFile Naming Strategy", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Cache Enabled": { - "name": "Response Cache Enabled", - "displayName": "Response Cache Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Date Header Enabled": { - "name": "Request Date Header Enabled", - "displayName": "Request Date Header Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Failure Penalization Enabled": { - "name": "Request Failure Penalization Enabled", - "displayName": "Request Failure Penalization Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Body Attribute Size": { - "name": "Response Body Attribute Size", - "displayName": "Response Body Attribute Size", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "SSL Context Service": { - "name": "SSL Context Service", - "displayName": "SSL Context Service", - "identifiesControllerService": true, - "sensitive": false, - "dynamic": false - }, - "Response Generation Required": { - "name": "Response Generation Required", - "displayName": "Response Generation Required", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request User-Agent": { - "name": "Request User-Agent", - "displayName": "Request User-Agent", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Header Request Attributes Enabled": { - "name": "Response Header Request Attributes Enabled", - "displayName": "Response Header Request Attributes Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "HTTP Method": { - "name": "HTTP Method", - "displayName": "HTTP Method", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Username": { - "name": "Request Username", - "displayName": "Request Username", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Content-Type": { - "name": "Request Content-Type", - "displayName": "Request Content-Type", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Body Attribute Name": { - "name": "Response Body Attribute Name", - "displayName": "Response Body Attribute Name", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Digest Authentication Enabled": { - "name": "Request Digest Authentication Enabled", - "displayName": "Request Digest Authentication Enabled", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Request Multipart Form-Data Name": { - "name": "Request Multipart Form-Data Name", - "displayName": "Request Multipart Form-Data Name", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Cache Size": { - "name": "Response Cache Size", - "displayName": "Response Cache Size", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - }, - "Response Body Ignored": { - "name": "Response Body Ignored", - "displayName": "Response Body Ignored", - "identifiesControllerService": false, - "sensitive": false, - "dynamic": false - } - }, - "style": {}, - "schedulingPeriod": "0 sec", - "schedulingStrategy": "TIMER_DRIVEN", - "executionNode": "ALL", - "penaltyDuration": "30 sec", - "yieldDuration": "1 sec", - "bulletinLevel": "WARN", - "runDurationMillis": 0, - "concurrentlySchedulableTaskCount": 1, - "autoTerminatedRelationships": [], - "scheduledState": "ENABLED", - "retryCount": 10, - "retriedRelationships": [], - "backoffMechanism": "PENALIZE_FLOWFILE", - "maxBackoffPeriod": "10 mins", - "componentType": "PROCESSOR", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - } - ], - "inputPorts": [], - "outputPorts": [ - { - "identifier": "eaff6f84-649b-3677-9935-911028a86f0e", - "instanceIdentifier": "c033503f-2cfe-354d-548c-7710831a646d", - "name": "errors", - "position": { - "x": -760.0, - "y": -1016.0 - }, - "type": "OUTPUT_PORT", - "concurrentlySchedulableTaskCount": 1, - "scheduledState": "ENABLED", - "allowRemoteAccess": false, - "portFunction": "STANDARD", - "componentType": "OUTPUT_PORT", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - } - ], - "connections": [ - { - "identifier": "da4a1ac4-ab2b-3bef-889f-3a3783f8fff2", - "instanceIdentifier": "a70fb3b4-0bc5-3986-a9a8-b35cbe2749e2", - "name": "", - "source": { - "id": "d7963d52-e8a3-3b27-9543-20db6cc99f6f", - "type": "PROCESSOR", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "ReplaceText", - "comments": "", - "instanceIdentifier": "9f1ceb8b-f048-3b47-5aec-773690811078" - }, - "destination": { - "id": "5834e54d-4509-3fb8-b672-fb1f450ef408", - "type": "PROCESSOR", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "InvokeHTTP", - "comments": "", - "instanceIdentifier": "87c23d87-fa77-32d7-4a2b-d425cddba4c7" - }, - "labelIndex": 0, - "zIndex": 0, - "selectedRelationships": [ - "success" - ], - "backPressureObjectThreshold": 10000, - "backPressureDataSizeThreshold": "1 GB", - "flowFileExpiration": "0 sec", - "prioritizers": [], - "bends": [], - "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", - "partitioningAttribute": "", - "loadBalanceCompression": "DO_NOT_COMPRESS", - "componentType": "CONNECTION", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - }, - { - "identifier": "8da480cb-332d-3518-a678-554a976ab177", - "instanceIdentifier": "ed8acac9-2ac0-3494-9787-d6889ca9d2ae", - "name": "", - "source": { - "id": "d7963d52-e8a3-3b27-9543-20db6cc99f6f", - "type": "PROCESSOR", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "ReplaceText", - "comments": "", - "instanceIdentifier": "9f1ceb8b-f048-3b47-5aec-773690811078" - }, - "destination": { - "id": "eaff6f84-649b-3677-9935-911028a86f0e", - "type": "OUTPUT_PORT", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "errors", - "instanceIdentifier": "c033503f-2cfe-354d-548c-7710831a646d" - }, - "labelIndex": 0, - "zIndex": 0, - "selectedRelationships": [ - "failure" - ], - "backPressureObjectThreshold": 10000, - "backPressureDataSizeThreshold": "1 GB", - "flowFileExpiration": "0 sec", - "prioritizers": [], - "bends": [], - "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", - "partitioningAttribute": "", - "loadBalanceCompression": "DO_NOT_COMPRESS", - "componentType": "CONNECTION", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - }, - { - "identifier": "2e2a9588-6e83-3fad-9e25-a7e4411f7cbb", - "instanceIdentifier": "0bd8e0f0-0195-1000-b5fa-59bff2ea7c05", - "name": "", - "source": { - "id": "fb9a5b80-aa9a-3e1b-86f5-c17db5783812", - "type": "PROCESSOR", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "SplitJson", - "comments": "", - "instanceIdentifier": "0bd7b16d-0195-1000-32ad-5b4055f37b22" - }, - "destination": { - "id": "b00e49a7-d25a-3d5a-8705-ef4c5e2919e7", - "type": "PROCESSOR", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "EvaluateJsonPath", - "comments": "", - "instanceIdentifier": "6802228d-1680-3d01-dcb3-83febf10560d" - }, - "labelIndex": 0, - "zIndex": 0, - "selectedRelationships": [ - "split" - ], - "backPressureObjectThreshold": 10000, - "backPressureDataSizeThreshold": "1 GB", - "flowFileExpiration": "0 sec", - "prioritizers": [], - "bends": [], - "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", - "partitioningAttribute": "", - "loadBalanceCompression": "DO_NOT_COMPRESS", - "componentType": "CONNECTION", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - }, - { - "identifier": "f21c16db-0f95-31a0-9bcc-fc2034a8e5ad", - "instanceIdentifier": "0bd93b2d-0195-1000-1cf6-b09aec356f70", - "name": "", - "source": { - "id": "fb9a5b80-aa9a-3e1b-86f5-c17db5783812", - "type": "PROCESSOR", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "SplitJson", - "comments": "", - "instanceIdentifier": "0bd7b16d-0195-1000-32ad-5b4055f37b22" - }, - "destination": { - "id": "eaff6f84-649b-3677-9935-911028a86f0e", - "type": "OUTPUT_PORT", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "errors", - "instanceIdentifier": "c033503f-2cfe-354d-548c-7710831a646d" - }, - "labelIndex": 0, - "zIndex": 0, - "selectedRelationships": [ - "original", - "failure" - ], - "backPressureObjectThreshold": 10000, - "backPressureDataSizeThreshold": "1 GB", - "flowFileExpiration": "0 sec", - "prioritizers": [], - "bends": [], - "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", - "partitioningAttribute": "", - "loadBalanceCompression": "DO_NOT_COMPRESS", - "componentType": "CONNECTION", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - }, - { - "identifier": "b84a7c01-3942-3334-b543-6cf24a13e313", - "instanceIdentifier": "1bf7d1f1-d115-30a3-2584-4ecc72df55ee", - "name": "", - "source": { - "id": "b00e49a7-d25a-3d5a-8705-ef4c5e2919e7", - "type": "PROCESSOR", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "EvaluateJsonPath", - "comments": "", - "instanceIdentifier": "6802228d-1680-3d01-dcb3-83febf10560d" - }, - "destination": { - "id": "eaff6f84-649b-3677-9935-911028a86f0e", - "type": "OUTPUT_PORT", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "errors", - "instanceIdentifier": "c033503f-2cfe-354d-548c-7710831a646d" - }, - "labelIndex": 0, - "zIndex": 0, - "selectedRelationships": [ - "failure", - "unmatched" - ], - "backPressureObjectThreshold": 10000, - "backPressureDataSizeThreshold": "1 GB", - "flowFileExpiration": "0 sec", - "prioritizers": [], - "bends": [], - "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", - "partitioningAttribute": "", - "loadBalanceCompression": "DO_NOT_COMPRESS", - "componentType": "CONNECTION", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - }, - { - "identifier": "4146e7c5-2050-380e-9d1d-7794ce01b73d", - "instanceIdentifier": "58e1b5f6-2931-3f24-b849-6eaec7239b65", - "name": "", - "source": { - "id": "ba013c53-d8f2-3718-b7dd-d935e8b1413f", - "type": "PROCESSOR", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "InvokeHTTP", - "comments": "", - "instanceIdentifier": "44bbe9ed-51fa-3d2b-2bff-e04fc0673ebd" - }, - "destination": { - "id": "eaff6f84-649b-3677-9935-911028a86f0e", - "type": "OUTPUT_PORT", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "errors", - "instanceIdentifier": "c033503f-2cfe-354d-548c-7710831a646d" - }, - "labelIndex": 0, - "zIndex": 0, - "selectedRelationships": [ - "No Retry", - "Retry", - "Failure" - ], - "backPressureObjectThreshold": 10000, - "backPressureDataSizeThreshold": "1 GB", - "flowFileExpiration": "0 sec", - "prioritizers": [], - "bends": [], - "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", - "partitioningAttribute": "", - "loadBalanceCompression": "DO_NOT_COMPRESS", - "componentType": "CONNECTION", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - }, - { - "identifier": "17634682-cdb7-38bf-b259-343647a490a1", - "instanceIdentifier": "c5525bf4-5a39-331f-e451-36c7d7751286", - "name": "", - "source": { - "id": "5834e54d-4509-3fb8-b672-fb1f450ef408", - "type": "PROCESSOR", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "InvokeHTTP", - "comments": "", - "instanceIdentifier": "87c23d87-fa77-32d7-4a2b-d425cddba4c7" - }, - "destination": { - "id": "eaff6f84-649b-3677-9935-911028a86f0e", - "type": "OUTPUT_PORT", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "errors", - "instanceIdentifier": "c033503f-2cfe-354d-548c-7710831a646d" - }, - "labelIndex": 0, - "zIndex": 0, - "selectedRelationships": [ - "Response", - "No Retry", - "Retry", - "Original", - "Failure" - ], - "backPressureObjectThreshold": 10000, - "backPressureDataSizeThreshold": "1 GB", - "flowFileExpiration": "0 sec", - "prioritizers": [], - "bends": [], - "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", - "partitioningAttribute": "", - "loadBalanceCompression": "DO_NOT_COMPRESS", - "componentType": "CONNECTION", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - }, - { - "identifier": "bae53cad-4e26-36b7-a45b-60257d6a6ea7", - "instanceIdentifier": "9f06da23-1cf0-3bb1-b2c8-f3bf0f8d1308", - "name": "", - "source": { - "id": "b00e49a7-d25a-3d5a-8705-ef4c5e2919e7", - "type": "PROCESSOR", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "EvaluateJsonPath", - "comments": "", - "instanceIdentifier": "6802228d-1680-3d01-dcb3-83febf10560d" - }, - "destination": { - "id": "d7963d52-e8a3-3b27-9543-20db6cc99f6f", - "type": "PROCESSOR", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "ReplaceText", - "comments": "", - "instanceIdentifier": "9f1ceb8b-f048-3b47-5aec-773690811078" - }, - "labelIndex": 0, - "zIndex": 0, - "selectedRelationships": [ - "matched" - ], - "backPressureObjectThreshold": 10000, - "backPressureDataSizeThreshold": "1 GB", - "flowFileExpiration": "0 sec", - "prioritizers": [], - "bends": [], - "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", - "partitioningAttribute": "", - "loadBalanceCompression": "DO_NOT_COMPRESS", - "componentType": "CONNECTION", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - }, - { - "identifier": "e529f57e-174b-3adc-86ac-326b10703eef", - "instanceIdentifier": "0bd8a1cd-0195-1000-f564-5b19695e6b39", - "name": "", - "source": { - "id": "ba013c53-d8f2-3718-b7dd-d935e8b1413f", - "type": "PROCESSOR", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "InvokeHTTP", - "comments": "", - "instanceIdentifier": "44bbe9ed-51fa-3d2b-2bff-e04fc0673ebd" - }, - "destination": { - "id": "fb9a5b80-aa9a-3e1b-86f5-c17db5783812", - "type": "PROCESSOR", - "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", - "name": "SplitJson", - "comments": "", - "instanceIdentifier": "0bd7b16d-0195-1000-32ad-5b4055f37b22" - }, - "labelIndex": 0, - "zIndex": 0, - "selectedRelationships": [ - "Response" - ], - "backPressureObjectThreshold": 10000, - "backPressureDataSizeThreshold": "1 GB", - "flowFileExpiration": "0 sec", - "prioritizers": [], - "bends": [], - "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", - "partitioningAttribute": "", - "loadBalanceCompression": "DO_NOT_COMPRESS", - "componentType": "CONNECTION", - "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" - } - ], - "labels": [], - "funnels": [], - "controllerServices": [], - "defaultFlowFileExpiration": "0 sec", - "defaultBackPressureObjectThreshold": 10000, - "defaultBackPressureDataSizeThreshold": "1 GB", - "scheduledState": "ENABLED", - "executionEngine": "INHERITED", - "maxConcurrentTasks": 1, - "statelessFlowTimeout": "1 min", - "flowFileConcurrency": "UNBOUNDED", - "flowFileOutboundPolicy": "STREAM_WHEN_AVAILABLE", - "componentType": "PROCESS_GROUP" - }, - "externalControllerServices": {}, - "parameterContexts": {}, - "flowEncodingVersion": "1.0", - "parameterProviders": {}, - "latest": false -} diff --git a/modules/nifi/core.py b/modules/nifi/core.py index bdac035..6e2f2e7 100644 --- a/modules/nifi/core.py +++ b/modules/nifi/core.py @@ -3,6 +3,7 @@ from rich.console import Console from common import core as common import sys +import json def introduction(): @@ -11,7 +12,27 @@ def introduction(): console.print(ascii_art, style="cyan") print("Valisid Nifi Platformi!\n") + +## TODO +def set_processor_property(pipeline, processor_name, property_key, property_value): + for processor in pipeline['flowContents']['processors']: + if processor['name'] == processor_name: + processor['properties'][property_key] = property_value + print(f"Updated '{property_key}' in processor '{processor_name}'") + return + print(f"Processor '{processor_name}' not found.") + + + + + + + def build_pipeline(): + + chosen_json_values = [] + + ##Getting API url and json values while True: api_url = input("Palun sisesta andmete API URL: ").strip() username = "placeholder" @@ -22,8 +43,18 @@ def build_pipeline(): username=input("Sisesta kasutajanimi: ") passwd=input("Sisesta parool: ") - if common.is_app_url_correct(api_url,needs_auth,username,passwd): - break # Exit loop if URL is correct + json_data, api_url_correct = common.is_app_url_correct(api_url,needs_auth,username,passwd) + + ## TODO itemite eemaldamise v6malus + if api_url_correct: + while True: + chosen_json_values.append(common.inspect_json_top_level(json_data)) + print("Oled hetkel valinud järgmised väärtused:", chosen_json_values) + choose_another = common.ask_binary_input(prompt="\nKas soovid (v)alida veel mõne väärtuse või liikuda (e)dasi?(v/e): ",valikud=["v","e"]).strip().lower() + + if choose_another == 'e': + return chosen_json_values + else: choice = common.ask_binary_input(prompt="\nKas soovid URL-i (m)uuta URL-i või (v)äljuda?(m/v): ",valikud=["m","v"]).strip().lower() if choice == 'v': diff --git a/modules/nifi/templates/basic_ETL.json b/modules/nifi/templates/basic_ETL.json new file mode 100644 index 0000000..457c783 --- /dev/null +++ b/modules/nifi/templates/basic_ETL.json @@ -0,0 +1,1272 @@ +{ + "flowContents": { + "identifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "instanceIdentifier": "5bb8e7b5-0194-1000-5e19-bee2ad8d9a6e", + "name": "testingName", + "comments": "", + "position": { + "x": -536.0, + "y": -328.0 + }, + "processGroups": [], + "remoteProcessGroups": [], + "processors": [ + { + "identifier": "d7963d52-e8a3-3b27-9543-20db6cc99f6f", + "instanceIdentifier": "9f1ceb8b-f048-3b47-5aec-773690811078", + "name": "ReplaceText", + "comments": "", + "position": { + "x": -208.0, + "y": -968.0 + }, + "type": "org.apache.nifi.processors.standard.ReplaceText", + "bundle": { + "group": "org.apache.nifi", + "artifact": "nifi-standard-nar", + "version": "2.1.0" + }, + "properties": { + "Regular Expression": "(?s)(^.*$)", + "Replacement Value": "energy,building=\"Delta\" kilowattHours=${energy_value}", + "Evaluation Mode": "Entire text", + "Text to Prepend": null, + "Line-by-Line Evaluation Mode": "All", + "Character Set": "UTF-8", + "Maximum Buffer Size": "1 MB", + "Replacement Strategy": "Regex Replace", + "Text to Append": null + }, + "propertyDescriptors": { + "Regular Expression": { + "name": "Regular Expression", + "displayName": "Search Value", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Replacement Value": { + "name": "Replacement Value", + "displayName": "Replacement Value", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Evaluation Mode": { + "name": "Evaluation Mode", + "displayName": "Evaluation Mode", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Text to Prepend": { + "name": "Text to Prepend", + "displayName": "Text to Prepend", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Line-by-Line Evaluation Mode": { + "name": "Line-by-Line Evaluation Mode", + "displayName": "Line-by-Line Evaluation Mode", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Character Set": { + "name": "Character Set", + "displayName": "Character Set", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Maximum Buffer Size": { + "name": "Maximum Buffer Size", + "displayName": "Maximum Buffer Size", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Replacement Strategy": { + "name": "Replacement Strategy", + "displayName": "Replacement Strategy", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Text to Append": { + "name": "Text to Append", + "displayName": "Text to Append", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + } + }, + "style": {}, + "schedulingPeriod": "0 sec", + "schedulingStrategy": "TIMER_DRIVEN", + "executionNode": "ALL", + "penaltyDuration": "30 sec", + "yieldDuration": "1 sec", + "bulletinLevel": "WARN", + "runDurationMillis": 25, + "concurrentlySchedulableTaskCount": 1, + "autoTerminatedRelationships": [], + "scheduledState": "ENABLED", + "retryCount": 10, + "retriedRelationships": [], + "backoffMechanism": "PENALIZE_FLOWFILE", + "maxBackoffPeriod": "10 mins", + "componentType": "PROCESSOR", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + }, + { + "identifier": "ba013c53-d8f2-3718-b7dd-d935e8b1413f", + "instanceIdentifier": "44bbe9ed-51fa-3d2b-2bff-e04fc0673ebd", + "name": "InvokeHTTP", + "comments": "", + "position": { + "x": -1416.0, + "y": -752.0 + }, + "type": "org.apache.nifi.processors.standard.InvokeHTTP", + "bundle": { + "group": "org.apache.nifi", + "artifact": "nifi-standard-nar", + "version": "2.1.0" + }, + "properties": { + "Request Content-Encoding": "DISABLED", + "proxy-configuration-service": null, + "Request Multipart Form-Data Filename Enabled": "true", + "Request Chunked Transfer-Encoding Enabled": "false", + "Response Header Request Attributes Prefix": null, + "HTTP/2 Disabled": "False", + "Connection Timeout": "5 secs", + "Response Cookie Strategy": "DISABLED", + "Socket Read Timeout": "15 secs", + "Socket Idle Connections": "5", + "Request Body Enabled": "true", + "HTTP URL": "https://delta.iot.cs.ut.ee/measurement/measurements?source=780&dateFrom=${now():toNumber():minus(86400000):format(\"yyyy-MM-dd\")}T00:00:00Z&dateTo=${now():toNumber():minus(86400000):format(\"yyyy-MM-dd\")}T23:59:59Z&pageSize=200&type=KogEN", + "Request OAuth2 Access Token Provider": null, + "Socket Idle Timeout": "5 mins", + "Response Redirects Enabled": "True", + "Socket Write Timeout": "15 secs", + "Request Header Attributes Pattern": null, + "Response FlowFile Naming Strategy": "RANDOM", + "Response Cache Enabled": "false", + "Request Date Header Enabled": "True", + "Request Failure Penalization Enabled": "false", + "Response Body Attribute Size": "256", + "SSL Context Service": null, + "Response Generation Required": "false", + "Request User-Agent": null, + "Response Header Request Attributes Enabled": "false", + "HTTP Method": "GET", + "Request Username": "rasmus.luha", + "Request Content-Type": "${mime.type}", + "Response Body Attribute Name": null, + "Request Digest Authentication Enabled": "false", + "Request Multipart Form-Data Name": null, + "Response Cache Size": "10MB", + "Response Body Ignored": "false", + "Replacement Value": "energy,building=\"Delta\" kilowattHours=${energy_value}" + }, + "propertyDescriptors": { + "Request Content-Encoding": { + "name": "Request Content-Encoding", + "displayName": "Request Content-Encoding", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "proxy-configuration-service": { + "name": "proxy-configuration-service", + "displayName": "Proxy Configuration Service", + "identifiesControllerService": true, + "sensitive": false, + "dynamic": false + }, + "Request Multipart Form-Data Filename Enabled": { + "name": "Request Multipart Form-Data Filename Enabled", + "displayName": "Request Multipart Form-Data Filename Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Chunked Transfer-Encoding Enabled": { + "name": "Request Chunked Transfer-Encoding Enabled", + "displayName": "Request Chunked Transfer-Encoding Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Header Request Attributes Prefix": { + "name": "Response Header Request Attributes Prefix", + "displayName": "Response Header Request Attributes Prefix", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "HTTP/2 Disabled": { + "name": "HTTP/2 Disabled", + "displayName": "HTTP/2 Disabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Connection Timeout": { + "name": "Connection Timeout", + "displayName": "Connection Timeout", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Cookie Strategy": { + "name": "Response Cookie Strategy", + "displayName": "Response Cookie Strategy", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Password": { + "name": "Request Password", + "displayName": "Request Password", + "identifiesControllerService": false, + "sensitive": true, + "dynamic": false + }, + "Socket Read Timeout": { + "name": "Socket Read Timeout", + "displayName": "Socket Read Timeout", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Socket Idle Connections": { + "name": "Socket Idle Connections", + "displayName": "Socket Idle Connections", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Body Enabled": { + "name": "Request Body Enabled", + "displayName": "Request Body Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "HTTP URL": { + "name": "HTTP URL", + "displayName": "HTTP URL", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request OAuth2 Access Token Provider": { + "name": "Request OAuth2 Access Token Provider", + "displayName": "Request OAuth2 Access Token Provider", + "identifiesControllerService": true, + "sensitive": false, + "dynamic": false + }, + "Socket Idle Timeout": { + "name": "Socket Idle Timeout", + "displayName": "Socket Idle Timeout", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Redirects Enabled": { + "name": "Response Redirects Enabled", + "displayName": "Response Redirects Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Socket Write Timeout": { + "name": "Socket Write Timeout", + "displayName": "Socket Write Timeout", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Header Attributes Pattern": { + "name": "Request Header Attributes Pattern", + "displayName": "Request Header Attributes Pattern", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response FlowFile Naming Strategy": { + "name": "Response FlowFile Naming Strategy", + "displayName": "Response FlowFile Naming Strategy", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Cache Enabled": { + "name": "Response Cache Enabled", + "displayName": "Response Cache Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Date Header Enabled": { + "name": "Request Date Header Enabled", + "displayName": "Request Date Header Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Failure Penalization Enabled": { + "name": "Request Failure Penalization Enabled", + "displayName": "Request Failure Penalization Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Body Attribute Size": { + "name": "Response Body Attribute Size", + "displayName": "Response Body Attribute Size", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "SSL Context Service": { + "name": "SSL Context Service", + "displayName": "SSL Context Service", + "identifiesControllerService": true, + "sensitive": false, + "dynamic": false + }, + "Response Generation Required": { + "name": "Response Generation Required", + "displayName": "Response Generation Required", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request User-Agent": { + "name": "Request User-Agent", + "displayName": "Request User-Agent", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Header Request Attributes Enabled": { + "name": "Response Header Request Attributes Enabled", + "displayName": "Response Header Request Attributes Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "HTTP Method": { + "name": "HTTP Method", + "displayName": "HTTP Method", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Username": { + "name": "Request Username", + "displayName": "Request Username", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Content-Type": { + "name": "Request Content-Type", + "displayName": "Request Content-Type", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Body Attribute Name": { + "name": "Response Body Attribute Name", + "displayName": "Response Body Attribute Name", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Digest Authentication Enabled": { + "name": "Request Digest Authentication Enabled", + "displayName": "Request Digest Authentication Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Multipart Form-Data Name": { + "name": "Request Multipart Form-Data Name", + "displayName": "Request Multipart Form-Data Name", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Cache Size": { + "name": "Response Cache Size", + "displayName": "Response Cache Size", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Body Ignored": { + "name": "Response Body Ignored", + "displayName": "Response Body Ignored", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + } + }, + "style": {}, + "schedulingPeriod": "86400 sec", + "schedulingStrategy": "TIMER_DRIVEN", + "executionNode": "ALL", + "penaltyDuration": "30 sec", + "yieldDuration": "1 sec", + "bulletinLevel": "WARN", + "runDurationMillis": 0, + "concurrentlySchedulableTaskCount": 1, + "autoTerminatedRelationships": [ + "Original" + ], + "scheduledState": "ENABLED", + "retryCount": 10, + "retriedRelationships": [], + "backoffMechanism": "PENALIZE_FLOWFILE", + "maxBackoffPeriod": "10 mins", + "componentType": "PROCESSOR", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + }, + { + "identifier": "fb9a5b80-aa9a-3e1b-86f5-c17db5783812", + "instanceIdentifier": "0bd7b16d-0195-1000-32ad-5b4055f37b22", + "name": "SplitJson", + "comments": "", + "position": { + "x": -1184.0, + "y": -440.0 + }, + "type": "org.apache.nifi.processors.standard.SplitJson", + "bundle": { + "group": "org.apache.nifi", + "artifact": "nifi-standard-nar", + "version": "2.1.0" + }, + "properties": { + "Max String Length": "20 MB", + "Null Value Representation": "empty string", + "JsonPath Expression": "$.measurements[*]" + }, + "propertyDescriptors": { + "Max String Length": { + "name": "Max String Length", + "displayName": "Max String Length", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Null Value Representation": { + "name": "Null Value Representation", + "displayName": "Null Value Representation", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "JsonPath Expression": { + "name": "JsonPath Expression", + "displayName": "JsonPath Expression", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + } + }, + "style": {}, + "schedulingPeriod": "0 sec", + "schedulingStrategy": "TIMER_DRIVEN", + "executionNode": "ALL", + "penaltyDuration": "30 sec", + "yieldDuration": "1 sec", + "bulletinLevel": "WARN", + "runDurationMillis": 0, + "concurrentlySchedulableTaskCount": 1, + "autoTerminatedRelationships": [], + "scheduledState": "ENABLED", + "retryCount": 10, + "retriedRelationships": [], + "backoffMechanism": "PENALIZE_FLOWFILE", + "maxBackoffPeriod": "10 mins", + "componentType": "PROCESSOR", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + }, + { + "identifier": "b00e49a7-d25a-3d5a-8705-ef4c5e2919e7", + "instanceIdentifier": "6802228d-1680-3d01-dcb3-83febf10560d", + "name": "EvaluateJsonPath", + "comments": "", + "position": { + "x": -648.0, + "y": -608.0 + }, + "type": "org.apache.nifi.processors.standard.EvaluateJsonPath", + "bundle": { + "group": "org.apache.nifi", + "artifact": "nifi-standard-nar", + "version": "2.1.0" + }, + "properties": { + "Destination": "flowfile-attribute", + "Max String Length": "20 MB", + "Return Type": "auto-detect", + "energy_value": "$.KogEN.T.value", + "Null Value Representation": "empty string", + "Path Not Found Behavior": "ignore" + }, + "propertyDescriptors": { + "Destination": { + "name": "Destination", + "displayName": "Destination", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Max String Length": { + "name": "Max String Length", + "displayName": "Max String Length", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Return Type": { + "name": "Return Type", + "displayName": "Return Type", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "energy_value": { + "name": "energy_value", + "displayName": "energy_value", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": true + }, + "Null Value Representation": { + "name": "Null Value Representation", + "displayName": "Null Value Representation", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Path Not Found Behavior": { + "name": "Path Not Found Behavior", + "displayName": "Path Not Found Behavior", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + } + }, + "style": {}, + "schedulingPeriod": "0 sec", + "schedulingStrategy": "TIMER_DRIVEN", + "executionNode": "ALL", + "penaltyDuration": "30 sec", + "yieldDuration": "1 sec", + "bulletinLevel": "WARN", + "runDurationMillis": 0, + "concurrentlySchedulableTaskCount": 1, + "autoTerminatedRelationships": [], + "scheduledState": "ENABLED", + "retryCount": 10, + "retriedRelationships": [], + "backoffMechanism": "PENALIZE_FLOWFILE", + "maxBackoffPeriod": "10 mins", + "componentType": "PROCESSOR", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + }, + { + "identifier": "5834e54d-4509-3fb8-b672-fb1f450ef408", + "instanceIdentifier": "87c23d87-fa77-32d7-4a2b-d425cddba4c7", + "name": "InvokeHTTP", + "comments": "", + "position": { + "x": -128.0, + "y": -624.0 + }, + "type": "org.apache.nifi.processors.standard.InvokeHTTP", + "bundle": { + "group": "org.apache.nifi", + "artifact": "nifi-standard-nar", + "version": "2.1.0" + }, + "properties": { + "Request Content-Encoding": "DISABLED", + "proxy-configuration-service": null, + "Request Multipart Form-Data Filename Enabled": "true", + "Request Chunked Transfer-Encoding Enabled": "false", + "Response Header Request Attributes Prefix": null, + "HTTP/2 Disabled": "False", + "Connection Timeout": "5 secs", + "Response Cookie Strategy": "DISABLED", + "Socket Read Timeout": "15 secs", + "Socket Idle Connections": "5", + "Request Body Enabled": "true", + "HTTP URL": "http://influxdb:8086/write?db=nifi_deltaEnergy", + "Request OAuth2 Access Token Provider": null, + "Socket Idle Timeout": "5 mins", + "Response Redirects Enabled": "True", + "Socket Write Timeout": "15 secs", + "Request Header Attributes Pattern": null, + "Response FlowFile Naming Strategy": "RANDOM", + "Response Cache Enabled": "false", + "Request Date Header Enabled": "True", + "Request Failure Penalization Enabled": "false", + "Response Body Attribute Size": "256", + "SSL Context Service": null, + "Response Generation Required": "false", + "Request User-Agent": null, + "Response Header Request Attributes Enabled": "false", + "HTTP Method": "POST", + "Request Username": "admin", + "Request Content-Type": "${mime.type}", + "Response Body Attribute Name": null, + "Request Digest Authentication Enabled": "false", + "Request Multipart Form-Data Name": null, + "Response Cache Size": "10MB", + "Response Body Ignored": "false" + }, + "propertyDescriptors": { + "Request Content-Encoding": { + "name": "Request Content-Encoding", + "displayName": "Request Content-Encoding", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "proxy-configuration-service": { + "name": "proxy-configuration-service", + "displayName": "Proxy Configuration Service", + "identifiesControllerService": true, + "sensitive": false, + "dynamic": false + }, + "Request Multipart Form-Data Filename Enabled": { + "name": "Request Multipart Form-Data Filename Enabled", + "displayName": "Request Multipart Form-Data Filename Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Chunked Transfer-Encoding Enabled": { + "name": "Request Chunked Transfer-Encoding Enabled", + "displayName": "Request Chunked Transfer-Encoding Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Header Request Attributes Prefix": { + "name": "Response Header Request Attributes Prefix", + "displayName": "Response Header Request Attributes Prefix", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "HTTP/2 Disabled": { + "name": "HTTP/2 Disabled", + "displayName": "HTTP/2 Disabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Connection Timeout": { + "name": "Connection Timeout", + "displayName": "Connection Timeout", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Cookie Strategy": { + "name": "Response Cookie Strategy", + "displayName": "Response Cookie Strategy", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Password": { + "name": "Request Password", + "displayName": "Request Password", + "identifiesControllerService": false, + "sensitive": true, + "dynamic": false + }, + "Socket Read Timeout": { + "name": "Socket Read Timeout", + "displayName": "Socket Read Timeout", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Socket Idle Connections": { + "name": "Socket Idle Connections", + "displayName": "Socket Idle Connections", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Body Enabled": { + "name": "Request Body Enabled", + "displayName": "Request Body Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "HTTP URL": { + "name": "HTTP URL", + "displayName": "HTTP URL", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request OAuth2 Access Token Provider": { + "name": "Request OAuth2 Access Token Provider", + "displayName": "Request OAuth2 Access Token Provider", + "identifiesControllerService": true, + "sensitive": false, + "dynamic": false + }, + "Socket Idle Timeout": { + "name": "Socket Idle Timeout", + "displayName": "Socket Idle Timeout", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Redirects Enabled": { + "name": "Response Redirects Enabled", + "displayName": "Response Redirects Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Socket Write Timeout": { + "name": "Socket Write Timeout", + "displayName": "Socket Write Timeout", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Header Attributes Pattern": { + "name": "Request Header Attributes Pattern", + "displayName": "Request Header Attributes Pattern", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response FlowFile Naming Strategy": { + "name": "Response FlowFile Naming Strategy", + "displayName": "Response FlowFile Naming Strategy", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Cache Enabled": { + "name": "Response Cache Enabled", + "displayName": "Response Cache Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Date Header Enabled": { + "name": "Request Date Header Enabled", + "displayName": "Request Date Header Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Failure Penalization Enabled": { + "name": "Request Failure Penalization Enabled", + "displayName": "Request Failure Penalization Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Body Attribute Size": { + "name": "Response Body Attribute Size", + "displayName": "Response Body Attribute Size", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "SSL Context Service": { + "name": "SSL Context Service", + "displayName": "SSL Context Service", + "identifiesControllerService": true, + "sensitive": false, + "dynamic": false + }, + "Response Generation Required": { + "name": "Response Generation Required", + "displayName": "Response Generation Required", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request User-Agent": { + "name": "Request User-Agent", + "displayName": "Request User-Agent", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Header Request Attributes Enabled": { + "name": "Response Header Request Attributes Enabled", + "displayName": "Response Header Request Attributes Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "HTTP Method": { + "name": "HTTP Method", + "displayName": "HTTP Method", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Username": { + "name": "Request Username", + "displayName": "Request Username", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Content-Type": { + "name": "Request Content-Type", + "displayName": "Request Content-Type", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Body Attribute Name": { + "name": "Response Body Attribute Name", + "displayName": "Response Body Attribute Name", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Digest Authentication Enabled": { + "name": "Request Digest Authentication Enabled", + "displayName": "Request Digest Authentication Enabled", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Request Multipart Form-Data Name": { + "name": "Request Multipart Form-Data Name", + "displayName": "Request Multipart Form-Data Name", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Cache Size": { + "name": "Response Cache Size", + "displayName": "Response Cache Size", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + }, + "Response Body Ignored": { + "name": "Response Body Ignored", + "displayName": "Response Body Ignored", + "identifiesControllerService": false, + "sensitive": false, + "dynamic": false + } + }, + "style": {}, + "schedulingPeriod": "0 sec", + "schedulingStrategy": "TIMER_DRIVEN", + "executionNode": "ALL", + "penaltyDuration": "30 sec", + "yieldDuration": "1 sec", + "bulletinLevel": "WARN", + "runDurationMillis": 0, + "concurrentlySchedulableTaskCount": 1, + "autoTerminatedRelationships": [], + "scheduledState": "ENABLED", + "retryCount": 10, + "retriedRelationships": [], + "backoffMechanism": "PENALIZE_FLOWFILE", + "maxBackoffPeriod": "10 mins", + "componentType": "PROCESSOR", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + } + ], + "inputPorts": [], + "outputPorts": [ + { + "identifier": "eaff6f84-649b-3677-9935-911028a86f0e", + "instanceIdentifier": "c033503f-2cfe-354d-548c-7710831a646d", + "name": "errors", + "position": { + "x": -760.0, + "y": -1016.0 + }, + "type": "OUTPUT_PORT", + "concurrentlySchedulableTaskCount": 1, + "scheduledState": "ENABLED", + "allowRemoteAccess": false, + "portFunction": "STANDARD", + "componentType": "OUTPUT_PORT", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + } + ], + "connections": [ + { + "identifier": "da4a1ac4-ab2b-3bef-889f-3a3783f8fff2", + "instanceIdentifier": "a70fb3b4-0bc5-3986-a9a8-b35cbe2749e2", + "name": "", + "source": { + "id": "d7963d52-e8a3-3b27-9543-20db6cc99f6f", + "type": "PROCESSOR", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "ReplaceText", + "comments": "", + "instanceIdentifier": "9f1ceb8b-f048-3b47-5aec-773690811078" + }, + "destination": { + "id": "5834e54d-4509-3fb8-b672-fb1f450ef408", + "type": "PROCESSOR", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "InvokeHTTP", + "comments": "", + "instanceIdentifier": "87c23d87-fa77-32d7-4a2b-d425cddba4c7" + }, + "labelIndex": 0, + "zIndex": 0, + "selectedRelationships": [ + "success" + ], + "backPressureObjectThreshold": 10000, + "backPressureDataSizeThreshold": "1 GB", + "flowFileExpiration": "0 sec", + "prioritizers": [], + "bends": [], + "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", + "partitioningAttribute": "", + "loadBalanceCompression": "DO_NOT_COMPRESS", + "componentType": "CONNECTION", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + }, + { + "identifier": "8da480cb-332d-3518-a678-554a976ab177", + "instanceIdentifier": "ed8acac9-2ac0-3494-9787-d6889ca9d2ae", + "name": "", + "source": { + "id": "d7963d52-e8a3-3b27-9543-20db6cc99f6f", + "type": "PROCESSOR", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "ReplaceText", + "comments": "", + "instanceIdentifier": "9f1ceb8b-f048-3b47-5aec-773690811078" + }, + "destination": { + "id": "eaff6f84-649b-3677-9935-911028a86f0e", + "type": "OUTPUT_PORT", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "errors", + "instanceIdentifier": "c033503f-2cfe-354d-548c-7710831a646d" + }, + "labelIndex": 0, + "zIndex": 0, + "selectedRelationships": [ + "failure" + ], + "backPressureObjectThreshold": 10000, + "backPressureDataSizeThreshold": "1 GB", + "flowFileExpiration": "0 sec", + "prioritizers": [], + "bends": [], + "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", + "partitioningAttribute": "", + "loadBalanceCompression": "DO_NOT_COMPRESS", + "componentType": "CONNECTION", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + }, + { + "identifier": "2e2a9588-6e83-3fad-9e25-a7e4411f7cbb", + "instanceIdentifier": "0bd8e0f0-0195-1000-b5fa-59bff2ea7c05", + "name": "", + "source": { + "id": "fb9a5b80-aa9a-3e1b-86f5-c17db5783812", + "type": "PROCESSOR", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "SplitJson", + "comments": "", + "instanceIdentifier": "0bd7b16d-0195-1000-32ad-5b4055f37b22" + }, + "destination": { + "id": "b00e49a7-d25a-3d5a-8705-ef4c5e2919e7", + "type": "PROCESSOR", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "EvaluateJsonPath", + "comments": "", + "instanceIdentifier": "6802228d-1680-3d01-dcb3-83febf10560d" + }, + "labelIndex": 0, + "zIndex": 0, + "selectedRelationships": [ + "split" + ], + "backPressureObjectThreshold": 10000, + "backPressureDataSizeThreshold": "1 GB", + "flowFileExpiration": "0 sec", + "prioritizers": [], + "bends": [], + "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", + "partitioningAttribute": "", + "loadBalanceCompression": "DO_NOT_COMPRESS", + "componentType": "CONNECTION", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + }, + { + "identifier": "f21c16db-0f95-31a0-9bcc-fc2034a8e5ad", + "instanceIdentifier": "0bd93b2d-0195-1000-1cf6-b09aec356f70", + "name": "", + "source": { + "id": "fb9a5b80-aa9a-3e1b-86f5-c17db5783812", + "type": "PROCESSOR", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "SplitJson", + "comments": "", + "instanceIdentifier": "0bd7b16d-0195-1000-32ad-5b4055f37b22" + }, + "destination": { + "id": "eaff6f84-649b-3677-9935-911028a86f0e", + "type": "OUTPUT_PORT", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "errors", + "instanceIdentifier": "c033503f-2cfe-354d-548c-7710831a646d" + }, + "labelIndex": 0, + "zIndex": 0, + "selectedRelationships": [ + "original", + "failure" + ], + "backPressureObjectThreshold": 10000, + "backPressureDataSizeThreshold": "1 GB", + "flowFileExpiration": "0 sec", + "prioritizers": [], + "bends": [], + "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", + "partitioningAttribute": "", + "loadBalanceCompression": "DO_NOT_COMPRESS", + "componentType": "CONNECTION", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + }, + { + "identifier": "b84a7c01-3942-3334-b543-6cf24a13e313", + "instanceIdentifier": "1bf7d1f1-d115-30a3-2584-4ecc72df55ee", + "name": "", + "source": { + "id": "b00e49a7-d25a-3d5a-8705-ef4c5e2919e7", + "type": "PROCESSOR", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "EvaluateJsonPath", + "comments": "", + "instanceIdentifier": "6802228d-1680-3d01-dcb3-83febf10560d" + }, + "destination": { + "id": "eaff6f84-649b-3677-9935-911028a86f0e", + "type": "OUTPUT_PORT", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "errors", + "instanceIdentifier": "c033503f-2cfe-354d-548c-7710831a646d" + }, + "labelIndex": 0, + "zIndex": 0, + "selectedRelationships": [ + "failure", + "unmatched" + ], + "backPressureObjectThreshold": 10000, + "backPressureDataSizeThreshold": "1 GB", + "flowFileExpiration": "0 sec", + "prioritizers": [], + "bends": [], + "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", + "partitioningAttribute": "", + "loadBalanceCompression": "DO_NOT_COMPRESS", + "componentType": "CONNECTION", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + }, + { + "identifier": "4146e7c5-2050-380e-9d1d-7794ce01b73d", + "instanceIdentifier": "58e1b5f6-2931-3f24-b849-6eaec7239b65", + "name": "", + "source": { + "id": "ba013c53-d8f2-3718-b7dd-d935e8b1413f", + "type": "PROCESSOR", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "InvokeHTTP", + "comments": "", + "instanceIdentifier": "44bbe9ed-51fa-3d2b-2bff-e04fc0673ebd" + }, + "destination": { + "id": "eaff6f84-649b-3677-9935-911028a86f0e", + "type": "OUTPUT_PORT", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "errors", + "instanceIdentifier": "c033503f-2cfe-354d-548c-7710831a646d" + }, + "labelIndex": 0, + "zIndex": 0, + "selectedRelationships": [ + "No Retry", + "Retry", + "Failure" + ], + "backPressureObjectThreshold": 10000, + "backPressureDataSizeThreshold": "1 GB", + "flowFileExpiration": "0 sec", + "prioritizers": [], + "bends": [], + "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", + "partitioningAttribute": "", + "loadBalanceCompression": "DO_NOT_COMPRESS", + "componentType": "CONNECTION", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + }, + { + "identifier": "17634682-cdb7-38bf-b259-343647a490a1", + "instanceIdentifier": "c5525bf4-5a39-331f-e451-36c7d7751286", + "name": "", + "source": { + "id": "5834e54d-4509-3fb8-b672-fb1f450ef408", + "type": "PROCESSOR", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "InvokeHTTP", + "comments": "", + "instanceIdentifier": "87c23d87-fa77-32d7-4a2b-d425cddba4c7" + }, + "destination": { + "id": "eaff6f84-649b-3677-9935-911028a86f0e", + "type": "OUTPUT_PORT", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "errors", + "instanceIdentifier": "c033503f-2cfe-354d-548c-7710831a646d" + }, + "labelIndex": 0, + "zIndex": 0, + "selectedRelationships": [ + "Response", + "No Retry", + "Retry", + "Original", + "Failure" + ], + "backPressureObjectThreshold": 10000, + "backPressureDataSizeThreshold": "1 GB", + "flowFileExpiration": "0 sec", + "prioritizers": [], + "bends": [], + "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", + "partitioningAttribute": "", + "loadBalanceCompression": "DO_NOT_COMPRESS", + "componentType": "CONNECTION", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + }, + { + "identifier": "bae53cad-4e26-36b7-a45b-60257d6a6ea7", + "instanceIdentifier": "9f06da23-1cf0-3bb1-b2c8-f3bf0f8d1308", + "name": "", + "source": { + "id": "b00e49a7-d25a-3d5a-8705-ef4c5e2919e7", + "type": "PROCESSOR", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "EvaluateJsonPath", + "comments": "", + "instanceIdentifier": "6802228d-1680-3d01-dcb3-83febf10560d" + }, + "destination": { + "id": "d7963d52-e8a3-3b27-9543-20db6cc99f6f", + "type": "PROCESSOR", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "ReplaceText", + "comments": "", + "instanceIdentifier": "9f1ceb8b-f048-3b47-5aec-773690811078" + }, + "labelIndex": 0, + "zIndex": 0, + "selectedRelationships": [ + "matched" + ], + "backPressureObjectThreshold": 10000, + "backPressureDataSizeThreshold": "1 GB", + "flowFileExpiration": "0 sec", + "prioritizers": [], + "bends": [], + "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", + "partitioningAttribute": "", + "loadBalanceCompression": "DO_NOT_COMPRESS", + "componentType": "CONNECTION", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + }, + { + "identifier": "e529f57e-174b-3adc-86ac-326b10703eef", + "instanceIdentifier": "0bd8a1cd-0195-1000-f564-5b19695e6b39", + "name": "", + "source": { + "id": "ba013c53-d8f2-3718-b7dd-d935e8b1413f", + "type": "PROCESSOR", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "InvokeHTTP", + "comments": "", + "instanceIdentifier": "44bbe9ed-51fa-3d2b-2bff-e04fc0673ebd" + }, + "destination": { + "id": "fb9a5b80-aa9a-3e1b-86f5-c17db5783812", + "type": "PROCESSOR", + "groupId": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274", + "name": "SplitJson", + "comments": "", + "instanceIdentifier": "0bd7b16d-0195-1000-32ad-5b4055f37b22" + }, + "labelIndex": 0, + "zIndex": 0, + "selectedRelationships": [ + "Response" + ], + "backPressureObjectThreshold": 10000, + "backPressureDataSizeThreshold": "1 GB", + "flowFileExpiration": "0 sec", + "prioritizers": [], + "bends": [], + "loadBalanceStrategy": "DO_NOT_LOAD_BALANCE", + "partitioningAttribute": "", + "loadBalanceCompression": "DO_NOT_COMPRESS", + "componentType": "CONNECTION", + "groupIdentifier": "2ae4bcd4-1c30-34e2-8206-1a0b567f7274" + } + ], + "labels": [], + "funnels": [], + "controllerServices": [], + "defaultFlowFileExpiration": "0 sec", + "defaultBackPressureObjectThreshold": 10000, + "defaultBackPressureDataSizeThreshold": "1 GB", + "scheduledState": "ENABLED", + "executionEngine": "INHERITED", + "maxConcurrentTasks": 1, + "statelessFlowTimeout": "1 min", + "flowFileConcurrency": "UNBOUNDED", + "flowFileOutboundPolicy": "STREAM_WHEN_AVAILABLE", + "componentType": "PROCESS_GROUP" + }, + "externalControllerServices": {}, + "parameterContexts": {}, + "flowEncodingVersion": "1.0", + "parameterProviders": {}, + "latest": false +} -- cgit v1.2.3