diff --git a/fullSetup/NiFi_Flow_full.json b/fullSetup/NiFi_Flow_full.json index 6b4c4cc..6e5984a 100644 --- a/fullSetup/NiFi_Flow_full.json +++ b/fullSetup/NiFi_Flow_full.json @@ -1 +1 @@ -{"flowContents":{"identifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","instanceIdentifier":"642fcc3f-018c-1000-98db-bd5ecf9b07cb","name":"NiFi Flow","comments":"","position":{"x":0.0,"y":0.0},"processGroups":[{"identifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437","instanceIdentifier":"6533be55-2649-3169-3870-5b1802349e37","name":"NGSI-LD Subscriptions","comments":"","position":{"x":494.0,"y":727.0},"processGroups":[],"remoteProcessGroups":[],"processors":[{"identifier":"27e4e5f8-585a-35b1-a830-be0f3cf20252","instanceIdentifier":"6a161850-f0f7-3b10-6ec4-e50ce4360d58","name":"EvaluateJsonPath","comments":"","position":{"x":1240.0,"y":280.0},"type":"org.apache.nifi.processors.standard.EvaluateJsonPath","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Destination":"flowfile-content","Return Type":"auto-detect","Null Value Representation":"empty string","JsonPaths":"$.data","Path Not Found Behavior":"ignore"},"propertyDescriptors":{"Destination":{"name":"Destination","displayName":"Destination","identifiesControllerService":false,"sensitive":false},"Return Type":{"name":"Return Type","displayName":"Return Type","identifiesControllerService":false,"sensitive":false},"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPaths":{"name":"JsonPaths","displayName":"JsonPaths","identifiesControllerService":false,"sensitive":false},"Path Not Found Behavior":{"name":"Path Not Found Behavior","displayName":"Path Not Found Behavior","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure","unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"5082c2a8-e27c-3b27-9e5c-76b3f19e8786","instanceIdentifier":"2e282521-7877-3b7a-812f-ca3e6df97a4c","name":"SplitContent","comments":"","position":{"x":264.0,"y":432.0},"type":"org.apache.nifi.processors.standard.SplitContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Byte Sequence Location":"Trailing","Keep Byte Sequence":"false","Byte Sequence Format":"Text","Byte Sequence":","},"propertyDescriptors":{"Byte Sequence Location":{"name":"Byte Sequence Location","displayName":"Byte Sequence Location","identifiesControllerService":false,"sensitive":false},"Keep Byte Sequence":{"name":"Keep Byte Sequence","displayName":"Keep Byte Sequence","identifiesControllerService":false,"sensitive":false},"Byte Sequence Format":{"name":"Byte Sequence Format","displayName":"Byte Sequence Format","identifiesControllerService":false,"sensitive":false},"Byte Sequence":{"name":"Byte Sequence","displayName":"Byte Sequence","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"e8f81b8c-95ea-3799-bc06-c63b76d2d791","instanceIdentifier":"e5020c1b-179b-36a8-3e75-7ccb369b34b5","name":"MergeContent","comments":"","position":{"x":336.0,"y":768.0},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"0 B","Maximum number of Bins":"5","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":null,"Max Bin Age":null,"Demarcator File":",","Correlation Attribute Name":null,"Header File":null,"mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"2"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"7d97f867-c218-3d56-ae3e-38a1f5cbefda","instanceIdentifier":"c146feac-d294-3983-0f42-d26e5476deea","name":"ReplaceText","comments":"","position":{"x":272.0,"y":608.0},"type":"org.apache.nifi.processors.standard.ReplaceText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Regular Expression":"([^ ]+)","Replacement Value":"{\"type\":\"$1\"}","Evaluation Mode":"Line-by-Line","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},"Replacement Value":{"name":"Replacement Value","displayName":"Replacement Value","identifiesControllerService":false,"sensitive":false},"Evaluation Mode":{"name":"Evaluation Mode","displayName":"Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Text to Prepend":{"name":"Text to Prepend","displayName":"Text to Prepend","identifiesControllerService":false,"sensitive":false},"Line-by-Line Evaluation Mode":{"name":"Line-by-Line Evaluation Mode","displayName":"Line-by-Line Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Replacement Strategy":{"name":"Replacement Strategy","displayName":"Replacement Strategy","identifiesControllerService":false,"sensitive":false},"Text to Append":{"name":"Text to Append","displayName":"Text to Append","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"f10ef940-3e17-3703-b8ed-8131eb50e532","instanceIdentifier":"058462c6-d5de-391c-46c2-d43ef1fb461d","name":"ReplaceText","comments":"","position":{"x":1064.0,"y":728.0},"type":"org.apache.nifi.processors.standard.ReplaceText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Regular Expression":"([^ ]+)","Replacement Value":"{\n\t\"id\": \"myspecial_sub_id:1234567\",\n\t\"type\": \"Subscription\",\n\t\"entities\": [\n\t\t$1\n\t],\n\t\"notification\": {\n\t\t\"endpoint\": {\n\t\t\t\"uri\": \"${NOTIFICATION_HOST}:${NOTIFICATION_PORT}/${NOTIFICATION_PATH}\",\n\t\t\t\"accept\": \"application/json\"\n\t\t}\n\t}\n}","Evaluation Mode":"Line-by-Line","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},"Replacement Value":{"name":"Replacement Value","displayName":"Replacement Value","identifiesControllerService":false,"sensitive":false},"Evaluation Mode":{"name":"Evaluation Mode","displayName":"Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Text to Prepend":{"name":"Text to Prepend","displayName":"Text to Prepend","identifiesControllerService":false,"sensitive":false},"Line-by-Line Evaluation Mode":{"name":"Line-by-Line Evaluation Mode","displayName":"Line-by-Line Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Replacement Strategy":{"name":"Replacement Strategy","displayName":"Replacement Strategy","identifiesControllerService":false,"sensitive":false},"Text to Append":{"name":"Text to Append","displayName":"Text to Append","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"1882950a-d3ae-37cd-97e0-bbfa5d644a92","instanceIdentifier":"cfe1da07-09cf-30fa-e691-9a837de63273","name":"InvokeHTTP","comments":"","position":{"x":736.0,"y":184.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${NGSILD_HOST}/ngsi-ld/v1/subscriptions","form-body-form-name":null,"Content-Type":"application/json","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Socket Write Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"POST","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Socket Write Timeout":{"name":"Socket Write Timeout","displayName":"Socket Write Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"9d42a62b-b252-329c-b503-e614f090bbb3","instanceIdentifier":"b6108686-fa26-35aa-6796-6da66f03aca2","name":"GenerateFlowFile","comments":"","position":{"x":232.0,"y":200.0},"type":"org.apache.nifi.processors.standard.GenerateFlowFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"character-set":"UTF-8","File Size":"0B","mime-type":null,"generate-ff-custom-text":"${ENTITY_TYPES}","Batch Size":"1","Unique FlowFiles":"false","Data Format":"Text"},"propertyDescriptors":{"character-set":{"name":"character-set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"File Size":{"name":"File Size","displayName":"File Size","identifiesControllerService":false,"sensitive":false},"mime-type":{"name":"mime-type","displayName":"Mime Type","identifiesControllerService":false,"sensitive":false},"generate-ff-custom-text":{"name":"generate-ff-custom-text","displayName":"Custom Text","identifiesControllerService":false,"sensitive":false},"Batch Size":{"name":"Batch Size","displayName":"Batch Size","identifiesControllerService":false,"sensitive":false},"Unique FlowFiles":{"name":"Unique FlowFiles","displayName":"Unique FlowFiles","identifiesControllerService":false,"sensitive":false},"Data Format":{"name":"Data Format","displayName":"Data Format","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"1 min","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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"620bf838-a2db-3460-adf5-807f3e18cd21","instanceIdentifier":"8ce22b72-b4db-3239-878a-ed72b2633620","name":"ListenHTTP","comments":"","position":{"x":896.0,"y":480.0},"type":"org.apache.nifi.processors.standard.ListenHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"authorized-issuer-dn-pattern":".*","multipart-request-max-size":"1 MB","record-writer":null,"HTTP Protocols":"HTTP_1_1","HTTP Headers to receive as Attributes (Regex)":null,"health-check-port":null,"Authorized DN Pattern":".*","max-thread-pool-size":"200","Base Path":"${NOTIFICATION_PATH}","multipart-read-buffer-size":"512 KB","SSL Context Service":null,"Max Unconfirmed Flowfile Time":"60 secs","Max Data to Receive per Second":null,"client-authentication":"AUTO","Return Code":"200","record-reader":null,"Listening Port":"${NOTIFICATION_PORT}"},"propertyDescriptors":{"authorized-issuer-dn-pattern":{"name":"authorized-issuer-dn-pattern","displayName":"Authorized Issuer DN Pattern","identifiesControllerService":false,"sensitive":false},"multipart-request-max-size":{"name":"multipart-request-max-size","displayName":"Multipart Request Max Size","identifiesControllerService":false,"sensitive":false},"record-writer":{"name":"record-writer","displayName":"Record Writer","identifiesControllerService":true,"sensitive":false},"HTTP Protocols":{"name":"HTTP Protocols","displayName":"HTTP Protocols","identifiesControllerService":false,"sensitive":false},"HTTP Headers to receive as Attributes (Regex)":{"name":"HTTP Headers to receive as Attributes (Regex)","displayName":"HTTP Headers to receive as Attributes (Regex)","identifiesControllerService":false,"sensitive":false},"health-check-port":{"name":"health-check-port","displayName":"Listening Port for Health Check Requests","identifiesControllerService":false,"sensitive":false},"Authorized DN Pattern":{"name":"Authorized DN Pattern","displayName":"Authorized Subject DN Pattern","identifiesControllerService":false,"sensitive":false},"max-thread-pool-size":{"name":"max-thread-pool-size","displayName":"Maximum Thread Pool Size","identifiesControllerService":false,"sensitive":false},"Base Path":{"name":"Base Path","displayName":"Base Path","identifiesControllerService":false,"sensitive":false},"multipart-read-buffer-size":{"name":"multipart-read-buffer-size","displayName":"Multipart Read Buffer Size","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Max Unconfirmed Flowfile Time":{"name":"Max Unconfirmed Flowfile Time","displayName":"Max Unconfirmed Flowfile Time","identifiesControllerService":false,"sensitive":false},"Max Data to Receive per Second":{"name":"Max Data to Receive per Second","displayName":"Max Data to Receive per Second","identifiesControllerService":false,"sensitive":false},"client-authentication":{"name":"client-authentication","displayName":"Client Authentication","identifiesControllerService":false,"sensitive":false},"Return Code":{"name":"Return Code","displayName":"Return Code","identifiesControllerService":false,"sensitive":false},"record-reader":{"name":"record-reader","displayName":"Record Reader","identifiesControllerService":true,"sensitive":false},"Listening Port":{"name":"Listening Port","displayName":"Listening Port","identifiesControllerService":false,"sensitive":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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"2d9d6ccc-a121-3c91-b674-26a4cea2d280","instanceIdentifier":"a778dcf5-e545-33e2-50e0-09e876ea5e8e","name":"LogMessage","comments":"","position":{"x":1280.0,"y":-8.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"}],"inputPorts":[],"outputPorts":[{"identifier":"00c06b2e-8245-316d-a97b-72fbba2f0412","instanceIdentifier":"94a05b48-b8b8-3e25-5d47-47f95251035d","name":"NGSI-LD Notification Data","position":{"x":1464.0,"y":656.0},"type":"OUTPUT_PORT","concurrentlySchedulableTaskCount":1,"scheduledState":"ENABLED","allowRemoteAccess":false,"componentType":"OUTPUT_PORT","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"}],"connections":[{"identifier":"5059ad9c-ece9-3534-94c9-d465869bf283","instanceIdentifier":"e2573436-b749-381f-dcd0-d4556514389e","name":"","source":{"id":"620bf838-a2db-3460-adf5-807f3e18cd21","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ListenHTTP","comments":"","instanceIdentifier":"8ce22b72-b4db-3239-878a-ed72b2633620"},"destination":{"id":"27e4e5f8-585a-35b1-a830-be0f3cf20252","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"6a161850-f0f7-3b10-6ec4-e50ce4360d58"},"labelIndex":1,"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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"8ab9ba9e-f58a-302b-89c1-69e01e9b88a3","instanceIdentifier":"2b4f0a92-d2aa-3beb-49b3-a698f7933f4a","name":"","source":{"id":"27e4e5f8-585a-35b1-a830-be0f3cf20252","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"6a161850-f0f7-3b10-6ec4-e50ce4360d58"},"destination":{"id":"00c06b2e-8245-316d-a97b-72fbba2f0412","type":"OUTPUT_PORT","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"NGSI-LD Notification Data","instanceIdentifier":"94a05b48-b8b8-3e25-5d47-47f95251035d"},"labelIndex":1,"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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"b80f3ec5-87fc-32d0-807c-abed3e445ce5","instanceIdentifier":"aa7edc69-8332-31bd-b535-047237f491b3","name":"","source":{"id":"7d97f867-c218-3d56-ae3e-38a1f5cbefda","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ReplaceText","comments":"","instanceIdentifier":"c146feac-d294-3983-0f42-d26e5476deea"},"destination":{"id":"e8f81b8c-95ea-3799-bc06-c63b76d2d791","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"MergeContent","comments":"","instanceIdentifier":"e5020c1b-179b-36a8-3e75-7ccb369b34b5"},"labelIndex":1,"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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"521cc49f-a98c-3b41-bd16-8971c224f718","instanceIdentifier":"8450ffc4-dcb9-320c-8a10-80f30449c8bb","name":"","source":{"id":"5082c2a8-e27c-3b27-9e5c-76b3f19e8786","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"SplitContent","comments":"","instanceIdentifier":"2e282521-7877-3b7a-812f-ca3e6df97a4c"},"destination":{"id":"7d97f867-c218-3d56-ae3e-38a1f5cbefda","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ReplaceText","comments":"","instanceIdentifier":"c146feac-d294-3983-0f42-d26e5476deea"},"labelIndex":1,"zIndex":0,"selectedRelationships":["splits"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"448e93b5-6177-3d7b-9a15-512f8a9d8424","instanceIdentifier":"f727dee3-c15d-3d1d-2ba5-2be6209df410","name":"","source":{"id":"9d42a62b-b252-329c-b503-e614f090bbb3","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"GenerateFlowFile","comments":"","instanceIdentifier":"b6108686-fa26-35aa-6796-6da66f03aca2"},"destination":{"id":"5082c2a8-e27c-3b27-9e5c-76b3f19e8786","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"SplitContent","comments":"","instanceIdentifier":"2e282521-7877-3b7a-812f-ca3e6df97a4c"},"labelIndex":1,"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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"eef6d023-01bf-36dc-9004-41acd6dfd4aa","instanceIdentifier":"21e24e3a-e9f6-3477-09e3-efd82e156212","name":"","source":{"id":"1882950a-d3ae-37cd-97e0-bbfa5d644a92","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"InvokeHTTP","comments":"","instanceIdentifier":"cfe1da07-09cf-30fa-e691-9a837de63273"},"destination":{"id":"2d9d6ccc-a121-3c91-b674-26a4cea2d280","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"LogMessage","comments":"","instanceIdentifier":"a778dcf5-e545-33e2-50e0-09e876ea5e8e"},"labelIndex":1,"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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"2064fc94-5e87-3ea8-9f7d-5224b9daa0f6","instanceIdentifier":"c3dfc156-3c52-365e-29ee-c0925225d4a9","name":"","source":{"id":"e8f81b8c-95ea-3799-bc06-c63b76d2d791","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"MergeContent","comments":"","instanceIdentifier":"e5020c1b-179b-36a8-3e75-7ccb369b34b5"},"destination":{"id":"f10ef940-3e17-3703-b8ed-8131eb50e532","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ReplaceText","comments":"","instanceIdentifier":"058462c6-d5de-391c-46c2-d43ef1fb461d"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"984769e7-ec6a-34ca-97b6-c4f667e8bcdd","instanceIdentifier":"94448a53-a3f4-3dcb-703d-6c936e71193e","name":"","source":{"id":"f10ef940-3e17-3703-b8ed-8131eb50e532","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ReplaceText","comments":"","instanceIdentifier":"058462c6-d5de-391c-46c2-d43ef1fb461d"},"destination":{"id":"1882950a-d3ae-37cd-97e0-bbfa5d644a92","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"InvokeHTTP","comments":"","instanceIdentifier":"cfe1da07-09cf-30fa-e691-9a837de63273"},"labelIndex":1,"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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","instanceIdentifier":"33e180c7-cde8-3cd6-1f99-a65135ae4136","name":"NGSI-LD continuous Temporal Query ","comments":"","position":{"x":606.0,"y":967.0},"processGroups":[],"remoteProcessGroups":[],"processors":[{"identifier":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","instanceIdentifier":"04e8277e-72d3-3a15-6042-3562cc8f55e4","name":"GenerateFlowFile","comments":"","position":{"x":128.0,"y":0.0},"type":"org.apache.nifi.processors.standard.GenerateFlowFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"character-set":"UTF-8","File Size":"0B","mime-type":null,"generate-ff-custom-text":"${ENTITY_TYPES}","Batch Size":"1","Unique FlowFiles":"false","Data Format":"Text"},"propertyDescriptors":{"character-set":{"name":"character-set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"File Size":{"name":"File Size","displayName":"File Size","identifiesControllerService":false,"sensitive":false},"mime-type":{"name":"mime-type","displayName":"Mime Type","identifiesControllerService":false,"sensitive":false},"generate-ff-custom-text":{"name":"generate-ff-custom-text","displayName":"Custom Text","identifiesControllerService":false,"sensitive":false},"Batch Size":{"name":"Batch Size","displayName":"Batch Size","identifiesControllerService":false,"sensitive":false},"Unique FlowFiles":{"name":"Unique FlowFiles","displayName":"Unique FlowFiles","identifiesControllerService":false,"sensitive":false},"Data Format":{"name":"Data Format","displayName":"Data Format","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"1800 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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"3a35ae06-e813-3e9c-a06f-35e859e6917b","instanceIdentifier":"3d2e4d93-858d-3931-4a2c-1501786ce710","name":"SplitContent","comments":"","position":{"x":440.0,"y":320.0},"type":"org.apache.nifi.processors.standard.SplitContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Byte Sequence Location":"Trailing","Keep Byte Sequence":"false","Byte Sequence Format":"Text","Byte Sequence":","},"propertyDescriptors":{"Byte Sequence Location":{"name":"Byte Sequence Location","displayName":"Byte Sequence Location","identifiesControllerService":false,"sensitive":false},"Keep Byte Sequence":{"name":"Keep Byte Sequence","displayName":"Keep Byte Sequence","identifiesControllerService":false,"sensitive":false},"Byte Sequence Format":{"name":"Byte Sequence Format","displayName":"Byte Sequence Format","identifiesControllerService":false,"sensitive":false},"Byte Sequence":{"name":"Byte Sequence","displayName":"Byte Sequence","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","instanceIdentifier":"9ad21292-8a42-38b5-4434-e9f4d41cb5c7","name":"ExtractText","comments":"","position":{"x":904.0,"y":528.0},"type":"org.apache.nifi.processors.standard.ExtractText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Enable Unicode Predefined Character Classes":"false","Permit Whitespace and Comments in Pattern":"false","Enable Unicode-aware Case Folding":"false","Enable DOTALL Mode":"false","Enable Unix Lines Mode":"false","extract-text-enable-named-groups":"false","Maximum Buffer Size":"1 MB","Enable Canonical Equivalence":"false","callType":"(.*)","Enable Case-insensitive Matching":"false","Enable Multiline Mode":"false","Maximum Capture Group Length":"1024","Enable Literal Parsing of the Pattern":"false","Character Set":"UTF-8","Include Capture Group 0":"true","extract-text-enable-repeating-capture-group":"false"},"propertyDescriptors":{"Enable Unicode Predefined Character Classes":{"name":"Enable Unicode Predefined Character Classes","displayName":"Enable Unicode Predefined Character Classes","identifiesControllerService":false,"sensitive":false},"Permit Whitespace and Comments in Pattern":{"name":"Permit Whitespace and Comments in Pattern","displayName":"Permit Whitespace and Comments in Pattern","identifiesControllerService":false,"sensitive":false},"Enable Unicode-aware Case Folding":{"name":"Enable Unicode-aware Case Folding","displayName":"Enable Unicode-aware Case Folding","identifiesControllerService":false,"sensitive":false},"Enable DOTALL Mode":{"name":"Enable DOTALL Mode","displayName":"Enable DOTALL Mode","identifiesControllerService":false,"sensitive":false},"Enable Unix Lines Mode":{"name":"Enable Unix Lines Mode","displayName":"Enable Unix Lines Mode","identifiesControllerService":false,"sensitive":false},"extract-text-enable-named-groups":{"name":"extract-text-enable-named-groups","displayName":"Enable named group support","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Enable Canonical Equivalence":{"name":"Enable Canonical Equivalence","displayName":"Enable Canonical Equivalence","identifiesControllerService":false,"sensitive":false},"callType":{"name":"callType","displayName":"callType","identifiesControllerService":false,"sensitive":false},"Enable Case-insensitive Matching":{"name":"Enable Case-insensitive Matching","displayName":"Enable Case-insensitive Matching","identifiesControllerService":false,"sensitive":false},"Enable Multiline Mode":{"name":"Enable Multiline Mode","displayName":"Enable Multiline Mode","identifiesControllerService":false,"sensitive":false},"Maximum Capture Group Length":{"name":"Maximum Capture Group Length","displayName":"Maximum Capture Group Length","identifiesControllerService":false,"sensitive":false},"Enable Literal Parsing of the Pattern":{"name":"Enable Literal Parsing of the Pattern","displayName":"Enable Literal Parsing of the Pattern","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Include Capture Group 0":{"name":"Include Capture Group 0","displayName":"Include Capture Group 0","identifiesControllerService":false,"sensitive":false},"extract-text-enable-repeating-capture-group":{"name":"extract-text-enable-repeating-capture-group","displayName":"Enable repeating capture group","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"72d0db0d-c388-3ad8-a5eb-d22903025c21","instanceIdentifier":"c9835402-f944-3b71-783b-a3e945fe6395","name":"Get Temporal Entities","comments":"","position":{"x":1224.0,"y":336.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${NGSILD_HOST}/ngsi-ld/v1/temporal/entities?type=${callType}&timerel=after&timeAt=${now():minus(1800000):format(\"yyyy-MM-dd'T'HH:mm:ss'Z'\")}&timeproperty=modifiedAt","form-body-form-name":null,"Content-Type":"${mime.type}","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","Accept":"application/json","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Socket Write Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"GET","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"Accept":{"name":"Accept","displayName":"Accept","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Socket Write Timeout":{"name":"Socket Write Timeout","displayName":"Socket Write Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":4,"autoTerminatedRelationships":["No Retry","Retry","Original","Failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"inputPorts":[],"outputPorts":[{"identifier":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","instanceIdentifier":"d2f84fa4-8dea-3d43-d4a9-f054530a4aa3","name":"Temporal Entities","position":{"x":1359.0,"y":640.0},"type":"OUTPUT_PORT","concurrentlySchedulableTaskCount":1,"scheduledState":"ENABLED","allowRemoteAccess":false,"componentType":"OUTPUT_PORT","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"connections":[{"identifier":"ec2bac80-c735-3cc0-b25b-c604bee1f665","instanceIdentifier":"3245fe58-5950-3768-8691-27ce9a379e28","name":"","source":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"3d2e4d93-858d-3931-4a2c-1501786ce710"},"destination":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"9ad21292-8a42-38b5-4434-e9f4d41cb5c7"},"labelIndex":1,"zIndex":0,"selectedRelationships":["splits"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"9f89d7db-43e4-3c3c-92a3-92073c43e0a2","instanceIdentifier":"4655247a-0fee-3afa-ff0f-b7b6e9e72369","name":"","source":{"id":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"GenerateFlowFile","comments":"","instanceIdentifier":"04e8277e-72d3-3a15-6042-3562cc8f55e4"},"destination":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"3d2e4d93-858d-3931-4a2c-1501786ce710"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"8a3b5d07-1c05-32db-af76-450a23ad8821","instanceIdentifier":"938ebd21-ddcd-3e72-d51d-d3f2c2677526","name":"","source":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"9ad21292-8a42-38b5-4434-e9f4d41cb5c7"},"destination":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"c9835402-f944-3b71-783b-a3e945fe6395"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"5fb243ff-018c-3a57-bdf2-c0446fbb84f3","instanceIdentifier":"28f18276-88dc-399d-8218-eb05c6811cf3","name":"","source":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"c9835402-f944-3b71-783b-a3e945fe6395"},"destination":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"d2f84fa4-8dea-3d43-d4a9-f054530a4aa3"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"}],"remoteProcessGroups":[],"processors":[{"identifier":"c4f7a560-0d0d-3536-a195-0928f3ac2365","instanceIdentifier":"cf690d98-8e73-3765-07ab-eef66de3e984","name":"Make ND","comments":"","position":{"x":3407.717950590265,"y":719.738274311672},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n outputStream.write(bytearray(text.replace(\"@@@@@\", \"\\n\").encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"d83461a2-4bfa-366b-a557-3d03db37a25e","instanceIdentifier":"4196b2f5-00d9-3b4b-b810-49cb114da468","name":"LogMessage","comments":"","position":{"x":1118.0,"y":959.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"c095766a-273e-3b1a-b6eb-dcfaeb124893","instanceIdentifier":"1ed5a9d9-36f6-30df-c9b5-7b94c265e362","name":"LogMessage","comments":"","position":{"x":1438.0,"y":471.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"5c9d21bd-ae1c-394a-b53c-5fe9cdb4e81d","instanceIdentifier":"b7b75d87-881c-36c3-1344-3e1230d15d79","name":"EvaluateJsonPath","comments":"","position":{"x":1462.0,"y":687.0},"type":"org.apache.nifi.processors.standard.EvaluateJsonPath","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Destination":"flowfile-attribute","fhir.id":"$.id","Return Type":"json","Null Value Representation":"empty string","fhir.resourceType":"$.resourceType","Path Not Found Behavior":"ignore"},"propertyDescriptors":{"Destination":{"name":"Destination","displayName":"Destination","identifiesControllerService":false,"sensitive":false},"fhir.id":{"name":"fhir.id","displayName":"fhir.id","identifiesControllerService":false,"sensitive":false},"Return Type":{"name":"Return Type","displayName":"Return Type","identifiesControllerService":false,"sensitive":false},"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"fhir.resourceType":{"name":"fhir.resourceType","displayName":"fhir.resourceType","identifiesControllerService":false,"sensitive":false},"Path Not Found Behavior":{"name":"Path Not Found Behavior","displayName":"Path Not Found Behavior","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure","unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"67dc7b8e-46c2-396a-a160-c6e0694175ad","instanceIdentifier":"a5aadacd-55ec-30ae-d1dc-f0ddd2c8f980","name":"MergeContent","comments":"","position":{"x":2808.0,"y":608.0},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"0 B","Maximum number of Bins":"5","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":null,"Max Bin Age":null,"Demarcator File":"@@@@@","Correlation Attribute Name":null,"Header File":null,"mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"1"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"83e69090-3d02-3a08-ae8e-d7c5a52f18c7","instanceIdentifier":"9e5d9dd2-9752-3ba2-6b22-a0e78e5f5dc4","name":"Apply ID mapping","comments":"","position":{"x":2120.0,"y":808.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport csv\nimport java.io\nimport os\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass ReplaceIds(StreamCallback):\n \n mapping = {}\n \n def __init__(self):\n if os.path.isfile('/home/nifi/mapping.csv'):\n log.warn('found mapping file')\n with open('/home/nifi/mapping.csv') as csvfile:\n readFile = csv.reader(csvfile, delimiter=';')\n for row in readFile:\n log.warn(str(row))\n if row[0] in self.mapping:\n self.mapping[row[0]].append([row[1], row[2]])\n else:\n self.mapping[row[0]] = [[row[1], row[2]]]\n log.warn(str(self.mapping))\n \n def cleanValue(self, value):\n log.warn('cleaning value')\n log.warn('value type')\n log.warn(str(type(value)))\n if type(value) == str or type(value) == unicode:\n log.warn('value is str')\n value = value.replace(':', '_').replace('@', '_').replace('?', '_').replace('&', '_').replace('/', '_')\n log.warn(str(value))\n return value\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n if type(entities) != list:\n entities = [entities]\n mapping = self.mapping;\n log.warn(str(mapping))\n for entity in entities:\n for key, value in mapping.items():\n indexToCheck = [] \n splittedKey = key.split('/')\n for split in splittedKey:\n toCheck = entity\n for i in indexToCheck:\n toCheck = toCheck[i]\n if split.isnumeric():\n log.warn('split is numeric')\n log.warn(split)\n split = int(split)\n if type(toCheck) == dict:\n if split in toCheck.keys():\n indexToCheck.append(split)\n tmp = toCheck[split]\n if type(tmp) == dict and 'type' in tmp.keys():\n if tmp['type'] == 'Property':\n indexToCheck.append('value')\n elif tmp['type'] == 'Relationship':\n indexToCheck.append('object')\n else:\n indexToCheck = []\n break\n elif type(toCheck) == list and type(split) == int:\n if len(toCheck) > split:\n indexToCheck.append(split)\n else:\n indexToCheck = []\n break\n else:\n indexToCheck = []\n break\n if len(indexToCheck) > 0:\n toCheck = entity\n length = len(indexToCheck)\n log.warn('index to check')\n log.warn(str(indexToCheck))\n log.warn('value')\n log.warn(str(value))\n for mappings in value:\n log.warn('mappings')\n log.warn(str(mappings))\n found = False\n for i in range(length):\n log.warn('i')\n log.warn(str(i))\n index = indexToCheck[i]\n if i == length - 1:\n log.warn('setting value')\n if toCheck[index] == mappings[0]:\n found = True\n if mappings[1] != '':\n toCheck[index] = mappings[1]\n else:\n toCheck[index] = self.cleanValue(toCheck[index])\n elif mappings[0] == '':\n toCheck[index] = self.cleanValue(toCheck[index])\n else:\n toCheck = toCheck[index]\n if found:\n break\n log.warn('returning')\n log.warn(json.dumps(entities, indent=4))\n outputStream.write(bytearray(json.dumps(entities, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n log.warn('asdasdasdasdasd')\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# log.warn('asdasdasdasdasd')\n# try:\n# log.warn('asdasdasdasdasd')\n tmp = ReplaceIds()\n flowFile = session.write(flowFile, tmp)\n# log.warn('asdasdasdasdasd')\n# log.warn('asdasdasdasdasd')\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.warn(str(e))\n# log.warn(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","instanceIdentifier":"c304f6e0-e4e4-32b3-e379-14ddd2df8e62","name":"Get Single Entities","comments":"","position":{"x":1670.0,"y":1031.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass TransformJSON(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entity = json.loads(text)\n template = {'id': entity['id'], 'type': entity['type']}\n tmpList = []\n for attrsKey, attrsValue in entity.items():\n if attrsKey in ['id', 'type', 'modifiedAt', 'createdAt', 'observedAt']:\n continue\n for i in range(len(attrsValue)):\n if len(tmpList) == i:\n tmpEntity = template.copy()\n tmpList.append(tmpEntity)\n else:\n tmpEntity = tmpList[i]\n if type(attrsValue) == dict:\n tmpEntity[attrsKey] = attrsValue\n else:\n tmpEntity[attrsKey] = attrsValue[i]\n if 'observedAt' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['observedAt']\n if 'instanceId' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['instanceId']\n outputStream.write(bytearray(json.dumps(tmpList, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n flowFile = session.write(flowFile, TransformJSON())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"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":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"02135b05-548b-37f2-b5e2-5432f2fc1cac","instanceIdentifier":"ff49d711-9321-3c31-7cfa-b5cdd7fb547e","name":"ExecuteScript","comments":"","position":{"x":2771.5,"y":1015.75},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n result.extend(entity)\n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","instanceIdentifier":"1c364842-2773-34fe-834f-1a3d9870c414","name":"MergeContent","comments":"","position":{"x":2286.0,"y":1370.5},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"100 KB","Maximum number of Bins":"10","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":"]","Max Bin Age":"180 sec","Demarcator File":",","Correlation Attribute Name":null,"Header File":"[","mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"10"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"c40376cf-394f-3197-906d-d02057723fd6","instanceIdentifier":"1e2b9e3d-0656-31dd-0e51-9f2b26a53cff","name":"Call FHIR endpoint","comments":"","position":{"x":1878.0,"y":471.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${HL7_HOST}/${fhir.resourceType}/${fhir.id}\n","form-body-form-name":null,"Content-Type":"application/fhir+json","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Socket Write Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"POST","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Socket Write Timeout":{"name":"Socket Write Timeout","displayName":"Socket Write Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":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":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","instanceIdentifier":"0d84d052-cc76-3936-90ea-cca03f7ae72a","name":"SplitJson","comments":"","position":{"x":2280.0,"y":448.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","instanceIdentifier":"06618820-8cb0-3ee0-3e15-f30e434de436","name":"SplitJson","comments":"","position":{"x":1086.0,"y":1215.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","instanceIdentifier":"bdbc5929-b3fb-35ba-e67d-d8fe9e38c191","name":"NGSI-LD to HL7 FHIR","comments":"","position":{"x":2080.0,"y":992.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nimport os\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n forceArray = []\n def __init__(self):\n forceArrayStr = os.environ.get('FORCE_ARRAY', '')\n self.forceArray = forceArrayStr.split(',')\n\n def cleanKeys(self, subTmp):\n if type(subTmp) == list:\n result = []\n for i in subTmp:\n result.append(self.cleanKeys(subTmp))\n return result\n elif type(subTmp) == dict:\n result = {}\n for key, value in subTmp.items():\n key = key.split('/')[-1].split(':')[-1].split('#')[-1]\n result[key] = self.cleanKeys(value)\n return result\n else:\n return subTmp\n\n def getAttribute(self, value, attribKey):\n log.warn('attrib key: ' + attribKey)\n log.warn('value: ' + str(value))\n if type(value) == list:\n result = []\n for entry in value:\n subTmp = self.getAttribute(entry, attribKey)\n if subTmp:\n result.append(subTmp)\n elif type(value) == dict:\n result = {}\n for key, value in value.items():\n log.warn('sub key: ' + key)\n if not value:\n log.warn('value is none') \n else:\n log.warn('value: ' + str(value)) \n if key in ['type', 'createdAt', 'observedAt', 'modifiedAt']:\n log.warn('continue type ca oa ma')\n continue\n if key in ['value', 'object']:\n log.warn('value found')\n result['value'] = value\n else:\n log.warn('else ')\n subTmp = self.getAttribute(value, key)\n if subTmp:\n result[key] = subTmp\n if 'value' not in result.keys():\n log.warn('value not in result')\n log.warn(str(result))\n return None\n if len(result) == 1:\n result = result['value']\n else:\n if type(result['value']) == list:\n tmp = result['value']\n del result['value']\n tmp.append(result)\n result = tmp\n elif type(result['value']) == dict:\n tmp = result['value']\n del result['value']\n tmp.update(result)\n result = tmp\n else:\n result = value\n if attribKey in self.forceArray and type(result) != list:\n result = [result]\n return result\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n newEntity = {}\n if 'resourceType' not in entity.keys():\n entity['resourceType'] = {'type': 'Property', 'value': entity['type']}\n for key, value in entity.items():\n if key in ['id']:\n newEntity[key] = value\n continue\n if key in ['observedAt', 'modifiedAt', 'createdAt', 'type']:\n continue\n key = key.split('/')[-1].split(':')[-1].split('#')[-1]\n log.warn('calling from entity root with key ' + key)\n subTmp = self.getAttribute(value, key)\n if subTmp:\n log.warn('before clean')\n log.warn(str(subTmp))\n subTmp = self.cleanKeys(subTmp)\n log.warn('after clean')\n log.warn(str(subTmp))\n newEntity[key] = subTmp\n result.append(newEntity) \n \n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.warn(str(e))\n# log.warn(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"4546e1db-11b6-351e-83ef-44da3e693086","instanceIdentifier":"4469eb0b-9ce1-3406-9a02-4c62aba944ff","name":"PutFile","comments":"","position":{"x":3392.0,"y":368.0},"type":"org.apache.nifi.processors.standard.PutFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Group":null,"Owner":null,"Create Missing Directories":"true","Permissions":null,"Maximum File Count":null,"Last Modified Time":null,"Directory":"/home/nifi/download","Conflict Resolution Strategy":"fail"},"propertyDescriptors":{"Group":{"name":"Group","displayName":"Group","identifiesControllerService":false,"sensitive":false},"Owner":{"name":"Owner","displayName":"Owner","identifiesControllerService":false,"sensitive":false},"Create Missing Directories":{"name":"Create Missing Directories","displayName":"Create Missing Directories","identifiesControllerService":false,"sensitive":false},"Permissions":{"name":"Permissions","displayName":"Permissions","identifiesControllerService":false,"sensitive":false},"Maximum File Count":{"name":"Maximum File Count","displayName":"Maximum File Count","identifiesControllerService":false,"sensitive":false},"Last Modified Time":{"name":"Last Modified Time","displayName":"Last Modified Time","identifiesControllerService":false,"sensitive":false},"Directory":{"name":"Directory","displayName":"Directory","identifiesControllerService":false,"sensitive":false},"Conflict Resolution Strategy":{"name":"Conflict Resolution Strategy","displayName":"Conflict Resolution Strategy","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"}],"inputPorts":[],"outputPorts":[],"connections":[{"identifier":"57503fba-3217-3582-993f-83fcea78d73f","instanceIdentifier":"8439f315-2779-3c81-2eb8-110a568063de","name":"","source":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"SplitJson","comments":"","instanceIdentifier":"0d84d052-cc76-3936-90ea-cca03f7ae72a"},"destination":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"MergeContent","comments":"","instanceIdentifier":"a5aadacd-55ec-30ae-d1dc-f0ddd2c8f980"},"labelIndex":1,"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":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"559928a8-1282-3761-b9a0-2614e01ecadf","instanceIdentifier":"201eee40-8efb-30f6-6ef5-2e6941276ebb","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"Get Single Entities","comments":"","instanceIdentifier":"c304f6e0-e4e4-32b3-e379-14ddd2df8e62"},"destination":{"id":"d83461a2-4bfa-366b-a557-3d03db37a25e","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"LogMessage","comments":"","instanceIdentifier":"4196b2f5-00d9-3b4b-b810-49cb114da468"},"labelIndex":1,"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":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"2d9f4579-c187-32f1-82dc-41c936cc5d55","instanceIdentifier":"aef4914b-226b-3c67-60f7-9e7e783b33bd","name":"","source":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"SplitJson","comments":"","instanceIdentifier":"0d84d052-cc76-3936-90ea-cca03f7ae72a"},"destination":{"id":"5c9d21bd-ae1c-394a-b53c-5fe9cdb4e81d","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"b7b75d87-881c-36c3-1344-3e1230d15d79"},"labelIndex":1,"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":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"f10f582f-0979-3519-a7f9-db5a1207e47a","instanceIdentifier":"2473d1d7-3038-3d00-757b-f1fd4ccc672d","name":"","source":{"id":"c40376cf-394f-3197-906d-d02057723fd6","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"Call FHIR endpoint","comments":"","instanceIdentifier":"1e2b9e3d-0656-31dd-0e51-9f2b26a53cff"},"destination":{"id":"c095766a-273e-3b1a-b6eb-dcfaeb124893","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"LogMessage","comments":"","instanceIdentifier":"1ed5a9d9-36f6-30df-c9b5-7b94c265e362"},"labelIndex":1,"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":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"c5d12edb-0785-33c1-9c71-d55d75fcd0b5","instanceIdentifier":"a5e6c574-96c3-3588-8893-1448d39fefc0","name":"","source":{"id":"83e69090-3d02-3a08-ae8e-d7c5a52f18c7","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"Apply ID mapping","comments":"","instanceIdentifier":"9e5d9dd2-9752-3ba2-6b22-a0e78e5f5dc4"},"destination":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"SplitJson","comments":"","instanceIdentifier":"0d84d052-cc76-3936-90ea-cca03f7ae72a"},"labelIndex":1,"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":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"38c05b85-5f11-3f7f-80d6-c6b41a7fd75e","instanceIdentifier":"8d7041f7-3e9e-3014-0e6f-9e096a59d078","name":"","source":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"MergeContent","comments":"","instanceIdentifier":"1c364842-2773-34fe-834f-1a3d9870c414"},"destination":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"ExecuteScript","comments":"","instanceIdentifier":"ff49d711-9321-3c31-7cfa-b5cdd7fb547e"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"044fe185-8789-3c80-b927-49da787a4971","instanceIdentifier":"a456c159-2eba-3c9a-02f9-f19bd574150c","name":"","source":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"Make ND","comments":"","instanceIdentifier":"cf690d98-8e73-3765-07ab-eef66de3e984"},"destination":{"id":"4546e1db-11b6-351e-83ef-44da3e693086","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"PutFile","comments":"","instanceIdentifier":"4469eb0b-9ce1-3406-9a02-4c62aba944ff"},"labelIndex":1,"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":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"d952c0da-248f-36b9-ae66-58a81f1e222e","instanceIdentifier":"75b9936f-b7e2-3146-6e6d-c1b295cad8af","name":"","source":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"ExecuteScript","comments":"","instanceIdentifier":"ff49d711-9321-3c31-7cfa-b5cdd7fb547e"},"destination":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"bdbc5929-b3fb-35ba-e67d-d8fe9e38c191"},"labelIndex":1,"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":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"e1ebafe5-9639-32a8-a7f6-7431948a7e40","instanceIdentifier":"4434b331-0968-3605-9fef-9a5f425fe544","name":"","source":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"d2f84fa4-8dea-3d43-d4a9-f054530a4aa3"},"destination":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"SplitJson","comments":"","instanceIdentifier":"06618820-8cb0-3ee0-3e15-f30e434de436"},"labelIndex":1,"zIndex":0,"selectedRelationships":[""],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"97865dec-8d71-32be-a945-079949480b3e","instanceIdentifier":"ba4089ca-d759-3c87-64a2-24bc21b08df7","name":"","source":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"MergeContent","comments":"","instanceIdentifier":"a5aadacd-55ec-30ae-d1dc-f0ddd2c8f980"},"destination":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"Make ND","comments":"","instanceIdentifier":"cf690d98-8e73-3765-07ab-eef66de3e984"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"44914c43-a3f5-3677-aaf3-fbd262635323","instanceIdentifier":"3719342d-fcbd-3fa7-8867-ed464d0dd733","name":"","source":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"bdbc5929-b3fb-35ba-e67d-d8fe9e38c191"},"destination":{"id":"83e69090-3d02-3a08-ae8e-d7c5a52f18c7","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"Apply ID mapping","comments":"","instanceIdentifier":"9e5d9dd2-9752-3ba2-6b22-a0e78e5f5dc4"},"labelIndex":1,"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":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"104da2d5-95a1-3c6a-b260-d54b7d12bf89","instanceIdentifier":"2983da33-9d3d-374f-23cf-1668b3a74c4f","name":"","source":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"SplitJson","comments":"","instanceIdentifier":"06618820-8cb0-3ee0-3e15-f30e434de436"},"destination":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"Get Single Entities","comments":"","instanceIdentifier":"c304f6e0-e4e4-32b3-e379-14ddd2df8e62"},"labelIndex":1,"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":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"f2c0b9b4-a173-3eb2-a7ec-3b2bb98f26eb","instanceIdentifier":"a9615373-7a61-3594-d4db-3ad4c983f262","name":"","source":{"id":"5c9d21bd-ae1c-394a-b53c-5fe9cdb4e81d","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"b7b75d87-881c-36c3-1344-3e1230d15d79"},"destination":{"id":"c40376cf-394f-3197-906d-d02057723fd6","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"Call FHIR endpoint","comments":"","instanceIdentifier":"1e2b9e3d-0656-31dd-0e51-9f2b26a53cff"},"labelIndex":1,"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":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"9e995a06-4b64-3a25-ac1e-6817aec991c6","instanceIdentifier":"a47698ba-0c64-3a94-39c4-f3411c5c2c04","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"Get Single Entities","comments":"","instanceIdentifier":"c304f6e0-e4e4-32b3-e379-14ddd2df8e62"},"destination":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"MergeContent","comments":"","instanceIdentifier":"1c364842-2773-34fe-834f-1a3d9870c414"},"labelIndex":1,"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":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"},{"identifier":"e30962c7-6445-3237-8b8b-253a6aaa0e0e","instanceIdentifier":"b1c44619-162e-3fba-f02a-4fc8dfdc123a","name":"","source":{"id":"00c06b2e-8245-316d-a97b-72fbba2f0412","type":"OUTPUT_PORT","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"NGSI-LD Notification Data","instanceIdentifier":"94a05b48-b8b8-3e25-5d47-47f95251035d"},"destination":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"bdbc5929-b3fb-35ba-e67d-d8fe9e38c191"},"labelIndex":1,"zIndex":0,"selectedRelationships":[""],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"23bb88d3-8f90-3f6d-b65f-885ec4f4e98a"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE"},"externalControllerServices":{},"parameterContexts":{},"flowEncodingVersion":"1.0","parameterProviders":{},"latest":false} \ No newline at end of file +{"flowContents":{"identifier":"17d2d7c5-2473-357b-bf6c-5685f329cade","instanceIdentifier":"fe35c9fb-018c-1000-4411-1cde1c5747b5","name":"NiFi Flow","comments":"","position":{"x":0.0,"y":0.0},"processGroups":[{"identifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437","instanceIdentifier":"f21a7f1a-e01a-3c3d-efe7-f1e7e045a980","name":"NGSI-LD Subscriptions","comments":"","position":{"x":494.0,"y":727.0},"processGroups":[],"remoteProcessGroups":[],"processors":[{"identifier":"5082c2a8-e27c-3b27-9e5c-76b3f19e8786","instanceIdentifier":"8d379efa-5962-3461-8759-dc9708637674","name":"SplitContent","comments":"","position":{"x":264.0,"y":432.0},"type":"org.apache.nifi.processors.standard.SplitContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Byte Sequence Location":"Trailing","Keep Byte Sequence":"false","Byte Sequence Format":"Text","Byte Sequence":","},"propertyDescriptors":{"Byte Sequence Location":{"name":"Byte Sequence Location","displayName":"Byte Sequence Location","identifiesControllerService":false,"sensitive":false},"Keep Byte Sequence":{"name":"Keep Byte Sequence","displayName":"Keep Byte Sequence","identifiesControllerService":false,"sensitive":false},"Byte Sequence Format":{"name":"Byte Sequence Format","displayName":"Byte Sequence Format","identifiesControllerService":false,"sensitive":false},"Byte Sequence":{"name":"Byte Sequence","displayName":"Byte Sequence","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"27e4e5f8-585a-35b1-a830-be0f3cf20252","instanceIdentifier":"7e94512b-bff6-3f47-8c21-4cecee4575f4","name":"EvaluateJsonPath","comments":"","position":{"x":1240.0,"y":280.0},"type":"org.apache.nifi.processors.standard.EvaluateJsonPath","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Destination":"flowfile-content","Return Type":"auto-detect","Null Value Representation":"empty string","JsonPaths":"$.data","Path Not Found Behavior":"ignore"},"propertyDescriptors":{"Destination":{"name":"Destination","displayName":"Destination","identifiesControllerService":false,"sensitive":false},"Return Type":{"name":"Return Type","displayName":"Return Type","identifiesControllerService":false,"sensitive":false},"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPaths":{"name":"JsonPaths","displayName":"JsonPaths","identifiesControllerService":false,"sensitive":false},"Path Not Found Behavior":{"name":"Path Not Found Behavior","displayName":"Path Not Found Behavior","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure","unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"7d97f867-c218-3d56-ae3e-38a1f5cbefda","instanceIdentifier":"f7088a8c-e327-3295-84e3-09dda55efb7f","name":"ReplaceText","comments":"","position":{"x":272.0,"y":608.0},"type":"org.apache.nifi.processors.standard.ReplaceText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Regular Expression":"([^ ]+)","Replacement Value":"{\"type\":\"$1\"}","Evaluation Mode":"Line-by-Line","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},"Replacement Value":{"name":"Replacement Value","displayName":"Replacement Value","identifiesControllerService":false,"sensitive":false},"Evaluation Mode":{"name":"Evaluation Mode","displayName":"Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Text to Prepend":{"name":"Text to Prepend","displayName":"Text to Prepend","identifiesControllerService":false,"sensitive":false},"Line-by-Line Evaluation Mode":{"name":"Line-by-Line Evaluation Mode","displayName":"Line-by-Line Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Replacement Strategy":{"name":"Replacement Strategy","displayName":"Replacement Strategy","identifiesControllerService":false,"sensitive":false},"Text to Append":{"name":"Text to Append","displayName":"Text to Append","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"e8f81b8c-95ea-3799-bc06-c63b76d2d791","instanceIdentifier":"14a6f270-aadd-3a56-9cab-896f62c06f76","name":"MergeContent","comments":"","position":{"x":336.0,"y":768.0},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"0 B","Maximum number of Bins":"5","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":null,"Max Bin Age":null,"Demarcator File":",","Correlation Attribute Name":null,"Header File":null,"mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"2"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"f10ef940-3e17-3703-b8ed-8131eb50e532","instanceIdentifier":"e1a3824d-2470-3350-61fa-4aee480ba1fc","name":"ReplaceText","comments":"","position":{"x":1064.0,"y":728.0},"type":"org.apache.nifi.processors.standard.ReplaceText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Regular Expression":"([^ ]+)","Replacement Value":"{\n\t\"id\": \"myspecial_sub_id:1234567\",\n\t\"type\": \"Subscription\",\n\t\"entities\": [\n\t\t$1\n\t],\n\t\"notification\": {\n\t\t\"endpoint\": {\n\t\t\t\"uri\": \"${NOTIFICATION_HOST}:${NOTIFICATION_PORT}/${NOTIFICATION_PATH}\",\n\t\t\t\"accept\": \"application/json\"\n\t\t}\n\t}\n}","Evaluation Mode":"Line-by-Line","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},"Replacement Value":{"name":"Replacement Value","displayName":"Replacement Value","identifiesControllerService":false,"sensitive":false},"Evaluation Mode":{"name":"Evaluation Mode","displayName":"Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Text to Prepend":{"name":"Text to Prepend","displayName":"Text to Prepend","identifiesControllerService":false,"sensitive":false},"Line-by-Line Evaluation Mode":{"name":"Line-by-Line Evaluation Mode","displayName":"Line-by-Line Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Replacement Strategy":{"name":"Replacement Strategy","displayName":"Replacement Strategy","identifiesControllerService":false,"sensitive":false},"Text to Append":{"name":"Text to Append","displayName":"Text to Append","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"1882950a-d3ae-37cd-97e0-bbfa5d644a92","instanceIdentifier":"b779e275-4d6e-3873-8d89-0c27329f91e2","name":"InvokeHTTP","comments":"","position":{"x":736.0,"y":184.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${NGSILD_HOST}/ngsi-ld/v1/subscriptions","form-body-form-name":null,"Content-Type":"application/json","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Socket Write Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"POST","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Socket Write Timeout":{"name":"Socket Write Timeout","displayName":"Socket Write Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"9d42a62b-b252-329c-b503-e614f090bbb3","instanceIdentifier":"41a638a0-d56e-32a8-2db0-f9693d561e0c","name":"GenerateFlowFile","comments":"","position":{"x":232.0,"y":200.0},"type":"org.apache.nifi.processors.standard.GenerateFlowFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"character-set":"UTF-8","File Size":"0B","mime-type":null,"generate-ff-custom-text":"${ENTITY_TYPES}","Batch Size":"1","Unique FlowFiles":"false","Data Format":"Text"},"propertyDescriptors":{"character-set":{"name":"character-set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"File Size":{"name":"File Size","displayName":"File Size","identifiesControllerService":false,"sensitive":false},"mime-type":{"name":"mime-type","displayName":"Mime Type","identifiesControllerService":false,"sensitive":false},"generate-ff-custom-text":{"name":"generate-ff-custom-text","displayName":"Custom Text","identifiesControllerService":false,"sensitive":false},"Batch Size":{"name":"Batch Size","displayName":"Batch Size","identifiesControllerService":false,"sensitive":false},"Unique FlowFiles":{"name":"Unique FlowFiles","displayName":"Unique FlowFiles","identifiesControllerService":false,"sensitive":false},"Data Format":{"name":"Data Format","displayName":"Data Format","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"1 min","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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"620bf838-a2db-3460-adf5-807f3e18cd21","instanceIdentifier":"31da7b46-90a9-30b4-063a-5c3b5eb34b05","name":"ListenHTTP","comments":"","position":{"x":896.0,"y":480.0},"type":"org.apache.nifi.processors.standard.ListenHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"authorized-issuer-dn-pattern":".*","multipart-request-max-size":"1 MB","record-writer":null,"HTTP Protocols":"HTTP_1_1","HTTP Headers to receive as Attributes (Regex)":null,"health-check-port":null,"Authorized DN Pattern":".*","max-thread-pool-size":"200","Base Path":"${NOTIFICATION_PATH}","multipart-read-buffer-size":"512 KB","SSL Context Service":null,"Max Unconfirmed Flowfile Time":"60 secs","Max Data to Receive per Second":null,"client-authentication":"AUTO","Return Code":"200","record-reader":null,"Listening Port":"${NOTIFICATION_PORT}"},"propertyDescriptors":{"authorized-issuer-dn-pattern":{"name":"authorized-issuer-dn-pattern","displayName":"Authorized Issuer DN Pattern","identifiesControllerService":false,"sensitive":false},"multipart-request-max-size":{"name":"multipart-request-max-size","displayName":"Multipart Request Max Size","identifiesControllerService":false,"sensitive":false},"record-writer":{"name":"record-writer","displayName":"Record Writer","identifiesControllerService":true,"sensitive":false},"HTTP Protocols":{"name":"HTTP Protocols","displayName":"HTTP Protocols","identifiesControllerService":false,"sensitive":false},"HTTP Headers to receive as Attributes (Regex)":{"name":"HTTP Headers to receive as Attributes (Regex)","displayName":"HTTP Headers to receive as Attributes (Regex)","identifiesControllerService":false,"sensitive":false},"health-check-port":{"name":"health-check-port","displayName":"Listening Port for Health Check Requests","identifiesControllerService":false,"sensitive":false},"Authorized DN Pattern":{"name":"Authorized DN Pattern","displayName":"Authorized Subject DN Pattern","identifiesControllerService":false,"sensitive":false},"max-thread-pool-size":{"name":"max-thread-pool-size","displayName":"Maximum Thread Pool Size","identifiesControllerService":false,"sensitive":false},"Base Path":{"name":"Base Path","displayName":"Base Path","identifiesControllerService":false,"sensitive":false},"multipart-read-buffer-size":{"name":"multipart-read-buffer-size","displayName":"Multipart Read Buffer Size","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Max Unconfirmed Flowfile Time":{"name":"Max Unconfirmed Flowfile Time","displayName":"Max Unconfirmed Flowfile Time","identifiesControllerService":false,"sensitive":false},"Max Data to Receive per Second":{"name":"Max Data to Receive per Second","displayName":"Max Data to Receive per Second","identifiesControllerService":false,"sensitive":false},"client-authentication":{"name":"client-authentication","displayName":"Client Authentication","identifiesControllerService":false,"sensitive":false},"Return Code":{"name":"Return Code","displayName":"Return Code","identifiesControllerService":false,"sensitive":false},"record-reader":{"name":"record-reader","displayName":"Record Reader","identifiesControllerService":true,"sensitive":false},"Listening Port":{"name":"Listening Port","displayName":"Listening Port","identifiesControllerService":false,"sensitive":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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"2d9d6ccc-a121-3c91-b674-26a4cea2d280","instanceIdentifier":"c53d0fd7-f481-3e6c-5bea-abbcfbee889e","name":"LogMessage","comments":"","position":{"x":1280.0,"y":-8.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"}],"inputPorts":[],"outputPorts":[{"identifier":"00c06b2e-8245-316d-a97b-72fbba2f0412","instanceIdentifier":"3b66b0c0-2629-3417-7141-83fbfacab4e5","name":"NGSI-LD Notification Data","position":{"x":1464.0,"y":656.0},"type":"OUTPUT_PORT","concurrentlySchedulableTaskCount":1,"scheduledState":"ENABLED","allowRemoteAccess":false,"componentType":"OUTPUT_PORT","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"}],"connections":[{"identifier":"5059ad9c-ece9-3534-94c9-d465869bf283","instanceIdentifier":"73dad067-a61b-3499-4e4b-c8e8f66ba319","name":"","source":{"id":"620bf838-a2db-3460-adf5-807f3e18cd21","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ListenHTTP","comments":"","instanceIdentifier":"31da7b46-90a9-30b4-063a-5c3b5eb34b05"},"destination":{"id":"27e4e5f8-585a-35b1-a830-be0f3cf20252","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"7e94512b-bff6-3f47-8c21-4cecee4575f4"},"labelIndex":1,"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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"8ab9ba9e-f58a-302b-89c1-69e01e9b88a3","instanceIdentifier":"74499b65-94c3-3a0a-4216-a32c57a180d0","name":"","source":{"id":"27e4e5f8-585a-35b1-a830-be0f3cf20252","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"7e94512b-bff6-3f47-8c21-4cecee4575f4"},"destination":{"id":"00c06b2e-8245-316d-a97b-72fbba2f0412","type":"OUTPUT_PORT","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"NGSI-LD Notification Data","instanceIdentifier":"3b66b0c0-2629-3417-7141-83fbfacab4e5"},"labelIndex":1,"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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"b80f3ec5-87fc-32d0-807c-abed3e445ce5","instanceIdentifier":"4425a6d7-9b2d-3d71-fabc-77cb4f59e528","name":"","source":{"id":"7d97f867-c218-3d56-ae3e-38a1f5cbefda","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ReplaceText","comments":"","instanceIdentifier":"f7088a8c-e327-3295-84e3-09dda55efb7f"},"destination":{"id":"e8f81b8c-95ea-3799-bc06-c63b76d2d791","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"MergeContent","comments":"","instanceIdentifier":"14a6f270-aadd-3a56-9cab-896f62c06f76"},"labelIndex":1,"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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"521cc49f-a98c-3b41-bd16-8971c224f718","instanceIdentifier":"476712df-57cf-3645-25fb-5d82f0661db9","name":"","source":{"id":"5082c2a8-e27c-3b27-9e5c-76b3f19e8786","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"SplitContent","comments":"","instanceIdentifier":"8d379efa-5962-3461-8759-dc9708637674"},"destination":{"id":"7d97f867-c218-3d56-ae3e-38a1f5cbefda","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ReplaceText","comments":"","instanceIdentifier":"f7088a8c-e327-3295-84e3-09dda55efb7f"},"labelIndex":1,"zIndex":0,"selectedRelationships":["splits"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"448e93b5-6177-3d7b-9a15-512f8a9d8424","instanceIdentifier":"6ee5ab91-8319-352f-bf55-671c81a2f4b4","name":"","source":{"id":"9d42a62b-b252-329c-b503-e614f090bbb3","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"GenerateFlowFile","comments":"","instanceIdentifier":"41a638a0-d56e-32a8-2db0-f9693d561e0c"},"destination":{"id":"5082c2a8-e27c-3b27-9e5c-76b3f19e8786","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"SplitContent","comments":"","instanceIdentifier":"8d379efa-5962-3461-8759-dc9708637674"},"labelIndex":1,"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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"eef6d023-01bf-36dc-9004-41acd6dfd4aa","instanceIdentifier":"17f5d33b-29a9-36d9-7110-1f313c672dc4","name":"","source":{"id":"1882950a-d3ae-37cd-97e0-bbfa5d644a92","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"InvokeHTTP","comments":"","instanceIdentifier":"b779e275-4d6e-3873-8d89-0c27329f91e2"},"destination":{"id":"2d9d6ccc-a121-3c91-b674-26a4cea2d280","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"LogMessage","comments":"","instanceIdentifier":"c53d0fd7-f481-3e6c-5bea-abbcfbee889e"},"labelIndex":1,"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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"2064fc94-5e87-3ea8-9f7d-5224b9daa0f6","instanceIdentifier":"b497081b-d14a-3848-1050-1afc3deb8589","name":"","source":{"id":"e8f81b8c-95ea-3799-bc06-c63b76d2d791","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"MergeContent","comments":"","instanceIdentifier":"14a6f270-aadd-3a56-9cab-896f62c06f76"},"destination":{"id":"f10ef940-3e17-3703-b8ed-8131eb50e532","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ReplaceText","comments":"","instanceIdentifier":"e1a3824d-2470-3350-61fa-4aee480ba1fc"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"984769e7-ec6a-34ca-97b6-c4f667e8bcdd","instanceIdentifier":"958574c1-5952-339f-58c4-190aa9049379","name":"","source":{"id":"f10ef940-3e17-3703-b8ed-8131eb50e532","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ReplaceText","comments":"","instanceIdentifier":"e1a3824d-2470-3350-61fa-4aee480ba1fc"},"destination":{"id":"1882950a-d3ae-37cd-97e0-bbfa5d644a92","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"InvokeHTTP","comments":"","instanceIdentifier":"b779e275-4d6e-3873-8d89-0c27329f91e2"},"labelIndex":1,"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":"93491341-5bcf-3f1a-9be2-21eeb11c7437"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","instanceIdentifier":"fe70e028-9f38-3960-58c8-2ff1654d7099","name":"NGSI-LD continuous Temporal Query ","comments":"","position":{"x":606.0,"y":967.0},"processGroups":[],"remoteProcessGroups":[],"processors":[{"identifier":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","instanceIdentifier":"efdb5748-7e86-325b-c34e-2066934d0084","name":"GenerateFlowFile","comments":"","position":{"x":128.0,"y":0.0},"type":"org.apache.nifi.processors.standard.GenerateFlowFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"character-set":"UTF-8","File Size":"0B","mime-type":null,"generate-ff-custom-text":"${ENTITY_TYPES}","Batch Size":"1","Unique FlowFiles":"false","Data Format":"Text"},"propertyDescriptors":{"character-set":{"name":"character-set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"File Size":{"name":"File Size","displayName":"File Size","identifiesControllerService":false,"sensitive":false},"mime-type":{"name":"mime-type","displayName":"Mime Type","identifiesControllerService":false,"sensitive":false},"generate-ff-custom-text":{"name":"generate-ff-custom-text","displayName":"Custom Text","identifiesControllerService":false,"sensitive":false},"Batch Size":{"name":"Batch Size","displayName":"Batch Size","identifiesControllerService":false,"sensitive":false},"Unique FlowFiles":{"name":"Unique FlowFiles","displayName":"Unique FlowFiles","identifiesControllerService":false,"sensitive":false},"Data Format":{"name":"Data Format","displayName":"Data Format","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"1800 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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"3a35ae06-e813-3e9c-a06f-35e859e6917b","instanceIdentifier":"900153a5-671e-3d8c-3df9-81302d6beb9f","name":"SplitContent","comments":"","position":{"x":440.0,"y":320.0},"type":"org.apache.nifi.processors.standard.SplitContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Byte Sequence Location":"Trailing","Keep Byte Sequence":"false","Byte Sequence Format":"Text","Byte Sequence":","},"propertyDescriptors":{"Byte Sequence Location":{"name":"Byte Sequence Location","displayName":"Byte Sequence Location","identifiesControllerService":false,"sensitive":false},"Keep Byte Sequence":{"name":"Keep Byte Sequence","displayName":"Keep Byte Sequence","identifiesControllerService":false,"sensitive":false},"Byte Sequence Format":{"name":"Byte Sequence Format","displayName":"Byte Sequence Format","identifiesControllerService":false,"sensitive":false},"Byte Sequence":{"name":"Byte Sequence","displayName":"Byte Sequence","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","instanceIdentifier":"0ae7a3d0-482e-3419-c2f8-97f8623a165a","name":"ExtractText","comments":"","position":{"x":904.0,"y":528.0},"type":"org.apache.nifi.processors.standard.ExtractText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Enable Unicode Predefined Character Classes":"false","Permit Whitespace and Comments in Pattern":"false","Enable Unicode-aware Case Folding":"false","Enable DOTALL Mode":"false","Enable Unix Lines Mode":"false","extract-text-enable-named-groups":"false","Maximum Buffer Size":"1 MB","Enable Canonical Equivalence":"false","callType":"(.*)","Enable Case-insensitive Matching":"false","Enable Multiline Mode":"false","Maximum Capture Group Length":"1024","Enable Literal Parsing of the Pattern":"false","Character Set":"UTF-8","Include Capture Group 0":"true","extract-text-enable-repeating-capture-group":"false"},"propertyDescriptors":{"Enable Unicode Predefined Character Classes":{"name":"Enable Unicode Predefined Character Classes","displayName":"Enable Unicode Predefined Character Classes","identifiesControllerService":false,"sensitive":false},"Permit Whitespace and Comments in Pattern":{"name":"Permit Whitespace and Comments in Pattern","displayName":"Permit Whitespace and Comments in Pattern","identifiesControllerService":false,"sensitive":false},"Enable Unicode-aware Case Folding":{"name":"Enable Unicode-aware Case Folding","displayName":"Enable Unicode-aware Case Folding","identifiesControllerService":false,"sensitive":false},"Enable DOTALL Mode":{"name":"Enable DOTALL Mode","displayName":"Enable DOTALL Mode","identifiesControllerService":false,"sensitive":false},"Enable Unix Lines Mode":{"name":"Enable Unix Lines Mode","displayName":"Enable Unix Lines Mode","identifiesControllerService":false,"sensitive":false},"extract-text-enable-named-groups":{"name":"extract-text-enable-named-groups","displayName":"Enable named group support","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Enable Canonical Equivalence":{"name":"Enable Canonical Equivalence","displayName":"Enable Canonical Equivalence","identifiesControllerService":false,"sensitive":false},"callType":{"name":"callType","displayName":"callType","identifiesControllerService":false,"sensitive":false},"Enable Case-insensitive Matching":{"name":"Enable Case-insensitive Matching","displayName":"Enable Case-insensitive Matching","identifiesControllerService":false,"sensitive":false},"Enable Multiline Mode":{"name":"Enable Multiline Mode","displayName":"Enable Multiline Mode","identifiesControllerService":false,"sensitive":false},"Maximum Capture Group Length":{"name":"Maximum Capture Group Length","displayName":"Maximum Capture Group Length","identifiesControllerService":false,"sensitive":false},"Enable Literal Parsing of the Pattern":{"name":"Enable Literal Parsing of the Pattern","displayName":"Enable Literal Parsing of the Pattern","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Include Capture Group 0":{"name":"Include Capture Group 0","displayName":"Include Capture Group 0","identifiesControllerService":false,"sensitive":false},"extract-text-enable-repeating-capture-group":{"name":"extract-text-enable-repeating-capture-group","displayName":"Enable repeating capture group","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"72d0db0d-c388-3ad8-a5eb-d22903025c21","instanceIdentifier":"2a128e67-72bc-36a9-588c-3d26cb1ed9e7","name":"Get Temporal Entities","comments":"","position":{"x":1224.0,"y":336.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${NGSILD_HOST}/ngsi-ld/v1/temporal/entities?type=${callType}&timerel=after&timeAt=${now():minus(1800000):format(\"yyyy-MM-dd'T'HH:mm:ss'Z'\")}&timeproperty=modifiedAt","form-body-form-name":null,"Content-Type":"${mime.type}","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","Accept":"application/json","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Socket Write Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"GET","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"Accept":{"name":"Accept","displayName":"Accept","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Socket Write Timeout":{"name":"Socket Write Timeout","displayName":"Socket Write Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":4,"autoTerminatedRelationships":["No Retry","Retry","Original","Failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"inputPorts":[],"outputPorts":[{"identifier":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","instanceIdentifier":"862af9da-890a-3851-61a0-28898a4e6507","name":"Temporal Entities","position":{"x":1359.0,"y":640.0},"type":"OUTPUT_PORT","concurrentlySchedulableTaskCount":1,"scheduledState":"ENABLED","allowRemoteAccess":false,"componentType":"OUTPUT_PORT","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"connections":[{"identifier":"ec2bac80-c735-3cc0-b25b-c604bee1f665","instanceIdentifier":"3d2e2719-844c-3916-6aed-d4d6ccfbaf5e","name":"","source":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"900153a5-671e-3d8c-3df9-81302d6beb9f"},"destination":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"0ae7a3d0-482e-3419-c2f8-97f8623a165a"},"labelIndex":1,"zIndex":0,"selectedRelationships":["splits"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"9f89d7db-43e4-3c3c-92a3-92073c43e0a2","instanceIdentifier":"238b2d91-edbd-3ca9-f9a4-6a5ef0a0a2c1","name":"","source":{"id":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"GenerateFlowFile","comments":"","instanceIdentifier":"efdb5748-7e86-325b-c34e-2066934d0084"},"destination":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"900153a5-671e-3d8c-3df9-81302d6beb9f"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"8a3b5d07-1c05-32db-af76-450a23ad8821","instanceIdentifier":"68ec5431-bc21-3f4d-d521-70365e8f194f","name":"","source":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"0ae7a3d0-482e-3419-c2f8-97f8623a165a"},"destination":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"2a128e67-72bc-36a9-588c-3d26cb1ed9e7"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"5fb243ff-018c-3a57-bdf2-c0446fbb84f3","instanceIdentifier":"dc8e6b82-cf05-3ed8-7272-016f26f3a324","name":"","source":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"2a128e67-72bc-36a9-588c-3d26cb1ed9e7"},"destination":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"862af9da-890a-3851-61a0-28898a4e6507"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"}],"remoteProcessGroups":[],"processors":[{"identifier":"c4f7a560-0d0d-3536-a195-0928f3ac2365","instanceIdentifier":"8bdc6c6c-a2a7-3353-da6b-ec19395eef3c","name":"Make ND","comments":"","position":{"x":3407.717950590265,"y":719.738274311672},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n outputStream.write(bytearray(text.replace(\"@@@@@\", \"\\n\").encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"d83461a2-4bfa-366b-a557-3d03db37a25e","instanceIdentifier":"ab56403c-f4d4-346d-d358-9b70547d0016","name":"LogMessage","comments":"","position":{"x":1118.0,"y":959.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"c095766a-273e-3b1a-b6eb-dcfaeb124893","instanceIdentifier":"ceb98078-4502-395b-4e38-e8ca2e2e21b4","name":"LogMessage","comments":"","position":{"x":1438.0,"y":471.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"5c9d21bd-ae1c-394a-b53c-5fe9cdb4e81d","instanceIdentifier":"92f5b233-c741-37e5-e553-c800f3a203c4","name":"EvaluateJsonPath","comments":"","position":{"x":1462.0,"y":687.0},"type":"org.apache.nifi.processors.standard.EvaluateJsonPath","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Destination":"flowfile-attribute","fhir.id":"$.id","Return Type":"json","Null Value Representation":"empty string","fhir.resourceType":"$.resourceType","Path Not Found Behavior":"ignore"},"propertyDescriptors":{"Destination":{"name":"Destination","displayName":"Destination","identifiesControllerService":false,"sensitive":false},"fhir.id":{"name":"fhir.id","displayName":"fhir.id","identifiesControllerService":false,"sensitive":false},"Return Type":{"name":"Return Type","displayName":"Return Type","identifiesControllerService":false,"sensitive":false},"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"fhir.resourceType":{"name":"fhir.resourceType","displayName":"fhir.resourceType","identifiesControllerService":false,"sensitive":false},"Path Not Found Behavior":{"name":"Path Not Found Behavior","displayName":"Path Not Found Behavior","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure","unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"67dc7b8e-46c2-396a-a160-c6e0694175ad","instanceIdentifier":"edccf53c-bc3d-3715-9290-4d19830133e6","name":"MergeContent","comments":"","position":{"x":2808.0,"y":608.0},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"0 B","Maximum number of Bins":"5","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":null,"Max Bin Age":null,"Demarcator File":"@@@@@","Correlation Attribute Name":null,"Header File":null,"mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"1"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"83e69090-3d02-3a08-ae8e-d7c5a52f18c7","instanceIdentifier":"73d1a488-ea91-3841-21be-d1dc9e1e45c3","name":"Apply ID mapping","comments":"","position":{"x":2120.0,"y":808.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport csv\nimport java.io\nimport os\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass ReplaceIds(StreamCallback):\n \n mapping = {}\n \n def __init__(self):\n if os.path.isfile('/home/nifi/mapping.csv'):\n log.warn('found mapping file')\n with open('/home/nifi/mapping.csv') as csvfile:\n readFile = csv.reader(csvfile, delimiter=';')\n for row in readFile:\n log.warn(str(row))\n if row[0] in self.mapping:\n self.mapping[row[0]].append([row[1], row[2]])\n else:\n self.mapping[row[0]] = [[row[1], row[2]]]\n log.warn(str(self.mapping))\n \n def cleanValue(self, value):\n log.warn('cleaning value')\n log.warn('value type')\n log.warn(str(type(value)))\n if type(value) == str or type(value) == unicode:\n log.warn('value is str')\n value = value.replace(':', '_').replace('@', '_').replace('?', '_').replace('&', '_').replace('/', '_')\n log.warn(str(value))\n return value\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n if type(entities) != list:\n entities = [entities]\n mapping = self.mapping;\n log.warn(str(mapping))\n for entity in entities:\n for key, value in mapping.items():\n indexToCheck = [] \n splittedKey = key.split('/')\n for split in splittedKey:\n toCheck = entity\n for i in indexToCheck:\n toCheck = toCheck[i]\n if split.isnumeric():\n log.warn('split is numeric')\n log.warn(split)\n split = int(split)\n if type(toCheck) == dict:\n if split in toCheck.keys():\n indexToCheck.append(split)\n tmp = toCheck[split]\n if type(tmp) == dict and 'type' in tmp.keys():\n if tmp['type'] == 'Property':\n indexToCheck.append('value')\n elif tmp['type'] == 'Relationship':\n indexToCheck.append('object')\n else:\n indexToCheck = []\n break\n elif type(toCheck) == list and type(split) == int:\n if len(toCheck) > split:\n indexToCheck.append(split)\n else:\n indexToCheck = []\n break\n else:\n indexToCheck = []\n break\n if len(indexToCheck) > 0:\n toCheck = entity\n length = len(indexToCheck)\n log.warn('index to check')\n log.warn(str(indexToCheck))\n log.warn('value')\n log.warn(str(value))\n for mappings in value:\n log.warn('mappings')\n log.warn(str(mappings))\n found = False\n for i in range(length):\n log.warn('i')\n log.warn(str(i))\n index = indexToCheck[i]\n if i == length - 1:\n log.warn('setting value')\n if toCheck[index] == mappings[0]:\n found = True\n if mappings[1] != '':\n toCheck[index] = mappings[1]\n else:\n toCheck[index] = self.cleanValue(toCheck[index])\n elif mappings[0] == '':\n toCheck[index] = self.cleanValue(toCheck[index])\n else:\n toCheck = toCheck[index]\n if found:\n break\n log.warn('returning')\n log.warn(json.dumps(entities, indent=4))\n outputStream.write(bytearray(json.dumps(entities, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n log.warn('asdasdasdasdasd')\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# log.warn('asdasdasdasdasd')\n# try:\n# log.warn('asdasdasdasdasd')\n tmp = ReplaceIds()\n flowFile = session.write(flowFile, tmp)\n# log.warn('asdasdasdasdasd')\n# log.warn('asdasdasdasdasd')\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.warn(str(e))\n# log.warn(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","instanceIdentifier":"9e468cc9-e08b-3dd0-5c55-e4ffce0f4962","name":"Get Single Entities","comments":"","position":{"x":1670.0,"y":1031.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass TransformJSON(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entity = json.loads(text)\n template = {'id': entity['id'], 'type': entity['type']}\n tmpList = []\n for attrsKey, attrsValue in entity.items():\n if attrsKey in ['id', 'type', 'modifiedAt', 'createdAt', 'observedAt']:\n continue\n if type(attrsValue) == dict and 'type' in attrsValue.keys():\n attrsValue = [attrsValue]\n if type(attrsValue) != list:\n continue\n for i in range(len(attrsValue)):\n if len(tmpList) == i:\n tmpEntity = template.copy()\n tmpList.append(tmpEntity)\n else:\n tmpEntity = tmpList[i]\n if type(attrsValue) == dict:\n tmpEntity[attrsKey] = attrsValue\n else:\n tmpEntity[attrsKey] = attrsValue[i]\n if 'observedAt' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['observedAt']\n if 'instanceId' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['instanceId']\n outputStream.write(bytearray(json.dumps(tmpList, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n flowFile = session.write(flowFile, TransformJSON())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"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":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"02135b05-548b-37f2-b5e2-5432f2fc1cac","instanceIdentifier":"bd8c2552-1fed-3de0-bc60-177d71b6aa4c","name":"ExecuteScript","comments":"","position":{"x":2771.5,"y":1015.75},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n result.extend(entity)\n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","instanceIdentifier":"563d85ff-5340-31c7-f5db-68b7ae563215","name":"MergeContent","comments":"","position":{"x":2286.0,"y":1370.5},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"100 KB","Maximum number of Bins":"10","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":"]","Max Bin Age":"180 sec","Demarcator File":",","Correlation Attribute Name":null,"Header File":"[","mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"10"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","instanceIdentifier":"0da7b15e-0f61-33bc-c12b-114435ccaae7","name":"SplitJson","comments":"","position":{"x":1086.0,"y":1215.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"c40376cf-394f-3197-906d-d02057723fd6","instanceIdentifier":"c657f479-a153-3c55-18b2-43eb6c5af240","name":"Call FHIR endpoint","comments":"","position":{"x":1878.0,"y":471.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${HL7_HOST}/${fhir.resourceType}/${fhir.id}\n","form-body-form-name":null,"Content-Type":"application/fhir+json","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Socket Write Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"POST","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Socket Write Timeout":{"name":"Socket Write Timeout","displayName":"Socket Write Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":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":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","instanceIdentifier":"4e02f13f-436a-38a8-585d-21f551624264","name":"SplitJson","comments":"","position":{"x":2280.0,"y":448.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","instanceIdentifier":"058fbefc-1ef6-3453-7631-b4461504e7f4","name":"NGSI-LD to HL7 FHIR","comments":"","position":{"x":2080.0,"y":992.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nimport os\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n forceArray = []\n def __init__(self):\n forceArrayStr = os.environ.get('FORCE_ARRAY', '')\n self.forceArray = forceArrayStr.split(',')\n\n def cleanKeys(self, subTmp):\n if type(subTmp) == list:\n result = []\n for i in subTmp:\n result.append(self.cleanKeys(subTmp))\n return result\n elif type(subTmp) == dict:\n result = {}\n for key, value in subTmp.items():\n key = key.split('/')[-1].split(':')[-1].split('#')[-1]\n result[key] = self.cleanKeys(value)\n return result\n else:\n return subTmp\n\n def getAttribute(self, value, attribKey):\n log.warn('attrib key: ' + attribKey)\n log.warn('value: ' + str(value))\n if type(value) == list:\n result = []\n for entry in value:\n subTmp = self.getAttribute(entry, attribKey)\n if subTmp:\n result.append(subTmp)\n elif type(value) == dict:\n result = {}\n for key, value in value.items():\n log.warn('sub key: ' + key)\n if not value:\n log.warn('value is none') \n else:\n log.warn('value: ' + str(value)) \n if key in ['type', 'createdAt', 'observedAt', 'modifiedAt']:\n log.warn('continue type ca oa ma')\n continue\n if key in ['value', 'object']:\n log.warn('value found')\n result['value'] = value\n else:\n log.warn('else ')\n subTmp = self.getAttribute(value, key)\n if subTmp:\n result[key] = subTmp\n if 'value' not in result.keys():\n log.warn('value not in result')\n log.warn(str(result))\n return None\n if len(result) == 1:\n result = result['value']\n else:\n if type(result['value']) == list:\n tmp = result['value']\n del result['value']\n tmp.append(result)\n result = tmp\n elif type(result['value']) == dict:\n tmp = result['value']\n del result['value']\n tmp.update(result)\n result = tmp\n else:\n result = value\n if attribKey in self.forceArray and type(result) != list:\n result = [result]\n return result\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n newEntity = {}\n if 'resourceType' not in entity.keys():\n entity['resourceType'] = {'type': 'Property', 'value': entity['type']}\n for key, value in entity.items():\n if key in ['id']:\n newEntity[key] = value\n continue\n if key in ['observedAt', 'modifiedAt', 'createdAt', 'type']:\n continue\n key = key.split('/')[-1].split(':')[-1].split('#')[-1]\n log.warn('calling from entity root with key ' + key)\n subTmp = self.getAttribute(value, key)\n if subTmp:\n log.warn('before clean')\n log.warn(str(subTmp))\n subTmp = self.cleanKeys(subTmp)\n log.warn('after clean')\n log.warn(str(subTmp))\n newEntity[key] = subTmp\n result.append(newEntity) \n \n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.warn(str(e))\n# log.warn(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"4546e1db-11b6-351e-83ef-44da3e693086","instanceIdentifier":"912c43c9-a83d-3f0d-fd49-a45e4151e60f","name":"PutFile","comments":"","position":{"x":3392.0,"y":368.0},"type":"org.apache.nifi.processors.standard.PutFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Group":null,"Owner":null,"Create Missing Directories":"true","Permissions":null,"Maximum File Count":null,"Last Modified Time":null,"Directory":"/home/nifi/download","Conflict Resolution Strategy":"fail"},"propertyDescriptors":{"Group":{"name":"Group","displayName":"Group","identifiesControllerService":false,"sensitive":false},"Owner":{"name":"Owner","displayName":"Owner","identifiesControllerService":false,"sensitive":false},"Create Missing Directories":{"name":"Create Missing Directories","displayName":"Create Missing Directories","identifiesControllerService":false,"sensitive":false},"Permissions":{"name":"Permissions","displayName":"Permissions","identifiesControllerService":false,"sensitive":false},"Maximum File Count":{"name":"Maximum File Count","displayName":"Maximum File Count","identifiesControllerService":false,"sensitive":false},"Last Modified Time":{"name":"Last Modified Time","displayName":"Last Modified Time","identifiesControllerService":false,"sensitive":false},"Directory":{"name":"Directory","displayName":"Directory","identifiesControllerService":false,"sensitive":false},"Conflict Resolution Strategy":{"name":"Conflict Resolution Strategy","displayName":"Conflict Resolution Strategy","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"}],"inputPorts":[],"outputPorts":[],"connections":[{"identifier":"57503fba-3217-3582-993f-83fcea78d73f","instanceIdentifier":"8da2d276-4ffc-30d1-d04d-cb899404cb8f","name":"","source":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"SplitJson","comments":"","instanceIdentifier":"4e02f13f-436a-38a8-585d-21f551624264"},"destination":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"MergeContent","comments":"","instanceIdentifier":"edccf53c-bc3d-3715-9290-4d19830133e6"},"labelIndex":1,"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":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"2d9f4579-c187-32f1-82dc-41c936cc5d55","instanceIdentifier":"7c9d7cc8-5335-3722-d514-400c8e5c1910","name":"","source":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"SplitJson","comments":"","instanceIdentifier":"4e02f13f-436a-38a8-585d-21f551624264"},"destination":{"id":"5c9d21bd-ae1c-394a-b53c-5fe9cdb4e81d","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"92f5b233-c741-37e5-e553-c800f3a203c4"},"labelIndex":1,"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":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"559928a8-1282-3761-b9a0-2614e01ecadf","instanceIdentifier":"2f60f127-8b1f-369d-f93d-557562c27001","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"Get Single Entities","comments":"","instanceIdentifier":"9e468cc9-e08b-3dd0-5c55-e4ffce0f4962"},"destination":{"id":"d83461a2-4bfa-366b-a557-3d03db37a25e","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"LogMessage","comments":"","instanceIdentifier":"ab56403c-f4d4-346d-d358-9b70547d0016"},"labelIndex":1,"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":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"f10f582f-0979-3519-a7f9-db5a1207e47a","instanceIdentifier":"a292f238-436c-35e8-3b90-8a29e3a4e3ee","name":"","source":{"id":"c40376cf-394f-3197-906d-d02057723fd6","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"Call FHIR endpoint","comments":"","instanceIdentifier":"c657f479-a153-3c55-18b2-43eb6c5af240"},"destination":{"id":"c095766a-273e-3b1a-b6eb-dcfaeb124893","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"LogMessage","comments":"","instanceIdentifier":"ceb98078-4502-395b-4e38-e8ca2e2e21b4"},"labelIndex":1,"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":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"c5d12edb-0785-33c1-9c71-d55d75fcd0b5","instanceIdentifier":"e7d0dc9c-5ab2-3147-7f5e-413c7be57714","name":"","source":{"id":"83e69090-3d02-3a08-ae8e-d7c5a52f18c7","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"Apply ID mapping","comments":"","instanceIdentifier":"73d1a488-ea91-3841-21be-d1dc9e1e45c3"},"destination":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"SplitJson","comments":"","instanceIdentifier":"4e02f13f-436a-38a8-585d-21f551624264"},"labelIndex":1,"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":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"38c05b85-5f11-3f7f-80d6-c6b41a7fd75e","instanceIdentifier":"7586b4e3-453f-34cc-afd7-52396e925c75","name":"","source":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"MergeContent","comments":"","instanceIdentifier":"563d85ff-5340-31c7-f5db-68b7ae563215"},"destination":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"ExecuteScript","comments":"","instanceIdentifier":"bd8c2552-1fed-3de0-bc60-177d71b6aa4c"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"d952c0da-248f-36b9-ae66-58a81f1e222e","instanceIdentifier":"b9453285-fc7c-3ad1-e4fe-ec85f79fbd27","name":"","source":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"ExecuteScript","comments":"","instanceIdentifier":"bd8c2552-1fed-3de0-bc60-177d71b6aa4c"},"destination":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"058fbefc-1ef6-3453-7631-b4461504e7f4"},"labelIndex":1,"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":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"044fe185-8789-3c80-b927-49da787a4971","instanceIdentifier":"79088a2f-d886-3cc1-1069-e2b1c4a14cd1","name":"","source":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"Make ND","comments":"","instanceIdentifier":"8bdc6c6c-a2a7-3353-da6b-ec19395eef3c"},"destination":{"id":"4546e1db-11b6-351e-83ef-44da3e693086","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"PutFile","comments":"","instanceIdentifier":"912c43c9-a83d-3f0d-fd49-a45e4151e60f"},"labelIndex":1,"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":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"97865dec-8d71-32be-a945-079949480b3e","instanceIdentifier":"f5e78e15-84df-364d-8f37-bba0a3c0b3ff","name":"","source":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"MergeContent","comments":"","instanceIdentifier":"edccf53c-bc3d-3715-9290-4d19830133e6"},"destination":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"Make ND","comments":"","instanceIdentifier":"8bdc6c6c-a2a7-3353-da6b-ec19395eef3c"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"e1ebafe5-9639-32a8-a7f6-7431948a7e40","instanceIdentifier":"5135a28e-e5d5-3414-2f32-44e4be307ed0","name":"","source":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"862af9da-890a-3851-61a0-28898a4e6507"},"destination":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"SplitJson","comments":"","instanceIdentifier":"0da7b15e-0f61-33bc-c12b-114435ccaae7"},"labelIndex":1,"zIndex":0,"selectedRelationships":[""],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"44914c43-a3f5-3677-aaf3-fbd262635323","instanceIdentifier":"42f274a8-9555-3678-8f3c-5584228478c9","name":"","source":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"058fbefc-1ef6-3453-7631-b4461504e7f4"},"destination":{"id":"83e69090-3d02-3a08-ae8e-d7c5a52f18c7","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"Apply ID mapping","comments":"","instanceIdentifier":"73d1a488-ea91-3841-21be-d1dc9e1e45c3"},"labelIndex":1,"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":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"104da2d5-95a1-3c6a-b260-d54b7d12bf89","instanceIdentifier":"1faf9bb7-8dfb-31f8-957b-fbebba142755","name":"","source":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"SplitJson","comments":"","instanceIdentifier":"0da7b15e-0f61-33bc-c12b-114435ccaae7"},"destination":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"Get Single Entities","comments":"","instanceIdentifier":"9e468cc9-e08b-3dd0-5c55-e4ffce0f4962"},"labelIndex":1,"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":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"f2c0b9b4-a173-3eb2-a7ec-3b2bb98f26eb","instanceIdentifier":"af58e804-63d5-3933-eb68-05018970b00d","name":"","source":{"id":"5c9d21bd-ae1c-394a-b53c-5fe9cdb4e81d","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"92f5b233-c741-37e5-e553-c800f3a203c4"},"destination":{"id":"c40376cf-394f-3197-906d-d02057723fd6","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"Call FHIR endpoint","comments":"","instanceIdentifier":"c657f479-a153-3c55-18b2-43eb6c5af240"},"labelIndex":1,"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":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"9e995a06-4b64-3a25-ac1e-6817aec991c6","instanceIdentifier":"5def309f-4c15-3cc0-f222-aee0fe42a278","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"Get Single Entities","comments":"","instanceIdentifier":"9e468cc9-e08b-3dd0-5c55-e4ffce0f4962"},"destination":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"MergeContent","comments":"","instanceIdentifier":"563d85ff-5340-31c7-f5db-68b7ae563215"},"labelIndex":1,"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":"17d2d7c5-2473-357b-bf6c-5685f329cade"},{"identifier":"e30962c7-6445-3237-8b8b-253a6aaa0e0e","instanceIdentifier":"e34fab09-f326-3b47-83f2-b5aa3446c5a9","name":"","source":{"id":"00c06b2e-8245-316d-a97b-72fbba2f0412","type":"OUTPUT_PORT","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"NGSI-LD Notification Data","instanceIdentifier":"3b66b0c0-2629-3417-7141-83fbfacab4e5"},"destination":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"17d2d7c5-2473-357b-bf6c-5685f329cade","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"058fbefc-1ef6-3453-7631-b4461504e7f4"},"labelIndex":1,"zIndex":0,"selectedRelationships":[""],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"17d2d7c5-2473-357b-bf6c-5685f329cade"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE"},"externalControllerServices":{},"parameterContexts":{},"flowEncodingVersion":"1.0","parameterProviders":{},"latest":false} \ No newline at end of file diff --git a/tempInterval2File/NiFi_Flowtemporal2nd.json b/tempInterval2File/NiFi_Flowtemporal2nd.json index 1d8ad45..7e5ebc0 100644 --- a/tempInterval2File/NiFi_Flowtemporal2nd.json +++ b/tempInterval2File/NiFi_Flowtemporal2nd.json @@ -1 +1 @@ -{"flowContents":{"identifier":"27175373-0ee9-347d-821a-50475be0e60a","instanceIdentifier":"6d47e8bf-018c-1000-6f76-f50008f7a1f0","name":"NiFi Flow","comments":"","position":{"x":0.0,"y":0.0},"processGroups":[{"identifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","instanceIdentifier":"4cebcd38-dcca-36ac-f3bd-7621462c3971","name":"NGSI-LD continuous Temporal Query ","comments":"","position":{"x":606.0,"y":967.0},"processGroups":[],"remoteProcessGroups":[],"processors":[{"identifier":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","instanceIdentifier":"47662b3a-33bd-345b-50ce-738f55b057aa","name":"GenerateFlowFile","comments":"","position":{"x":128.0,"y":0.0},"type":"org.apache.nifi.processors.standard.GenerateFlowFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"character-set":"UTF-8","File Size":"0B","mime-type":null,"generate-ff-custom-text":"${ENTITY_TYPES}","Batch Size":"1","Unique FlowFiles":"false","Data Format":"Text"},"propertyDescriptors":{"character-set":{"name":"character-set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"File Size":{"name":"File Size","displayName":"File Size","identifiesControllerService":false,"sensitive":false},"mime-type":{"name":"mime-type","displayName":"Mime Type","identifiesControllerService":false,"sensitive":false},"generate-ff-custom-text":{"name":"generate-ff-custom-text","displayName":"Custom Text","identifiesControllerService":false,"sensitive":false},"Batch Size":{"name":"Batch Size","displayName":"Batch Size","identifiesControllerService":false,"sensitive":false},"Unique FlowFiles":{"name":"Unique FlowFiles","displayName":"Unique FlowFiles","identifiesControllerService":false,"sensitive":false},"Data Format":{"name":"Data Format","displayName":"Data Format","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"1800 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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"3a35ae06-e813-3e9c-a06f-35e859e6917b","instanceIdentifier":"38b2160e-1c53-370b-e4e3-6a5557e4cf07","name":"SplitContent","comments":"","position":{"x":440.0,"y":320.0},"type":"org.apache.nifi.processors.standard.SplitContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Byte Sequence Location":"Trailing","Keep Byte Sequence":"false","Byte Sequence Format":"Text","Byte Sequence":","},"propertyDescriptors":{"Byte Sequence Location":{"name":"Byte Sequence Location","displayName":"Byte Sequence Location","identifiesControllerService":false,"sensitive":false},"Keep Byte Sequence":{"name":"Keep Byte Sequence","displayName":"Keep Byte Sequence","identifiesControllerService":false,"sensitive":false},"Byte Sequence Format":{"name":"Byte Sequence Format","displayName":"Byte Sequence Format","identifiesControllerService":false,"sensitive":false},"Byte Sequence":{"name":"Byte Sequence","displayName":"Byte Sequence","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","instanceIdentifier":"fd76b26a-3d09-3ba1-07d5-a6d2f9f58e55","name":"ExtractText","comments":"","position":{"x":904.0,"y":528.0},"type":"org.apache.nifi.processors.standard.ExtractText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Enable Unicode Predefined Character Classes":"false","Permit Whitespace and Comments in Pattern":"false","Enable Unicode-aware Case Folding":"false","Enable DOTALL Mode":"false","Enable Unix Lines Mode":"false","extract-text-enable-named-groups":"false","Maximum Buffer Size":"1 MB","Enable Canonical Equivalence":"false","callType":"(.*)","Enable Case-insensitive Matching":"false","Enable Multiline Mode":"false","Maximum Capture Group Length":"1024","Enable Literal Parsing of the Pattern":"false","Character Set":"UTF-8","Include Capture Group 0":"true","extract-text-enable-repeating-capture-group":"false"},"propertyDescriptors":{"Enable Unicode Predefined Character Classes":{"name":"Enable Unicode Predefined Character Classes","displayName":"Enable Unicode Predefined Character Classes","identifiesControllerService":false,"sensitive":false},"Permit Whitespace and Comments in Pattern":{"name":"Permit Whitespace and Comments in Pattern","displayName":"Permit Whitespace and Comments in Pattern","identifiesControllerService":false,"sensitive":false},"Enable Unicode-aware Case Folding":{"name":"Enable Unicode-aware Case Folding","displayName":"Enable Unicode-aware Case Folding","identifiesControllerService":false,"sensitive":false},"Enable DOTALL Mode":{"name":"Enable DOTALL Mode","displayName":"Enable DOTALL Mode","identifiesControllerService":false,"sensitive":false},"Enable Unix Lines Mode":{"name":"Enable Unix Lines Mode","displayName":"Enable Unix Lines Mode","identifiesControllerService":false,"sensitive":false},"extract-text-enable-named-groups":{"name":"extract-text-enable-named-groups","displayName":"Enable named group support","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Enable Canonical Equivalence":{"name":"Enable Canonical Equivalence","displayName":"Enable Canonical Equivalence","identifiesControllerService":false,"sensitive":false},"callType":{"name":"callType","displayName":"callType","identifiesControllerService":false,"sensitive":false},"Enable Case-insensitive Matching":{"name":"Enable Case-insensitive Matching","displayName":"Enable Case-insensitive Matching","identifiesControllerService":false,"sensitive":false},"Enable Multiline Mode":{"name":"Enable Multiline Mode","displayName":"Enable Multiline Mode","identifiesControllerService":false,"sensitive":false},"Maximum Capture Group Length":{"name":"Maximum Capture Group Length","displayName":"Maximum Capture Group Length","identifiesControllerService":false,"sensitive":false},"Enable Literal Parsing of the Pattern":{"name":"Enable Literal Parsing of the Pattern","displayName":"Enable Literal Parsing of the Pattern","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Include Capture Group 0":{"name":"Include Capture Group 0","displayName":"Include Capture Group 0","identifiesControllerService":false,"sensitive":false},"extract-text-enable-repeating-capture-group":{"name":"extract-text-enable-repeating-capture-group","displayName":"Enable repeating capture group","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"72d0db0d-c388-3ad8-a5eb-d22903025c21","instanceIdentifier":"55ca63bb-43ea-3cca-fbc6-b3717d8de5fe","name":"Get Temporal Entities","comments":"","position":{"x":1224.0,"y":336.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${NGSILD_HOST}/ngsi-ld/v1/temporal/entities?type=${callType}&timerel=after&timeAt=${now():minus(1800000):format(\"yyyy-MM-dd'T'HH:mm:ss'Z'\")}&timeproperty=modifiedAt","form-body-form-name":null,"Content-Type":"${mime.type}","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","Accept":"application/json","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Socket Write Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"GET","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"Accept":{"name":"Accept","displayName":"Accept","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Socket Write Timeout":{"name":"Socket Write Timeout","displayName":"Socket Write Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":4,"autoTerminatedRelationships":["No Retry","Retry","Original","Failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"inputPorts":[],"outputPorts":[{"identifier":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","instanceIdentifier":"a43fa916-a14c-3483-f343-b04b7f98a5f7","name":"Temporal Entities","position":{"x":1359.0,"y":640.0},"type":"OUTPUT_PORT","concurrentlySchedulableTaskCount":1,"scheduledState":"ENABLED","allowRemoteAccess":false,"componentType":"OUTPUT_PORT","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"connections":[{"identifier":"ec2bac80-c735-3cc0-b25b-c604bee1f665","instanceIdentifier":"462cdca3-771f-3de2-fae8-4f9c64ed5e87","name":"","source":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"38b2160e-1c53-370b-e4e3-6a5557e4cf07"},"destination":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"fd76b26a-3d09-3ba1-07d5-a6d2f9f58e55"},"labelIndex":1,"zIndex":0,"selectedRelationships":["splits"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"9f89d7db-43e4-3c3c-92a3-92073c43e0a2","instanceIdentifier":"9e8cb3b1-e74f-3d54-36c0-98d8c7360645","name":"","source":{"id":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"GenerateFlowFile","comments":"","instanceIdentifier":"47662b3a-33bd-345b-50ce-738f55b057aa"},"destination":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"38b2160e-1c53-370b-e4e3-6a5557e4cf07"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"8a3b5d07-1c05-32db-af76-450a23ad8821","instanceIdentifier":"d1f4fee8-50e3-3c3c-eaa3-0c835b9b8c15","name":"","source":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"fd76b26a-3d09-3ba1-07d5-a6d2f9f58e55"},"destination":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"55ca63bb-43ea-3cca-fbc6-b3717d8de5fe"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"5fb243ff-018c-3a57-bdf2-c0446fbb84f3","instanceIdentifier":"b16a01e8-31ce-38e2-0a64-0000f9aae72f","name":"","source":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"55ca63bb-43ea-3cca-fbc6-b3717d8de5fe"},"destination":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"a43fa916-a14c-3483-f343-b04b7f98a5f7"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"}],"remoteProcessGroups":[],"processors":[{"identifier":"83e69090-3d02-3a08-ae8e-d7c5a52f18c7","instanceIdentifier":"93de8fbd-9853-3180-101e-370cdc5308a7","name":"Apply ID mapping","comments":"","position":{"x":2120.0,"y":808.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport csv\nimport java.io\nimport os\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass ReplaceIds(StreamCallback):\n \n mapping = {}\n \n def __init__(self):\n if os.path.isfile('/home/nifi/mapping.csv'):\n log.warn('found mapping file')\n with open('/home/nifi/mapping.csv') as csvfile:\n readFile = csv.reader(csvfile, delimiter=';')\n for row in readFile:\n log.warn(str(row))\n if row[0] in self.mapping:\n self.mapping[row[0]].append([row[1], row[2]])\n else:\n self.mapping[row[0]] = [[row[1], row[2]]]\n log.warn(str(self.mapping))\n \n def cleanValue(self, value):\n log.warn('cleaning value')\n log.warn('value type')\n log.warn(str(type(value)))\n if type(value) == str or type(value) == unicode:\n log.warn('value is str')\n value = value.replace(':', '_').replace('@', '_').replace('?', '_').replace('&', '_').replace('/', '_')\n log.warn(str(value))\n return value\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n if type(entities) != list:\n entities = [entities]\n mapping = self.mapping;\n log.warn(str(mapping))\n for entity in entities:\n for key, value in mapping.items():\n indexToCheck = [] \n splittedKey = key.split('/')\n for split in splittedKey:\n toCheck = entity\n for i in indexToCheck:\n toCheck = toCheck[i]\n if split.isnumeric():\n log.warn('split is numeric')\n log.warn(split)\n split = int(split)\n if type(toCheck) == dict:\n if split in toCheck.keys():\n indexToCheck.append(split)\n tmp = toCheck[split]\n if type(tmp) == dict and 'type' in tmp.keys():\n if tmp['type'] == 'Property':\n indexToCheck.append('value')\n elif tmp['type'] == 'Relationship':\n indexToCheck.append('object')\n else:\n indexToCheck = []\n break\n elif type(toCheck) == list and type(split) == int:\n if len(toCheck) > split:\n indexToCheck.append(split)\n else:\n indexToCheck = []\n break\n else:\n indexToCheck = []\n break\n if len(indexToCheck) > 0:\n toCheck = entity\n length = len(indexToCheck)\n log.warn('index to check')\n log.warn(str(indexToCheck))\n log.warn('value')\n log.warn(str(value))\n for mappings in value:\n log.warn('mappings')\n log.warn(str(mappings))\n found = False\n for i in range(length):\n log.warn('i')\n log.warn(str(i))\n index = indexToCheck[i]\n if i == length - 1:\n log.warn('setting value')\n if toCheck[index] == mappings[0]:\n found = True\n if mappings[1] != '':\n toCheck[index] = mappings[1]\n else:\n toCheck[index] = self.cleanValue(toCheck[index])\n elif mappings[0] == '':\n toCheck[index] = self.cleanValue(toCheck[index])\n else:\n toCheck = toCheck[index]\n if found:\n break\n log.warn('returning')\n log.warn(json.dumps(entities, indent=4))\n outputStream.write(bytearray(json.dumps(entities, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n log.warn('asdasdasdasdasd')\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# log.warn('asdasdasdasdasd')\n# try:\n# log.warn('asdasdasdasdasd')\n tmp = ReplaceIds()\n flowFile = session.write(flowFile, tmp)\n# log.warn('asdasdasdasdasd')\n# log.warn('asdasdasdasdasd')\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.warn(str(e))\n# log.warn(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"c4f7a560-0d0d-3536-a195-0928f3ac2365","instanceIdentifier":"9ed2288a-4174-38b6-cd57-f93df9f8188c","name":"Make ND","comments":"","position":{"x":3407.717950590265,"y":719.738274311672},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n outputStream.write(bytearray(text.replace(\"@@@@@\", \"\\n\").encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"d83461a2-4bfa-366b-a557-3d03db37a25e","instanceIdentifier":"ab45450f-9e41-3327-f527-851f0993ec28","name":"LogMessage","comments":"","position":{"x":1118.0,"y":959.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","instanceIdentifier":"c55b64f6-9a85-3996-d5b0-54ac5e9b2df5","name":"Get Single Entities","comments":"","position":{"x":1670.0,"y":1031.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass TransformJSON(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entity = json.loads(text)\n template = {'id': entity['id'], 'type': entity['type']}\n tmpList = []\n for attrsKey, attrsValue in entity.items():\n if attrsKey in ['id', 'type', 'modifiedAt', 'createdAt', 'observedAt']:\n continue\n for i in range(len(attrsValue)):\n if len(tmpList) == i:\n tmpEntity = template.copy()\n tmpList.append(tmpEntity)\n else:\n tmpEntity = tmpList[i]\n if type(attrsValue) == dict:\n tmpEntity[attrsKey] = attrsValue\n else:\n tmpEntity[attrsKey] = attrsValue[i]\n if 'observedAt' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['observedAt']\n if 'instanceId' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['instanceId']\n outputStream.write(bytearray(json.dumps(tmpList, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n flowFile = session.write(flowFile, TransformJSON())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"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":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"02135b05-548b-37f2-b5e2-5432f2fc1cac","instanceIdentifier":"e85af0de-4879-39b1-e737-3c5c034a277f","name":"ExecuteScript","comments":"","position":{"x":2771.5,"y":1015.75},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n result.extend(entity)\n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","instanceIdentifier":"244fb790-e12b-38c8-9e08-ac83bbc51cda","name":"MergeContent","comments":"","position":{"x":2286.0,"y":1370.5},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"100 KB","Maximum number of Bins":"10","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":"]","Max Bin Age":"180 sec","Demarcator File":",","Correlation Attribute Name":null,"Header File":"[","mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"10"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","instanceIdentifier":"04e825ac-d357-33fa-9740-c82d9d820fcb","name":"SplitJson","comments":"","position":{"x":2280.0,"y":448.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","instanceIdentifier":"db3174cc-2088-3f62-d55a-7235f72ce1e5","name":"SplitJson","comments":"","position":{"x":1086.0,"y":1215.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"67dc7b8e-46c2-396a-a160-c6e0694175ad","instanceIdentifier":"c928aadb-cde4-36c4-6ff6-903a63eb4dfc","name":"MergeContent","comments":"","position":{"x":2808.0,"y":608.0},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"0 B","Maximum number of Bins":"5","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":null,"Max Bin Age":null,"Demarcator File":"@@@@@","Correlation Attribute Name":null,"Header File":null,"mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"1"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","instanceIdentifier":"14ba611d-bd81-3b0e-3e6d-0103d1950e5c","name":"NGSI-LD to HL7 FHIR","comments":"","position":{"x":2080.0,"y":992.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nimport os\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n forceArray = []\n def __init__(self):\n forceArrayStr = os.environ.get('FORCE_ARRAY', '')\n self.forceArray = forceArrayStr.split(',')\n\n def cleanKeys(self, subTmp):\n if type(subTmp) == list:\n result = []\n for i in subTmp:\n result.append(self.cleanKeys(subTmp))\n return result\n elif type(subTmp) == dict:\n result = {}\n for key, value in subTmp.items():\n key = key.split('/')[-1].split(':')[-1].split('#')[-1]\n result[key] = self.cleanKeys(value)\n return result\n else:\n return subTmp\n\n def getAttribute(self, value, attribKey):\n log.warn('attrib key: ' + attribKey)\n log.warn('value: ' + str(value))\n if type(value) == list:\n result = []\n for entry in value:\n subTmp = self.getAttribute(entry, attribKey)\n if subTmp:\n result.append(subTmp)\n elif type(value) == dict:\n result = {}\n for key, value in value.items():\n log.warn('sub key: ' + key)\n if not value:\n log.warn('value is none') \n else:\n log.warn('value: ' + str(value)) \n if key in ['type', 'createdAt', 'observedAt', 'modifiedAt']:\n log.warn('continue type ca oa ma')\n continue\n if key in ['value', 'object']:\n log.warn('value found')\n result['value'] = value\n else:\n log.warn('else ')\n subTmp = self.getAttribute(value, key)\n if subTmp:\n result[key] = subTmp\n if 'value' not in result.keys():\n log.warn('value not in result')\n log.warn(str(result))\n return None\n if len(result) == 1:\n result = result['value']\n else:\n if type(result['value']) == list:\n tmp = result['value']\n del result['value']\n tmp.append(result)\n result = tmp\n elif type(result['value']) == dict:\n tmp = result['value']\n del result['value']\n tmp.update(result)\n result = tmp\n else:\n result = value\n if attribKey in self.forceArray and type(result) != list:\n result = [result]\n return result\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n newEntity = {}\n if 'resourceType' not in entity.keys():\n entity['resourceType'] = {'type': 'Property', 'value': entity['type']}\n for key, value in entity.items():\n if key in ['id']:\n newEntity[key] = value\n continue\n if key in ['observedAt', 'modifiedAt', 'createdAt', 'type']:\n continue\n key = key.split('/')[-1].split(':')[-1].split('#')[-1]\n log.warn('calling from entity root with key ' + key)\n subTmp = self.getAttribute(value, key)\n if subTmp:\n log.warn('before clean')\n log.warn(str(subTmp))\n subTmp = self.cleanKeys(subTmp)\n log.warn('after clean')\n log.warn(str(subTmp))\n newEntity[key] = subTmp\n result.append(newEntity) \n \n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.warn(str(e))\n# log.warn(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"4546e1db-11b6-351e-83ef-44da3e693086","instanceIdentifier":"2e8970ae-c9cd-3fd4-0056-7ebf13af5316","name":"PutFile","comments":"","position":{"x":3392.0,"y":368.0},"type":"org.apache.nifi.processors.standard.PutFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Group":null,"Owner":null,"Create Missing Directories":"true","Permissions":null,"Maximum File Count":null,"Last Modified Time":null,"Directory":"/home/nifi/download","Conflict Resolution Strategy":"fail"},"propertyDescriptors":{"Group":{"name":"Group","displayName":"Group","identifiesControllerService":false,"sensitive":false},"Owner":{"name":"Owner","displayName":"Owner","identifiesControllerService":false,"sensitive":false},"Create Missing Directories":{"name":"Create Missing Directories","displayName":"Create Missing Directories","identifiesControllerService":false,"sensitive":false},"Permissions":{"name":"Permissions","displayName":"Permissions","identifiesControllerService":false,"sensitive":false},"Maximum File Count":{"name":"Maximum File Count","displayName":"Maximum File Count","identifiesControllerService":false,"sensitive":false},"Last Modified Time":{"name":"Last Modified Time","displayName":"Last Modified Time","identifiesControllerService":false,"sensitive":false},"Directory":{"name":"Directory","displayName":"Directory","identifiesControllerService":false,"sensitive":false},"Conflict Resolution Strategy":{"name":"Conflict Resolution Strategy","displayName":"Conflict Resolution Strategy","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"}],"inputPorts":[],"outputPorts":[],"connections":[{"identifier":"97865dec-8d71-32be-a945-079949480b3e","instanceIdentifier":"ffa71af3-ae33-36cc-0c71-7a7369abf252","name":"","source":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"MergeContent","comments":"","instanceIdentifier":"c928aadb-cde4-36c4-6ff6-903a63eb4dfc"},"destination":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"Make ND","comments":"","instanceIdentifier":"9ed2288a-4174-38b6-cd57-f93df9f8188c"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"e1ebafe5-9639-32a8-a7f6-7431948a7e40","instanceIdentifier":"53a44482-f620-318b-ae4d-e7754c2cb84a","name":"","source":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"a43fa916-a14c-3483-f343-b04b7f98a5f7"},"destination":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"SplitJson","comments":"","instanceIdentifier":"db3174cc-2088-3f62-d55a-7235f72ce1e5"},"labelIndex":1,"zIndex":0,"selectedRelationships":[""],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"57503fba-3217-3582-993f-83fcea78d73f","instanceIdentifier":"c6894a83-5f70-3900-502a-b8bc4aa6ba19","name":"","source":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"SplitJson","comments":"","instanceIdentifier":"04e825ac-d357-33fa-9740-c82d9d820fcb"},"destination":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"MergeContent","comments":"","instanceIdentifier":"c928aadb-cde4-36c4-6ff6-903a63eb4dfc"},"labelIndex":1,"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":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"44914c43-a3f5-3677-aaf3-fbd262635323","instanceIdentifier":"0e7fa85d-faba-358d-3324-c448d9770116","name":"","source":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"14ba611d-bd81-3b0e-3e6d-0103d1950e5c"},"destination":{"id":"83e69090-3d02-3a08-ae8e-d7c5a52f18c7","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"Apply ID mapping","comments":"","instanceIdentifier":"93de8fbd-9853-3180-101e-370cdc5308a7"},"labelIndex":1,"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":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"104da2d5-95a1-3c6a-b260-d54b7d12bf89","instanceIdentifier":"84a9d194-adc1-33cf-3b54-2f5a27ea05ff","name":"","source":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"SplitJson","comments":"","instanceIdentifier":"db3174cc-2088-3f62-d55a-7235f72ce1e5"},"destination":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"Get Single Entities","comments":"","instanceIdentifier":"c55b64f6-9a85-3996-d5b0-54ac5e9b2df5"},"labelIndex":1,"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":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"559928a8-1282-3761-b9a0-2614e01ecadf","instanceIdentifier":"6ecbb986-a5c8-33f1-f10b-03d5a52a024e","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"Get Single Entities","comments":"","instanceIdentifier":"c55b64f6-9a85-3996-d5b0-54ac5e9b2df5"},"destination":{"id":"d83461a2-4bfa-366b-a557-3d03db37a25e","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"LogMessage","comments":"","instanceIdentifier":"ab45450f-9e41-3327-f527-851f0993ec28"},"labelIndex":1,"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":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"c5d12edb-0785-33c1-9c71-d55d75fcd0b5","instanceIdentifier":"d90ca42f-5ce5-39d9-f6af-700b41ae80d9","name":"","source":{"id":"83e69090-3d02-3a08-ae8e-d7c5a52f18c7","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"Apply ID mapping","comments":"","instanceIdentifier":"93de8fbd-9853-3180-101e-370cdc5308a7"},"destination":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"SplitJson","comments":"","instanceIdentifier":"04e825ac-d357-33fa-9740-c82d9d820fcb"},"labelIndex":1,"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":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"9e995a06-4b64-3a25-ac1e-6817aec991c6","instanceIdentifier":"2a170f7a-764a-3b6c-7249-bb32f4fdf14b","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"Get Single Entities","comments":"","instanceIdentifier":"c55b64f6-9a85-3996-d5b0-54ac5e9b2df5"},"destination":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"MergeContent","comments":"","instanceIdentifier":"244fb790-e12b-38c8-9e08-ac83bbc51cda"},"labelIndex":1,"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":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"38c05b85-5f11-3f7f-80d6-c6b41a7fd75e","instanceIdentifier":"d4454ffd-f234-37e3-508a-c4b5cee19fe6","name":"","source":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"MergeContent","comments":"","instanceIdentifier":"244fb790-e12b-38c8-9e08-ac83bbc51cda"},"destination":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"ExecuteScript","comments":"","instanceIdentifier":"e85af0de-4879-39b1-e737-3c5c034a277f"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"044fe185-8789-3c80-b927-49da787a4971","instanceIdentifier":"57244f09-2efe-3a1a-e091-8889587cfe6b","name":"","source":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"Make ND","comments":"","instanceIdentifier":"9ed2288a-4174-38b6-cd57-f93df9f8188c"},"destination":{"id":"4546e1db-11b6-351e-83ef-44da3e693086","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"PutFile","comments":"","instanceIdentifier":"2e8970ae-c9cd-3fd4-0056-7ebf13af5316"},"labelIndex":1,"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":"27175373-0ee9-347d-821a-50475be0e60a"},{"identifier":"d952c0da-248f-36b9-ae66-58a81f1e222e","instanceIdentifier":"89c081d1-8d77-36ee-94d2-68c617afd4b9","name":"","source":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"ExecuteScript","comments":"","instanceIdentifier":"e85af0de-4879-39b1-e737-3c5c034a277f"},"destination":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"27175373-0ee9-347d-821a-50475be0e60a","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"14ba611d-bd81-3b0e-3e6d-0103d1950e5c"},"labelIndex":1,"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":"27175373-0ee9-347d-821a-50475be0e60a"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE"},"externalControllerServices":{},"parameterContexts":{},"flowEncodingVersion":"1.0","parameterProviders":{},"latest":false} \ No newline at end of file +{"flowContents":{"identifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d","instanceIdentifier":"fe3bab3f-018c-1000-f1a9-ca451d549087","name":"NiFi Flow","comments":"","position":{"x":0.0,"y":0.0},"processGroups":[{"identifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","instanceIdentifier":"041646ba-30a4-36db-5e0b-d272ab398992","name":"NGSI-LD continuous Temporal Query ","comments":"","position":{"x":606.0,"y":967.0},"processGroups":[],"remoteProcessGroups":[],"processors":[{"identifier":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","instanceIdentifier":"4af49b75-f427-35fd-ff7f-e2f040910e3a","name":"GenerateFlowFile","comments":"","position":{"x":128.0,"y":0.0},"type":"org.apache.nifi.processors.standard.GenerateFlowFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"character-set":"UTF-8","File Size":"0B","mime-type":null,"generate-ff-custom-text":"${ENTITY_TYPES}","Batch Size":"1","Unique FlowFiles":"false","Data Format":"Text"},"propertyDescriptors":{"character-set":{"name":"character-set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"File Size":{"name":"File Size","displayName":"File Size","identifiesControllerService":false,"sensitive":false},"mime-type":{"name":"mime-type","displayName":"Mime Type","identifiesControllerService":false,"sensitive":false},"generate-ff-custom-text":{"name":"generate-ff-custom-text","displayName":"Custom Text","identifiesControllerService":false,"sensitive":false},"Batch Size":{"name":"Batch Size","displayName":"Batch Size","identifiesControllerService":false,"sensitive":false},"Unique FlowFiles":{"name":"Unique FlowFiles","displayName":"Unique FlowFiles","identifiesControllerService":false,"sensitive":false},"Data Format":{"name":"Data Format","displayName":"Data Format","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"1800 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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"3a35ae06-e813-3e9c-a06f-35e859e6917b","instanceIdentifier":"964819ce-30c0-3772-5b2b-386232b3727c","name":"SplitContent","comments":"","position":{"x":440.0,"y":320.0},"type":"org.apache.nifi.processors.standard.SplitContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Byte Sequence Location":"Trailing","Keep Byte Sequence":"false","Byte Sequence Format":"Text","Byte Sequence":","},"propertyDescriptors":{"Byte Sequence Location":{"name":"Byte Sequence Location","displayName":"Byte Sequence Location","identifiesControllerService":false,"sensitive":false},"Keep Byte Sequence":{"name":"Keep Byte Sequence","displayName":"Keep Byte Sequence","identifiesControllerService":false,"sensitive":false},"Byte Sequence Format":{"name":"Byte Sequence Format","displayName":"Byte Sequence Format","identifiesControllerService":false,"sensitive":false},"Byte Sequence":{"name":"Byte Sequence","displayName":"Byte Sequence","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","instanceIdentifier":"369f7ae6-7e46-357d-8f61-4a2b237cda53","name":"ExtractText","comments":"","position":{"x":904.0,"y":528.0},"type":"org.apache.nifi.processors.standard.ExtractText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Enable Unicode Predefined Character Classes":"false","Permit Whitespace and Comments in Pattern":"false","Enable Unicode-aware Case Folding":"false","Enable DOTALL Mode":"false","Enable Unix Lines Mode":"false","extract-text-enable-named-groups":"false","Maximum Buffer Size":"1 MB","Enable Canonical Equivalence":"false","callType":"(.*)","Enable Case-insensitive Matching":"false","Enable Multiline Mode":"false","Maximum Capture Group Length":"1024","Enable Literal Parsing of the Pattern":"false","Character Set":"UTF-8","Include Capture Group 0":"true","extract-text-enable-repeating-capture-group":"false"},"propertyDescriptors":{"Enable Unicode Predefined Character Classes":{"name":"Enable Unicode Predefined Character Classes","displayName":"Enable Unicode Predefined Character Classes","identifiesControllerService":false,"sensitive":false},"Permit Whitespace and Comments in Pattern":{"name":"Permit Whitespace and Comments in Pattern","displayName":"Permit Whitespace and Comments in Pattern","identifiesControllerService":false,"sensitive":false},"Enable Unicode-aware Case Folding":{"name":"Enable Unicode-aware Case Folding","displayName":"Enable Unicode-aware Case Folding","identifiesControllerService":false,"sensitive":false},"Enable DOTALL Mode":{"name":"Enable DOTALL Mode","displayName":"Enable DOTALL Mode","identifiesControllerService":false,"sensitive":false},"Enable Unix Lines Mode":{"name":"Enable Unix Lines Mode","displayName":"Enable Unix Lines Mode","identifiesControllerService":false,"sensitive":false},"extract-text-enable-named-groups":{"name":"extract-text-enable-named-groups","displayName":"Enable named group support","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Enable Canonical Equivalence":{"name":"Enable Canonical Equivalence","displayName":"Enable Canonical Equivalence","identifiesControllerService":false,"sensitive":false},"callType":{"name":"callType","displayName":"callType","identifiesControllerService":false,"sensitive":false},"Enable Case-insensitive Matching":{"name":"Enable Case-insensitive Matching","displayName":"Enable Case-insensitive Matching","identifiesControllerService":false,"sensitive":false},"Enable Multiline Mode":{"name":"Enable Multiline Mode","displayName":"Enable Multiline Mode","identifiesControllerService":false,"sensitive":false},"Maximum Capture Group Length":{"name":"Maximum Capture Group Length","displayName":"Maximum Capture Group Length","identifiesControllerService":false,"sensitive":false},"Enable Literal Parsing of the Pattern":{"name":"Enable Literal Parsing of the Pattern","displayName":"Enable Literal Parsing of the Pattern","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Include Capture Group 0":{"name":"Include Capture Group 0","displayName":"Include Capture Group 0","identifiesControllerService":false,"sensitive":false},"extract-text-enable-repeating-capture-group":{"name":"extract-text-enable-repeating-capture-group","displayName":"Enable repeating capture group","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"72d0db0d-c388-3ad8-a5eb-d22903025c21","instanceIdentifier":"163248e1-738a-3481-2166-c10b7dab6b9f","name":"Get Temporal Entities","comments":"","position":{"x":1224.0,"y":336.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${NGSILD_HOST}/ngsi-ld/v1/temporal/entities?type=${callType}&timerel=after&timeAt=${now():minus(1800000):format(\"yyyy-MM-dd'T'HH:mm:ss'Z'\")}&timeproperty=modifiedAt","form-body-form-name":null,"Content-Type":"${mime.type}","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","Accept":"application/json","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Socket Write Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"GET","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"Accept":{"name":"Accept","displayName":"Accept","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Socket Write Timeout":{"name":"Socket Write Timeout","displayName":"Socket Write Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":4,"autoTerminatedRelationships":["No Retry","Retry","Original","Failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"inputPorts":[],"outputPorts":[{"identifier":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","instanceIdentifier":"8ffae425-78ab-379c-0d8c-b4f5abcc604b","name":"Temporal Entities","position":{"x":1359.0,"y":640.0},"type":"OUTPUT_PORT","concurrentlySchedulableTaskCount":1,"scheduledState":"ENABLED","allowRemoteAccess":false,"componentType":"OUTPUT_PORT","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"connections":[{"identifier":"ec2bac80-c735-3cc0-b25b-c604bee1f665","instanceIdentifier":"6e28e86c-e2be-3065-db74-b52be5a2ef09","name":"","source":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"964819ce-30c0-3772-5b2b-386232b3727c"},"destination":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"369f7ae6-7e46-357d-8f61-4a2b237cda53"},"labelIndex":1,"zIndex":0,"selectedRelationships":["splits"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"9f89d7db-43e4-3c3c-92a3-92073c43e0a2","instanceIdentifier":"b0899b3e-860d-3d97-82cf-2e517e3a094f","name":"","source":{"id":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"GenerateFlowFile","comments":"","instanceIdentifier":"4af49b75-f427-35fd-ff7f-e2f040910e3a"},"destination":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"964819ce-30c0-3772-5b2b-386232b3727c"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"8a3b5d07-1c05-32db-af76-450a23ad8821","instanceIdentifier":"2635a7b6-bc10-34de-bcf8-3cdfb4cfe3f1","name":"","source":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"369f7ae6-7e46-357d-8f61-4a2b237cda53"},"destination":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"163248e1-738a-3481-2166-c10b7dab6b9f"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"5fb243ff-018c-3a57-bdf2-c0446fbb84f3","instanceIdentifier":"9f668c8e-8736-306d-57ff-49f3218ec48c","name":"","source":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"163248e1-738a-3481-2166-c10b7dab6b9f"},"destination":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"8ffae425-78ab-379c-0d8c-b4f5abcc604b"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"}],"remoteProcessGroups":[],"processors":[{"identifier":"83e69090-3d02-3a08-ae8e-d7c5a52f18c7","instanceIdentifier":"0916a00a-d37b-3297-44b5-66a6d80cce1f","name":"Apply ID mapping","comments":"","position":{"x":2120.0,"y":808.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport csv\nimport java.io\nimport os\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass ReplaceIds(StreamCallback):\n \n mapping = {}\n \n def __init__(self):\n if os.path.isfile('/home/nifi/mapping.csv'):\n log.warn('found mapping file')\n with open('/home/nifi/mapping.csv') as csvfile:\n readFile = csv.reader(csvfile, delimiter=';')\n for row in readFile:\n log.warn(str(row))\n if row[0] in self.mapping:\n self.mapping[row[0]].append([row[1], row[2]])\n else:\n self.mapping[row[0]] = [[row[1], row[2]]]\n log.warn(str(self.mapping))\n \n def cleanValue(self, value):\n log.warn('cleaning value')\n log.warn('value type')\n log.warn(str(type(value)))\n if type(value) == str or type(value) == unicode:\n log.warn('value is str')\n value = value.replace(':', '_').replace('@', '_').replace('?', '_').replace('&', '_').replace('/', '_')\n log.warn(str(value))\n return value\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n if type(entities) != list:\n entities = [entities]\n mapping = self.mapping;\n log.warn(str(mapping))\n for entity in entities:\n for key, value in mapping.items():\n indexToCheck = [] \n splittedKey = key.split('/')\n for split in splittedKey:\n toCheck = entity\n for i in indexToCheck:\n toCheck = toCheck[i]\n if split.isnumeric():\n log.warn('split is numeric')\n log.warn(split)\n split = int(split)\n if type(toCheck) == dict:\n if split in toCheck.keys():\n indexToCheck.append(split)\n tmp = toCheck[split]\n if type(tmp) == dict and 'type' in tmp.keys():\n if tmp['type'] == 'Property':\n indexToCheck.append('value')\n elif tmp['type'] == 'Relationship':\n indexToCheck.append('object')\n else:\n indexToCheck = []\n break\n elif type(toCheck) == list and type(split) == int:\n if len(toCheck) > split:\n indexToCheck.append(split)\n else:\n indexToCheck = []\n break\n else:\n indexToCheck = []\n break\n if len(indexToCheck) > 0:\n toCheck = entity\n length = len(indexToCheck)\n log.warn('index to check')\n log.warn(str(indexToCheck))\n log.warn('value')\n log.warn(str(value))\n for mappings in value:\n log.warn('mappings')\n log.warn(str(mappings))\n found = False\n for i in range(length):\n log.warn('i')\n log.warn(str(i))\n index = indexToCheck[i]\n if i == length - 1:\n log.warn('setting value')\n if toCheck[index] == mappings[0]:\n found = True\n if mappings[1] != '':\n toCheck[index] = mappings[1]\n else:\n toCheck[index] = self.cleanValue(toCheck[index])\n elif mappings[0] == '':\n toCheck[index] = self.cleanValue(toCheck[index])\n else:\n toCheck = toCheck[index]\n if found:\n break\n log.warn('returning')\n log.warn(json.dumps(entities, indent=4))\n outputStream.write(bytearray(json.dumps(entities, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n log.warn('asdasdasdasdasd')\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# log.warn('asdasdasdasdasd')\n# try:\n# log.warn('asdasdasdasdasd')\n tmp = ReplaceIds()\n flowFile = session.write(flowFile, tmp)\n# log.warn('asdasdasdasdasd')\n# log.warn('asdasdasdasdasd')\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.warn(str(e))\n# log.warn(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"d83461a2-4bfa-366b-a557-3d03db37a25e","instanceIdentifier":"3708da14-1612-30fc-0379-ad1d75c88841","name":"LogMessage","comments":"","position":{"x":1118.0,"y":959.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"c4f7a560-0d0d-3536-a195-0928f3ac2365","instanceIdentifier":"40acdc4b-22a7-387a-1790-3e2008693f07","name":"Make ND","comments":"","position":{"x":3407.717950590265,"y":719.738274311672},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n outputStream.write(bytearray(text.replace(\"@@@@@\", \"\\n\").encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","instanceIdentifier":"d70fbd1f-a06a-3b88-2af3-b5c3ab93fea1","name":"Get Single Entities","comments":"","position":{"x":1670.0,"y":1031.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass TransformJSON(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entity = json.loads(text)\n template = {'id': entity['id'], 'type': entity['type']}\n tmpList = []\n for attrsKey, attrsValue in entity.items():\n if attrsKey in ['id', 'type', 'modifiedAt', 'createdAt', 'observedAt']:\n continue\n if type(attrsValue) == dict and 'type' in attrsValue.keys():\n attrsValue = [attrsValue]\n if type(attrsValue) != list:\n continue\n for i in range(len(attrsValue)):\n if len(tmpList) == i:\n tmpEntity = template.copy()\n tmpList.append(tmpEntity)\n else:\n tmpEntity = tmpList[i]\n if type(attrsValue) == dict:\n tmpEntity[attrsKey] = attrsValue\n else:\n tmpEntity[attrsKey] = attrsValue[i]\n if 'observedAt' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['observedAt']\n if 'instanceId' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['instanceId']\n outputStream.write(bytearray(json.dumps(tmpList, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n flowFile = session.write(flowFile, TransformJSON())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"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":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"02135b05-548b-37f2-b5e2-5432f2fc1cac","instanceIdentifier":"c427a133-e244-3846-7edc-84bbd782ddb0","name":"ExecuteScript","comments":"","position":{"x":2771.5,"y":1015.75},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n result.extend(entity)\n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","instanceIdentifier":"dde1b310-ca00-30c9-e13a-0f32e941c48e","name":"MergeContent","comments":"","position":{"x":2286.0,"y":1370.5},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"100 KB","Maximum number of Bins":"10","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":"]","Max Bin Age":"180 sec","Demarcator File":",","Correlation Attribute Name":null,"Header File":"[","mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"10"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","instanceIdentifier":"5638a960-63d5-3da0-0365-eb7cdf7492d0","name":"SplitJson","comments":"","position":{"x":1086.0,"y":1215.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","instanceIdentifier":"e60810bb-839a-39df-a460-c6c0c80f7198","name":"SplitJson","comments":"","position":{"x":2280.0,"y":448.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"67dc7b8e-46c2-396a-a160-c6e0694175ad","instanceIdentifier":"871154b2-fe77-3b1f-5174-8cf7df8e9308","name":"MergeContent","comments":"","position":{"x":2808.0,"y":608.0},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"0 B","Maximum number of Bins":"5","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":null,"Max Bin Age":null,"Demarcator File":"@@@@@","Correlation Attribute Name":null,"Header File":null,"mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"1"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE","TEXT"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"4546e1db-11b6-351e-83ef-44da3e693086","instanceIdentifier":"24fdc019-3e04-3058-b3df-35b7c98f1eee","name":"PutFile","comments":"","position":{"x":3392.0,"y":368.0},"type":"org.apache.nifi.processors.standard.PutFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Group":null,"Owner":null,"Create Missing Directories":"true","Permissions":null,"Maximum File Count":null,"Last Modified Time":null,"Directory":"/home/nifi/download","Conflict Resolution Strategy":"fail"},"propertyDescriptors":{"Group":{"name":"Group","displayName":"Group","identifiesControllerService":false,"sensitive":false},"Owner":{"name":"Owner","displayName":"Owner","identifiesControllerService":false,"sensitive":false},"Create Missing Directories":{"name":"Create Missing Directories","displayName":"Create Missing Directories","identifiesControllerService":false,"sensitive":false},"Permissions":{"name":"Permissions","displayName":"Permissions","identifiesControllerService":false,"sensitive":false},"Maximum File Count":{"name":"Maximum File Count","displayName":"Maximum File Count","identifiesControllerService":false,"sensitive":false},"Last Modified Time":{"name":"Last Modified Time","displayName":"Last Modified Time","identifiesControllerService":false,"sensitive":false},"Directory":{"name":"Directory","displayName":"Directory","identifiesControllerService":false,"sensitive":false},"Conflict Resolution Strategy":{"name":"Conflict Resolution Strategy","displayName":"Conflict Resolution Strategy","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","instanceIdentifier":"58109934-d101-3890-71fd-0e3ade33231f","name":"NGSI-LD to HL7 FHIR","comments":"","position":{"x":2080.0,"y":992.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nimport os\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n forceArray = []\n def __init__(self):\n forceArrayStr = os.environ.get('FORCE_ARRAY', '')\n self.forceArray = forceArrayStr.split(',')\n\n def cleanKeys(self, subTmp):\n if type(subTmp) == list:\n result = []\n for i in subTmp:\n result.append(self.cleanKeys(subTmp))\n return result\n elif type(subTmp) == dict:\n result = {}\n for key, value in subTmp.items():\n key = key.split('/')[-1].split(':')[-1].split('#')[-1]\n result[key] = self.cleanKeys(value)\n return result\n else:\n return subTmp\n\n def getAttribute(self, value, attribKey):\n log.warn('attrib key: ' + attribKey)\n log.warn('value: ' + str(value))\n if type(value) == list:\n result = []\n for entry in value:\n subTmp = self.getAttribute(entry, attribKey)\n if subTmp:\n result.append(subTmp)\n elif type(value) == dict:\n result = {}\n for key, value in value.items():\n log.warn('sub key: ' + key)\n if not value:\n log.warn('value is none') \n else:\n log.warn('value: ' + str(value)) \n if key in ['type', 'createdAt', 'observedAt', 'modifiedAt']:\n log.warn('continue type ca oa ma')\n continue\n if key in ['value', 'object']:\n log.warn('value found')\n result['value'] = value\n else:\n log.warn('else ')\n subTmp = self.getAttribute(value, key)\n if subTmp:\n result[key] = subTmp\n if 'value' not in result.keys():\n log.warn('value not in result')\n log.warn(str(result))\n return None\n if len(result) == 1:\n result = result['value']\n else:\n if type(result['value']) == list:\n tmp = result['value']\n del result['value']\n tmp.append(result)\n result = tmp\n elif type(result['value']) == dict:\n tmp = result['value']\n del result['value']\n tmp.update(result)\n result = tmp\n else:\n result = value\n if attribKey in self.forceArray and type(result) != list:\n result = [result]\n return result\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n newEntity = {}\n if 'resourceType' not in entity.keys():\n entity['resourceType'] = {'type': 'Property', 'value': entity['type']}\n for key, value in entity.items():\n if key in ['id']:\n newEntity[key] = value\n continue\n if key in ['observedAt', 'modifiedAt', 'createdAt', 'type']:\n continue\n key = key.split('/')[-1].split(':')[-1].split('#')[-1]\n log.warn('calling from entity root with key ' + key)\n subTmp = self.getAttribute(value, key)\n if subTmp:\n log.warn('before clean')\n log.warn(str(subTmp))\n subTmp = self.cleanKeys(subTmp)\n log.warn('after clean')\n log.warn(str(subTmp))\n newEntity[key] = subTmp\n result.append(newEntity) \n \n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.warn(str(e))\n# log.warn(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"}],"inputPorts":[],"outputPorts":[],"connections":[{"identifier":"97865dec-8d71-32be-a945-079949480b3e","instanceIdentifier":"04efff67-1e61-3341-563d-86469361e654","name":"","source":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"MergeContent","comments":"","instanceIdentifier":"871154b2-fe77-3b1f-5174-8cf7df8e9308"},"destination":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"Make ND","comments":"","instanceIdentifier":"40acdc4b-22a7-387a-1790-3e2008693f07"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"e1ebafe5-9639-32a8-a7f6-7431948a7e40","instanceIdentifier":"8ff6e298-85d4-36aa-7976-5584d56a6775","name":"","source":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"8ffae425-78ab-379c-0d8c-b4f5abcc604b"},"destination":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"SplitJson","comments":"","instanceIdentifier":"5638a960-63d5-3da0-0365-eb7cdf7492d0"},"labelIndex":1,"zIndex":0,"selectedRelationships":[""],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"57503fba-3217-3582-993f-83fcea78d73f","instanceIdentifier":"0d1109cb-0df6-3957-4b1d-0a99a9bb9d7a","name":"","source":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"SplitJson","comments":"","instanceIdentifier":"e60810bb-839a-39df-a460-c6c0c80f7198"},"destination":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"MergeContent","comments":"","instanceIdentifier":"871154b2-fe77-3b1f-5174-8cf7df8e9308"},"labelIndex":1,"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":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"44914c43-a3f5-3677-aaf3-fbd262635323","instanceIdentifier":"d802a738-acf3-335e-f541-8239feef8c74","name":"","source":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"58109934-d101-3890-71fd-0e3ade33231f"},"destination":{"id":"83e69090-3d02-3a08-ae8e-d7c5a52f18c7","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"Apply ID mapping","comments":"","instanceIdentifier":"0916a00a-d37b-3297-44b5-66a6d80cce1f"},"labelIndex":1,"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":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"104da2d5-95a1-3c6a-b260-d54b7d12bf89","instanceIdentifier":"55c72040-c6e0-39bc-3e65-feca5b4a5151","name":"","source":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"SplitJson","comments":"","instanceIdentifier":"5638a960-63d5-3da0-0365-eb7cdf7492d0"},"destination":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"Get Single Entities","comments":"","instanceIdentifier":"d70fbd1f-a06a-3b88-2af3-b5c3ab93fea1"},"labelIndex":1,"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":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"559928a8-1282-3761-b9a0-2614e01ecadf","instanceIdentifier":"7353ba04-3c82-31e5-2007-24579dd11d5c","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"Get Single Entities","comments":"","instanceIdentifier":"d70fbd1f-a06a-3b88-2af3-b5c3ab93fea1"},"destination":{"id":"d83461a2-4bfa-366b-a557-3d03db37a25e","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"LogMessage","comments":"","instanceIdentifier":"3708da14-1612-30fc-0379-ad1d75c88841"},"labelIndex":1,"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":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"c5d12edb-0785-33c1-9c71-d55d75fcd0b5","instanceIdentifier":"93fd1db1-2006-385d-63c5-070e74f69b51","name":"","source":{"id":"83e69090-3d02-3a08-ae8e-d7c5a52f18c7","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"Apply ID mapping","comments":"","instanceIdentifier":"0916a00a-d37b-3297-44b5-66a6d80cce1f"},"destination":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"SplitJson","comments":"","instanceIdentifier":"e60810bb-839a-39df-a460-c6c0c80f7198"},"labelIndex":1,"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":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"9e995a06-4b64-3a25-ac1e-6817aec991c6","instanceIdentifier":"58d2cba2-1e7a-37a5-3fe0-48c69bd4120e","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"Get Single Entities","comments":"","instanceIdentifier":"d70fbd1f-a06a-3b88-2af3-b5c3ab93fea1"},"destination":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"MergeContent","comments":"","instanceIdentifier":"dde1b310-ca00-30c9-e13a-0f32e941c48e"},"labelIndex":1,"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":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"38c05b85-5f11-3f7f-80d6-c6b41a7fd75e","instanceIdentifier":"6167ccf2-2b31-3512-a28d-d322f48e5833","name":"","source":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"MergeContent","comments":"","instanceIdentifier":"dde1b310-ca00-30c9-e13a-0f32e941c48e"},"destination":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"ExecuteScript","comments":"","instanceIdentifier":"c427a133-e244-3846-7edc-84bbd782ddb0"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"044fe185-8789-3c80-b927-49da787a4971","instanceIdentifier":"80685b2c-9e1e-38d5-43ac-92cdea3b537d","name":"","source":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"Make ND","comments":"","instanceIdentifier":"40acdc4b-22a7-387a-1790-3e2008693f07"},"destination":{"id":"4546e1db-11b6-351e-83ef-44da3e693086","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"PutFile","comments":"","instanceIdentifier":"24fdc019-3e04-3058-b3df-35b7c98f1eee"},"labelIndex":1,"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":"c8348617-bcf3-3268-a47a-f8d79f0a107d"},{"identifier":"d952c0da-248f-36b9-ae66-58a81f1e222e","instanceIdentifier":"e59cd12a-1532-3014-f685-29ddf22b0a8b","name":"","source":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"ExecuteScript","comments":"","instanceIdentifier":"c427a133-e244-3846-7edc-84bbd782ddb0"},"destination":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"c8348617-bcf3-3268-a47a-f8d79f0a107d","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"58109934-d101-3890-71fd-0e3ade33231f"},"labelIndex":1,"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":"c8348617-bcf3-3268-a47a-f8d79f0a107d"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE"},"externalControllerServices":{},"parameterContexts":{},"flowEncodingVersion":"1.0","parameterProviders":{},"latest":false} \ No newline at end of file diff --git a/tempInterval2FileNoMapping/NiFi_Flowtemp2ndnomapping.json b/tempInterval2FileNoMapping/NiFi_Flowtemp2ndnomapping.json index 4fdb0ed..15fe807 100644 --- a/tempInterval2FileNoMapping/NiFi_Flowtemp2ndnomapping.json +++ b/tempInterval2FileNoMapping/NiFi_Flowtemp2ndnomapping.json @@ -1 +1 @@ -{"flowContents":{"identifier":"aef156fa-6773-3e93-9783-c28e1ba0b613","instanceIdentifier":"6d62bcae-018c-1000-e2a0-4d398b5772d7","name":"NiFi Flow","comments":"","position":{"x":0.0,"y":0.0},"processGroups":[{"identifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","instanceIdentifier":"abe308c3-881a-3d6f-84e3-5c3b42bd45d1","name":"NGSI-LD continuous Temporal Query ","comments":"","position":{"x":606.0,"y":967.0},"processGroups":[],"remoteProcessGroups":[],"processors":[{"identifier":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","instanceIdentifier":"834a739c-1b57-3de3-83c2-590c9b74d988","name":"GenerateFlowFile","comments":"","position":{"x":128.0,"y":0.0},"type":"org.apache.nifi.processors.standard.GenerateFlowFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"character-set":"UTF-8","File Size":"0B","mime-type":null,"generate-ff-custom-text":"${ENTITY_TYPES}","Batch Size":"1","Unique FlowFiles":"false","Data Format":"Text"},"propertyDescriptors":{"character-set":{"name":"character-set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"File Size":{"name":"File Size","displayName":"File Size","identifiesControllerService":false,"sensitive":false},"mime-type":{"name":"mime-type","displayName":"Mime Type","identifiesControllerService":false,"sensitive":false},"generate-ff-custom-text":{"name":"generate-ff-custom-text","displayName":"Custom Text","identifiesControllerService":false,"sensitive":false},"Batch Size":{"name":"Batch Size","displayName":"Batch Size","identifiesControllerService":false,"sensitive":false},"Unique FlowFiles":{"name":"Unique FlowFiles","displayName":"Unique FlowFiles","identifiesControllerService":false,"sensitive":false},"Data Format":{"name":"Data Format","displayName":"Data Format","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"1800 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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"3a35ae06-e813-3e9c-a06f-35e859e6917b","instanceIdentifier":"f013edbb-265c-3007-1e9c-feceed5b23f9","name":"SplitContent","comments":"","position":{"x":440.0,"y":320.0},"type":"org.apache.nifi.processors.standard.SplitContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Byte Sequence Location":"Trailing","Keep Byte Sequence":"false","Byte Sequence Format":"Text","Byte Sequence":","},"propertyDescriptors":{"Byte Sequence Location":{"name":"Byte Sequence Location","displayName":"Byte Sequence Location","identifiesControllerService":false,"sensitive":false},"Keep Byte Sequence":{"name":"Keep Byte Sequence","displayName":"Keep Byte Sequence","identifiesControllerService":false,"sensitive":false},"Byte Sequence Format":{"name":"Byte Sequence Format","displayName":"Byte Sequence Format","identifiesControllerService":false,"sensitive":false},"Byte Sequence":{"name":"Byte Sequence","displayName":"Byte Sequence","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","instanceIdentifier":"29f78dc1-e02d-3fac-25b2-e5d5ecefbec2","name":"ExtractText","comments":"","position":{"x":904.0,"y":528.0},"type":"org.apache.nifi.processors.standard.ExtractText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Enable Unicode Predefined Character Classes":"false","Permit Whitespace and Comments in Pattern":"false","Enable Unicode-aware Case Folding":"false","Enable DOTALL Mode":"false","Enable Unix Lines Mode":"false","extract-text-enable-named-groups":"false","Maximum Buffer Size":"1 MB","Enable Canonical Equivalence":"false","callType":"(.*)","Enable Case-insensitive Matching":"false","Enable Multiline Mode":"false","Maximum Capture Group Length":"1024","Enable Literal Parsing of the Pattern":"false","Character Set":"UTF-8","Include Capture Group 0":"true","extract-text-enable-repeating-capture-group":"false"},"propertyDescriptors":{"Enable Unicode Predefined Character Classes":{"name":"Enable Unicode Predefined Character Classes","displayName":"Enable Unicode Predefined Character Classes","identifiesControllerService":false,"sensitive":false},"Permit Whitespace and Comments in Pattern":{"name":"Permit Whitespace and Comments in Pattern","displayName":"Permit Whitespace and Comments in Pattern","identifiesControllerService":false,"sensitive":false},"Enable Unicode-aware Case Folding":{"name":"Enable Unicode-aware Case Folding","displayName":"Enable Unicode-aware Case Folding","identifiesControllerService":false,"sensitive":false},"Enable DOTALL Mode":{"name":"Enable DOTALL Mode","displayName":"Enable DOTALL Mode","identifiesControllerService":false,"sensitive":false},"Enable Unix Lines Mode":{"name":"Enable Unix Lines Mode","displayName":"Enable Unix Lines Mode","identifiesControllerService":false,"sensitive":false},"extract-text-enable-named-groups":{"name":"extract-text-enable-named-groups","displayName":"Enable named group support","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Enable Canonical Equivalence":{"name":"Enable Canonical Equivalence","displayName":"Enable Canonical Equivalence","identifiesControllerService":false,"sensitive":false},"callType":{"name":"callType","displayName":"callType","identifiesControllerService":false,"sensitive":false},"Enable Case-insensitive Matching":{"name":"Enable Case-insensitive Matching","displayName":"Enable Case-insensitive Matching","identifiesControllerService":false,"sensitive":false},"Enable Multiline Mode":{"name":"Enable Multiline Mode","displayName":"Enable Multiline Mode","identifiesControllerService":false,"sensitive":false},"Maximum Capture Group Length":{"name":"Maximum Capture Group Length","displayName":"Maximum Capture Group Length","identifiesControllerService":false,"sensitive":false},"Enable Literal Parsing of the Pattern":{"name":"Enable Literal Parsing of the Pattern","displayName":"Enable Literal Parsing of the Pattern","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Include Capture Group 0":{"name":"Include Capture Group 0","displayName":"Include Capture Group 0","identifiesControllerService":false,"sensitive":false},"extract-text-enable-repeating-capture-group":{"name":"extract-text-enable-repeating-capture-group","displayName":"Enable repeating capture group","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"72d0db0d-c388-3ad8-a5eb-d22903025c21","instanceIdentifier":"1e0d1902-f6c0-30e3-01ae-24a99d50d880","name":"Get Temporal Entities","comments":"","position":{"x":1224.0,"y":336.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${NGSILD_HOST}/ngsi-ld/v1/temporal/entities?type=${callType}&timerel=after&timeAt=${now():minus(1800000):format(\"yyyy-MM-dd'T'HH:mm:ss'Z'\")}&timeproperty=modifiedAt","form-body-form-name":null,"Content-Type":"${mime.type}","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","Accept":"application/json","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Socket Write Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"GET","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"Accept":{"name":"Accept","displayName":"Accept","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Socket Write Timeout":{"name":"Socket Write Timeout","displayName":"Socket Write Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":4,"autoTerminatedRelationships":["No Retry","Retry","Original","Failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"inputPorts":[],"outputPorts":[{"identifier":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","instanceIdentifier":"1d90e0b0-18b3-3a33-2a30-9782c9b99eb3","name":"Temporal Entities","position":{"x":1359.0,"y":640.0},"type":"OUTPUT_PORT","concurrentlySchedulableTaskCount":1,"scheduledState":"ENABLED","allowRemoteAccess":false,"componentType":"OUTPUT_PORT","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"connections":[{"identifier":"ec2bac80-c735-3cc0-b25b-c604bee1f665","instanceIdentifier":"ccc1ff91-9c78-3241-cc21-8285f99c16eb","name":"","source":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"f013edbb-265c-3007-1e9c-feceed5b23f9"},"destination":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"29f78dc1-e02d-3fac-25b2-e5d5ecefbec2"},"labelIndex":1,"zIndex":0,"selectedRelationships":["splits"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"9f89d7db-43e4-3c3c-92a3-92073c43e0a2","instanceIdentifier":"851640b7-74c2-3f68-a7a2-eb36ed77757e","name":"","source":{"id":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"GenerateFlowFile","comments":"","instanceIdentifier":"834a739c-1b57-3de3-83c2-590c9b74d988"},"destination":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"f013edbb-265c-3007-1e9c-feceed5b23f9"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"8a3b5d07-1c05-32db-af76-450a23ad8821","instanceIdentifier":"b4d61da4-56db-3550-89cf-983818cc8e9c","name":"","source":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"29f78dc1-e02d-3fac-25b2-e5d5ecefbec2"},"destination":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"1e0d1902-f6c0-30e3-01ae-24a99d50d880"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"5fb243ff-018c-3a57-bdf2-c0446fbb84f3","instanceIdentifier":"6e94a753-9a3e-3fbc-8574-6b3f9855700e","name":"","source":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"1e0d1902-f6c0-30e3-01ae-24a99d50d880"},"destination":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"1d90e0b0-18b3-3a33-2a30-9782c9b99eb3"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE","groupIdentifier":"aef156fa-6773-3e93-9783-c28e1ba0b613"}],"remoteProcessGroups":[],"processors":[{"identifier":"c4f7a560-0d0d-3536-a195-0928f3ac2365","instanceIdentifier":"0172eafb-a70a-3d2b-aecd-254b0ff1991d","name":"Make ND","comments":"","position":{"x":3407.717950590265,"y":719.738274311672},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n outputStream.write(bytearray(text.replace(\"@@@@@\", \"\\n\").encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"d83461a2-4bfa-366b-a557-3d03db37a25e","instanceIdentifier":"3f4db107-013a-3671-c6af-a4b40c2667aa","name":"LogMessage","comments":"","position":{"x":1118.0,"y":959.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","instanceIdentifier":"8018fa50-75e1-3c4c-ec6c-c37d18a6be9d","name":"Get Single Entities","comments":"","position":{"x":1670.0,"y":1031.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass TransformJSON(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entity = json.loads(text)\n template = {'id': entity['id'], 'type': entity['type']}\n tmpList = []\n for attrsKey, attrsValue in entity.items():\n if attrsKey in ['id', 'type', 'modifiedAt', 'createdAt', 'observedAt']:\n continue\n for i in range(len(attrsValue)):\n if len(tmpList) == i:\n tmpEntity = template.copy()\n tmpList.append(tmpEntity)\n else:\n tmpEntity = tmpList[i]\n if type(attrsValue) == dict:\n tmpEntity[attrsKey] = attrsValue\n else:\n tmpEntity[attrsKey] = attrsValue[i]\n if 'observedAt' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['observedAt']\n if 'instanceId' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['instanceId']\n outputStream.write(bytearray(json.dumps(tmpList, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n flowFile = session.write(flowFile, TransformJSON())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"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":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"02135b05-548b-37f2-b5e2-5432f2fc1cac","instanceIdentifier":"e655ac46-4b7e-37ff-d8b0-9d57bc20811b","name":"ExecuteScript","comments":"","position":{"x":2771.5,"y":1015.75},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n result.extend(entity)\n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","instanceIdentifier":"6f10ffb3-62a3-3ad7-787b-e1c1f489cc9b","name":"MergeContent","comments":"","position":{"x":2286.0,"y":1370.5},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"100 KB","Maximum number of Bins":"10","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":"]","Max Bin Age":"180 sec","Demarcator File":",","Correlation Attribute Name":null,"Header File":"[","mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"10"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","instanceIdentifier":"3b128624-00bf-370d-c284-b75d7195af12","name":"SplitJson","comments":"","position":{"x":1086.0,"y":1215.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","instanceIdentifier":"b7d079b1-7ee9-3e82-c8c8-4125f481be54","name":"SplitJson","comments":"","position":{"x":2280.0,"y":448.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"67dc7b8e-46c2-396a-a160-c6e0694175ad","instanceIdentifier":"ac621a5c-c26c-3e49-4690-18356c48909a","name":"MergeContent","comments":"","position":{"x":2808.0,"y":608.0},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"0 B","Maximum number of Bins":"5","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":null,"Max Bin Age":null,"Demarcator File":"@@@@@","Correlation Attribute Name":null,"Header File":null,"mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"1"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"4546e1db-11b6-351e-83ef-44da3e693086","instanceIdentifier":"ab45d658-6c6b-3d2c-c6e7-5a566950802c","name":"PutFile","comments":"","position":{"x":3392.0,"y":368.0},"type":"org.apache.nifi.processors.standard.PutFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Group":null,"Owner":null,"Create Missing Directories":"true","Permissions":null,"Maximum File Count":null,"Last Modified Time":null,"Directory":"/home/nifi/download","Conflict Resolution Strategy":"fail"},"propertyDescriptors":{"Group":{"name":"Group","displayName":"Group","identifiesControllerService":false,"sensitive":false},"Owner":{"name":"Owner","displayName":"Owner","identifiesControllerService":false,"sensitive":false},"Create Missing Directories":{"name":"Create Missing Directories","displayName":"Create Missing Directories","identifiesControllerService":false,"sensitive":false},"Permissions":{"name":"Permissions","displayName":"Permissions","identifiesControllerService":false,"sensitive":false},"Maximum File Count":{"name":"Maximum File Count","displayName":"Maximum File Count","identifiesControllerService":false,"sensitive":false},"Last Modified Time":{"name":"Last Modified Time","displayName":"Last Modified Time","identifiesControllerService":false,"sensitive":false},"Directory":{"name":"Directory","displayName":"Directory","identifiesControllerService":false,"sensitive":false},"Conflict Resolution Strategy":{"name":"Conflict Resolution Strategy","displayName":"Conflict Resolution Strategy","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","instanceIdentifier":"6bff8641-96b6-3e5a-c890-eab055e1ffb4","name":"NGSI-LD to HL7 FHIR","comments":"","position":{"x":2056.0,"y":984.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nimport os\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n forceArray = []\n def __init__(self):\n forceArrayStr = os.environ.get('FORCE_ARRAY', '')\n self.forceArray = forceArrayStr.split(',')\n\n def cleanKeys(self, subTmp):\n if type(subTmp) == list:\n result = []\n for i in subTmp:\n result.append(self.cleanKeys(subTmp))\n return result\n elif type(subTmp) == dict:\n result = {}\n for key, value in subTmp.items():\n key = key.split('/')[-1].split(':')[-1].split('#')[-1]\n result[key] = self.cleanKeys(value)\n return result\n else:\n return subTmp\n\n def getAttribute(self, value, attribKey):\n log.warn('attrib key: ' + attribKey)\n log.warn('value: ' + str(value))\n if type(value) == list:\n result = []\n for entry in value:\n subTmp = self.getAttribute(entry, attribKey)\n if subTmp:\n result.append(subTmp)\n elif type(value) == dict:\n result = {}\n for key, value in value.items():\n log.warn('sub key: ' + key)\n if not value:\n log.warn('value is none') \n else:\n log.warn('value: ' + str(value)) \n if key in ['type', 'createdAt', 'observedAt', 'modifiedAt']:\n log.warn('continue type ca oa ma')\n continue\n if key in ['value', 'object']:\n log.warn('value found')\n result['value'] = value\n else:\n log.warn('else ')\n subTmp = self.getAttribute(value, key)\n if subTmp:\n result[key] = subTmp\n if 'value' not in result.keys():\n log.warn('value not in result')\n log.warn(str(result))\n return None\n if len(result) == 1:\n result = result['value']\n else:\n if type(result['value']) == list:\n tmp = result['value']\n del result['value']\n tmp.append(result)\n result = tmp\n elif type(result['value']) == dict:\n tmp = result['value']\n del result['value']\n tmp.update(result)\n result = tmp\n else:\n result = value\n if attribKey in self.forceArray and type(result) != list:\n result = [result]\n return result\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n newEntity = {}\n if 'resourceType' not in entity.keys():\n entity['resourceType'] = {'type': 'Property', 'value': entity['type']}\n for key, value in entity.items():\n if key in ['id']:\n newEntity[key] = value\n continue\n if key in ['observedAt', 'modifiedAt', 'createdAt', 'type']:\n continue\n key = key.split('/')[-1].split(':')[-1].split('#')[-1]\n log.warn('calling from entity root with key ' + key)\n subTmp = self.getAttribute(value, key)\n if subTmp:\n log.warn('before clean')\n log.warn(str(subTmp))\n subTmp = self.cleanKeys(subTmp)\n log.warn('after clean')\n log.warn(str(subTmp))\n newEntity[key] = subTmp\n result.append(newEntity) \n \n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.warn(str(e))\n# log.warn(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"aef156fa-6773-3e93-9783-c28e1ba0b613"}],"inputPorts":[],"outputPorts":[],"connections":[{"identifier":"e1ebafe5-9639-32a8-a7f6-7431948a7e40","instanceIdentifier":"b0ee76a7-f95d-316a-0fbb-3c1bcdec3a66","name":"","source":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"1d90e0b0-18b3-3a33-2a30-9782c9b99eb3"},"destination":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"SplitJson","comments":"","instanceIdentifier":"3b128624-00bf-370d-c284-b75d7195af12"},"labelIndex":1,"zIndex":0,"selectedRelationships":[""],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"97865dec-8d71-32be-a945-079949480b3e","instanceIdentifier":"ba0d801e-64b2-38ff-fa7f-91840ee54699","name":"","source":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"MergeContent","comments":"","instanceIdentifier":"ac621a5c-c26c-3e49-4690-18356c48909a"},"destination":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"Make ND","comments":"","instanceIdentifier":"0172eafb-a70a-3d2b-aecd-254b0ff1991d"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"57503fba-3217-3582-993f-83fcea78d73f","instanceIdentifier":"2a22b430-b63f-3aa3-4f65-76a18de17618","name":"","source":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"SplitJson","comments":"","instanceIdentifier":"b7d079b1-7ee9-3e82-c8c8-4125f481be54"},"destination":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"MergeContent","comments":"","instanceIdentifier":"ac621a5c-c26c-3e49-4690-18356c48909a"},"labelIndex":1,"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":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"104da2d5-95a1-3c6a-b260-d54b7d12bf89","instanceIdentifier":"d17b2b50-fe00-3a09-f450-3aefc117b8de","name":"","source":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"SplitJson","comments":"","instanceIdentifier":"3b128624-00bf-370d-c284-b75d7195af12"},"destination":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"Get Single Entities","comments":"","instanceIdentifier":"8018fa50-75e1-3c4c-ec6c-c37d18a6be9d"},"labelIndex":1,"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":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"559928a8-1282-3761-b9a0-2614e01ecadf","instanceIdentifier":"af9b9817-6d9d-35b9-384c-95b2b28f9849","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"Get Single Entities","comments":"","instanceIdentifier":"8018fa50-75e1-3c4c-ec6c-c37d18a6be9d"},"destination":{"id":"d83461a2-4bfa-366b-a557-3d03db37a25e","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"LogMessage","comments":"","instanceIdentifier":"3f4db107-013a-3671-c6af-a4b40c2667aa"},"labelIndex":1,"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":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"56a78445-bf9c-3744-a8a2-9a9f9b38d51b","instanceIdentifier":"13b677dd-554d-3459-a500-8b3b63057fdd","name":"","source":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"6bff8641-96b6-3e5a-c890-eab055e1ffb4"},"destination":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"SplitJson","comments":"","instanceIdentifier":"b7d079b1-7ee9-3e82-c8c8-4125f481be54"},"labelIndex":1,"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":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"9e995a06-4b64-3a25-ac1e-6817aec991c6","instanceIdentifier":"acd05dfd-0a6b-3d57-6ade-fc3a94d5cd74","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"Get Single Entities","comments":"","instanceIdentifier":"8018fa50-75e1-3c4c-ec6c-c37d18a6be9d"},"destination":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"MergeContent","comments":"","instanceIdentifier":"6f10ffb3-62a3-3ad7-787b-e1c1f489cc9b"},"labelIndex":1,"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":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"38c05b85-5f11-3f7f-80d6-c6b41a7fd75e","instanceIdentifier":"9fbb5784-d28a-367f-4e9c-d11af3a68aeb","name":"","source":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"MergeContent","comments":"","instanceIdentifier":"6f10ffb3-62a3-3ad7-787b-e1c1f489cc9b"},"destination":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"ExecuteScript","comments":"","instanceIdentifier":"e655ac46-4b7e-37ff-d8b0-9d57bc20811b"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"044fe185-8789-3c80-b927-49da787a4971","instanceIdentifier":"afb2c7ef-c5b7-328c-4b3f-bc7a70fce828","name":"","source":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"Make ND","comments":"","instanceIdentifier":"0172eafb-a70a-3d2b-aecd-254b0ff1991d"},"destination":{"id":"4546e1db-11b6-351e-83ef-44da3e693086","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"PutFile","comments":"","instanceIdentifier":"ab45d658-6c6b-3d2c-c6e7-5a566950802c"},"labelIndex":1,"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":"aef156fa-6773-3e93-9783-c28e1ba0b613"},{"identifier":"d952c0da-248f-36b9-ae66-58a81f1e222e","instanceIdentifier":"ef229059-2f70-3227-ace8-a07b6750ec6d","name":"","source":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"ExecuteScript","comments":"","instanceIdentifier":"e655ac46-4b7e-37ff-d8b0-9d57bc20811b"},"destination":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"aef156fa-6773-3e93-9783-c28e1ba0b613","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"6bff8641-96b6-3e5a-c890-eab055e1ffb4"},"labelIndex":1,"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":"aef156fa-6773-3e93-9783-c28e1ba0b613"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE"},"externalControllerServices":{},"parameterContexts":{},"flowEncodingVersion":"1.0","parameterProviders":{},"latest":false} \ No newline at end of file +{"flowContents":{"identifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","instanceIdentifier":"fe412687-018c-1000-68da-04259bd350c9","name":"NiFi Flow","comments":"","position":{"x":0.0,"y":0.0},"processGroups":[{"identifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","instanceIdentifier":"93c97635-df2c-3a67-8fb3-f67744790cab","name":"NGSI-LD continuous Temporal Query ","comments":"","position":{"x":606.0,"y":967.0},"processGroups":[],"remoteProcessGroups":[],"processors":[{"identifier":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","instanceIdentifier":"908e73d1-6b83-307f-7298-c41ed6d668ad","name":"GenerateFlowFile","comments":"","position":{"x":128.0,"y":0.0},"type":"org.apache.nifi.processors.standard.GenerateFlowFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"character-set":"UTF-8","File Size":"0B","mime-type":null,"generate-ff-custom-text":"${ENTITY_TYPES}","Batch Size":"1","Unique FlowFiles":"false","Data Format":"Text"},"propertyDescriptors":{"character-set":{"name":"character-set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"File Size":{"name":"File Size","displayName":"File Size","identifiesControllerService":false,"sensitive":false},"mime-type":{"name":"mime-type","displayName":"Mime Type","identifiesControllerService":false,"sensitive":false},"generate-ff-custom-text":{"name":"generate-ff-custom-text","displayName":"Custom Text","identifiesControllerService":false,"sensitive":false},"Batch Size":{"name":"Batch Size","displayName":"Batch Size","identifiesControllerService":false,"sensitive":false},"Unique FlowFiles":{"name":"Unique FlowFiles","displayName":"Unique FlowFiles","identifiesControllerService":false,"sensitive":false},"Data Format":{"name":"Data Format","displayName":"Data Format","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"1800 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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"3a35ae06-e813-3e9c-a06f-35e859e6917b","instanceIdentifier":"95fc7b88-260b-3837-ac44-a2899c89fd30","name":"SplitContent","comments":"","position":{"x":440.0,"y":320.0},"type":"org.apache.nifi.processors.standard.SplitContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Byte Sequence Location":"Trailing","Keep Byte Sequence":"false","Byte Sequence Format":"Text","Byte Sequence":","},"propertyDescriptors":{"Byte Sequence Location":{"name":"Byte Sequence Location","displayName":"Byte Sequence Location","identifiesControllerService":false,"sensitive":false},"Keep Byte Sequence":{"name":"Keep Byte Sequence","displayName":"Keep Byte Sequence","identifiesControllerService":false,"sensitive":false},"Byte Sequence Format":{"name":"Byte Sequence Format","displayName":"Byte Sequence Format","identifiesControllerService":false,"sensitive":false},"Byte Sequence":{"name":"Byte Sequence","displayName":"Byte Sequence","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","instanceIdentifier":"0ec8a771-17ad-33f5-885f-f05daf6e56b5","name":"ExtractText","comments":"","position":{"x":904.0,"y":528.0},"type":"org.apache.nifi.processors.standard.ExtractText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Enable Unicode Predefined Character Classes":"false","Permit Whitespace and Comments in Pattern":"false","Enable Unicode-aware Case Folding":"false","Enable DOTALL Mode":"false","Enable Unix Lines Mode":"false","extract-text-enable-named-groups":"false","Maximum Buffer Size":"1 MB","Enable Canonical Equivalence":"false","callType":"(.*)","Enable Case-insensitive Matching":"false","Enable Multiline Mode":"false","Maximum Capture Group Length":"1024","Enable Literal Parsing of the Pattern":"false","Character Set":"UTF-8","Include Capture Group 0":"true","extract-text-enable-repeating-capture-group":"false"},"propertyDescriptors":{"Enable Unicode Predefined Character Classes":{"name":"Enable Unicode Predefined Character Classes","displayName":"Enable Unicode Predefined Character Classes","identifiesControllerService":false,"sensitive":false},"Permit Whitespace and Comments in Pattern":{"name":"Permit Whitespace and Comments in Pattern","displayName":"Permit Whitespace and Comments in Pattern","identifiesControllerService":false,"sensitive":false},"Enable Unicode-aware Case Folding":{"name":"Enable Unicode-aware Case Folding","displayName":"Enable Unicode-aware Case Folding","identifiesControllerService":false,"sensitive":false},"Enable DOTALL Mode":{"name":"Enable DOTALL Mode","displayName":"Enable DOTALL Mode","identifiesControllerService":false,"sensitive":false},"Enable Unix Lines Mode":{"name":"Enable Unix Lines Mode","displayName":"Enable Unix Lines Mode","identifiesControllerService":false,"sensitive":false},"extract-text-enable-named-groups":{"name":"extract-text-enable-named-groups","displayName":"Enable named group support","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Enable Canonical Equivalence":{"name":"Enable Canonical Equivalence","displayName":"Enable Canonical Equivalence","identifiesControllerService":false,"sensitive":false},"callType":{"name":"callType","displayName":"callType","identifiesControllerService":false,"sensitive":false},"Enable Case-insensitive Matching":{"name":"Enable Case-insensitive Matching","displayName":"Enable Case-insensitive Matching","identifiesControllerService":false,"sensitive":false},"Enable Multiline Mode":{"name":"Enable Multiline Mode","displayName":"Enable Multiline Mode","identifiesControllerService":false,"sensitive":false},"Maximum Capture Group Length":{"name":"Maximum Capture Group Length","displayName":"Maximum Capture Group Length","identifiesControllerService":false,"sensitive":false},"Enable Literal Parsing of the Pattern":{"name":"Enable Literal Parsing of the Pattern","displayName":"Enable Literal Parsing of the Pattern","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Include Capture Group 0":{"name":"Include Capture Group 0","displayName":"Include Capture Group 0","identifiesControllerService":false,"sensitive":false},"extract-text-enable-repeating-capture-group":{"name":"extract-text-enable-repeating-capture-group","displayName":"Enable repeating capture group","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"72d0db0d-c388-3ad8-a5eb-d22903025c21","instanceIdentifier":"c119a006-15ed-3ecc-dab8-7839c550dc55","name":"Get Temporal Entities","comments":"","position":{"x":1224.0,"y":336.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${NGSILD_HOST}/ngsi-ld/v1/temporal/entities?type=${callType}&timerel=after&timeAt=${now():minus(1800000):format(\"yyyy-MM-dd'T'HH:mm:ss'Z'\")}&timeproperty=modifiedAt","form-body-form-name":null,"Content-Type":"${mime.type}","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","Accept":"application/json","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Socket Write Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"GET","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"Accept":{"name":"Accept","displayName":"Accept","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Socket Write Timeout":{"name":"Socket Write Timeout","displayName":"Socket Write Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":4,"autoTerminatedRelationships":["No Retry","Retry","Original","Failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"inputPorts":[],"outputPorts":[{"identifier":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","instanceIdentifier":"b5e4f5f2-b0da-3662-e195-1961a7ae0c53","name":"Temporal Entities","position":{"x":1359.0,"y":640.0},"type":"OUTPUT_PORT","concurrentlySchedulableTaskCount":1,"scheduledState":"ENABLED","allowRemoteAccess":false,"componentType":"OUTPUT_PORT","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"connections":[{"identifier":"ec2bac80-c735-3cc0-b25b-c604bee1f665","instanceIdentifier":"fc46d018-a31e-37c0-e655-9b00646d2b12","name":"","source":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"95fc7b88-260b-3837-ac44-a2899c89fd30"},"destination":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"0ec8a771-17ad-33f5-885f-f05daf6e56b5"},"labelIndex":1,"zIndex":0,"selectedRelationships":["splits"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"9f89d7db-43e4-3c3c-92a3-92073c43e0a2","instanceIdentifier":"db1ebd2b-d4b5-3e0d-7dfa-735eca9f74c6","name":"","source":{"id":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"GenerateFlowFile","comments":"","instanceIdentifier":"908e73d1-6b83-307f-7298-c41ed6d668ad"},"destination":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"95fc7b88-260b-3837-ac44-a2899c89fd30"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"8a3b5d07-1c05-32db-af76-450a23ad8821","instanceIdentifier":"f9c085c9-305e-3051-675b-feb03b801ca7","name":"","source":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"0ec8a771-17ad-33f5-885f-f05daf6e56b5"},"destination":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"c119a006-15ed-3ecc-dab8-7839c550dc55"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"5fb243ff-018c-3a57-bdf2-c0446fbb84f3","instanceIdentifier":"dd778674-00e5-3c21-77e1-c026a72f650d","name":"","source":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"c119a006-15ed-3ecc-dab8-7839c550dc55"},"destination":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"b5e4f5f2-b0da-3662-e195-1961a7ae0c53"},"labelIndex":1,"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":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE","flowFileConcurrency":"UNBOUNDED","groupIdentifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"}],"remoteProcessGroups":[],"processors":[{"identifier":"d83461a2-4bfa-366b-a557-3d03db37a25e","instanceIdentifier":"0e3a7eee-0998-3a97-8829-0ee86c4623ff","name":"LogMessage","comments":"","position":{"x":1118.0,"y":959.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"c4f7a560-0d0d-3536-a195-0928f3ac2365","instanceIdentifier":"fe1695b1-86c2-3e47-850a-f50b6ebddef5","name":"Make ND","comments":"","position":{"x":3407.717950590265,"y":719.738274311672},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n outputStream.write(bytearray(text.replace(\"@@@@@\", \"\\n\").encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","instanceIdentifier":"f2de1a59-fefe-3c93-afa0-e541502b4e2e","name":"Get Single Entities","comments":"","position":{"x":1670.0,"y":1031.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass TransformJSON(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entity = json.loads(text)\n template = {'id': entity['id'], 'type': entity['type']}\n tmpList = []\n for attrsKey, attrsValue in entity.items():\n if attrsKey in ['id', 'type', 'modifiedAt', 'createdAt', 'observedAt']:\n continue\n if type(attrsValue) == dict and 'type' in attrsValue.keys():\n attrsValue = [attrsValue]\n if type(attrsValue) != list:\n continue\n for i in range(len(attrsValue)):\n if len(tmpList) == i:\n tmpEntity = template.copy()\n tmpList.append(tmpEntity)\n else:\n tmpEntity = tmpList[i]\n if type(attrsValue) == dict:\n tmpEntity[attrsKey] = attrsValue\n else:\n tmpEntity[attrsKey] = attrsValue[i]\n if 'observedAt' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['observedAt']\n if 'instanceId' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['instanceId']\n outputStream.write(bytearray(json.dumps(tmpList, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n flowFile = session.write(flowFile, TransformJSON())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"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":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"02135b05-548b-37f2-b5e2-5432f2fc1cac","instanceIdentifier":"f00ec316-66ce-38d6-3027-8ba4cc2c418c","name":"ExecuteScript","comments":"","position":{"x":2771.5,"y":1015.75},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n result.extend(entity)\n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","instanceIdentifier":"f130471e-3690-3873-8e25-efc79fd8a98b","name":"MergeContent","comments":"","position":{"x":2286.0,"y":1370.5},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"100 KB","Maximum number of Bins":"10","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":"]","Max Bin Age":"180 sec","Demarcator File":",","Correlation Attribute Name":null,"Header File":"[","mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"10"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","instanceIdentifier":"66e90f6c-ea58-3b24-88c8-752864e78e83","name":"SplitJson","comments":"","position":{"x":2280.0,"y":448.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","instanceIdentifier":"2945a98f-aaad-3735-1eb6-090084e0b16c","name":"SplitJson","comments":"","position":{"x":1086.0,"y":1215.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"67dc7b8e-46c2-396a-a160-c6e0694175ad","instanceIdentifier":"751ce109-c36e-3bc5-d1d2-71ea030af691","name":"MergeContent","comments":"","position":{"x":2808.0,"y":608.0},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"0 B","Maximum number of Bins":"5","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":null,"Max Bin Age":null,"Demarcator File":"@@@@@","Correlation Attribute Name":null,"Header File":null,"mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"1"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"4546e1db-11b6-351e-83ef-44da3e693086","instanceIdentifier":"661ae21d-fa5b-3e5f-fb15-0b48c6f7fc9e","name":"PutFile","comments":"","position":{"x":3392.0,"y":368.0},"type":"org.apache.nifi.processors.standard.PutFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.23.2"},"properties":{"Group":null,"Owner":null,"Create Missing Directories":"true","Permissions":null,"Maximum File Count":null,"Last Modified Time":null,"Directory":"/home/nifi/download","Conflict Resolution Strategy":"fail"},"propertyDescriptors":{"Group":{"name":"Group","displayName":"Group","identifiesControllerService":false,"sensitive":false},"Owner":{"name":"Owner","displayName":"Owner","identifiesControllerService":false,"sensitive":false},"Create Missing Directories":{"name":"Create Missing Directories","displayName":"Create Missing Directories","identifiesControllerService":false,"sensitive":false},"Permissions":{"name":"Permissions","displayName":"Permissions","identifiesControllerService":false,"sensitive":false},"Maximum File Count":{"name":"Maximum File Count","displayName":"Maximum File Count","identifiesControllerService":false,"sensitive":false},"Last Modified Time":{"name":"Last Modified Time","displayName":"Last Modified Time","identifiesControllerService":false,"sensitive":false},"Directory":{"name":"Directory","displayName":"Directory","identifiesControllerService":false,"sensitive":false},"Conflict Resolution Strategy":{"name":"Conflict Resolution Strategy","displayName":"Conflict Resolution Strategy","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","instanceIdentifier":"5be317bb-bf5a-3c03-c92e-4b8611bd8fda","name":"NGSI-LD to HL7 FHIR","comments":"","position":{"x":2056.0,"y":984.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.23.2"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nimport os\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n forceArray = []\n def __init__(self):\n forceArrayStr = os.environ.get('FORCE_ARRAY', '')\n self.forceArray = forceArrayStr.split(',')\n\n def cleanKeys(self, subTmp):\n if type(subTmp) == list:\n result = []\n for i in subTmp:\n result.append(self.cleanKeys(subTmp))\n return result\n elif type(subTmp) == dict:\n result = {}\n for key, value in subTmp.items():\n key = key.split('/')[-1].split(':')[-1].split('#')[-1]\n result[key] = self.cleanKeys(value)\n return result\n else:\n return subTmp\n\n def getAttribute(self, value, attribKey):\n log.warn('attrib key: ' + attribKey)\n log.warn('value: ' + str(value))\n if type(value) == list:\n result = []\n for entry in value:\n subTmp = self.getAttribute(entry, attribKey)\n if subTmp:\n result.append(subTmp)\n elif type(value) == dict:\n result = {}\n for key, value in value.items():\n log.warn('sub key: ' + key)\n if not value:\n log.warn('value is none') \n else:\n log.warn('value: ' + str(value)) \n if key in ['type', 'createdAt', 'observedAt', 'modifiedAt']:\n log.warn('continue type ca oa ma')\n continue\n if key in ['value', 'object']:\n log.warn('value found')\n result['value'] = value\n else:\n log.warn('else ')\n subTmp = self.getAttribute(value, key)\n if subTmp:\n result[key] = subTmp\n if 'value' not in result.keys():\n log.warn('value not in result')\n log.warn(str(result))\n return None\n if len(result) == 1:\n result = result['value']\n else:\n if type(result['value']) == list:\n tmp = result['value']\n del result['value']\n tmp.append(result)\n result = tmp\n elif type(result['value']) == dict:\n tmp = result['value']\n del result['value']\n tmp.update(result)\n result = tmp\n else:\n result = value\n if attribKey in self.forceArray and type(result) != list:\n result = [result]\n return result\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n newEntity = {}\n if 'resourceType' not in entity.keys():\n entity['resourceType'] = {'type': 'Property', 'value': entity['type']}\n for key, value in entity.items():\n if key in ['id']:\n newEntity[key] = value\n continue\n if key in ['observedAt', 'modifiedAt', 'createdAt', 'type']:\n continue\n key = key.split('/')[-1].split(':')[-1].split('#')[-1]\n log.warn('calling from entity root with key ' + key)\n subTmp = self.getAttribute(value, key)\n if subTmp:\n log.warn('before clean')\n log.warn(str(subTmp))\n subTmp = self.cleanKeys(subTmp)\n log.warn('after clean')\n log.warn(str(subTmp))\n newEntity[key] = subTmp\n result.append(newEntity) \n \n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.warn(str(e))\n# log.warn(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["FILE","DIRECTORY"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"}],"inputPorts":[],"outputPorts":[],"connections":[{"identifier":"e1ebafe5-9639-32a8-a7f6-7431948a7e40","instanceIdentifier":"ffcc03bf-e0dc-3f47-9789-98719fdce31b","name":"","source":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"b5e4f5f2-b0da-3662-e195-1961a7ae0c53"},"destination":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"SplitJson","comments":"","instanceIdentifier":"2945a98f-aaad-3735-1eb6-090084e0b16c"},"labelIndex":1,"zIndex":0,"selectedRelationships":[""],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"97865dec-8d71-32be-a945-079949480b3e","instanceIdentifier":"8af86e83-3f8b-3baf-aede-b41126c66ecc","name":"","source":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"MergeContent","comments":"","instanceIdentifier":"751ce109-c36e-3bc5-d1d2-71ea030af691"},"destination":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"Make ND","comments":"","instanceIdentifier":"fe1695b1-86c2-3e47-850a-f50b6ebddef5"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"57503fba-3217-3582-993f-83fcea78d73f","instanceIdentifier":"c95f88c5-813b-36d1-9c5a-a3fb39c2ba1d","name":"","source":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"SplitJson","comments":"","instanceIdentifier":"66e90f6c-ea58-3b24-88c8-752864e78e83"},"destination":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"MergeContent","comments":"","instanceIdentifier":"751ce109-c36e-3bc5-d1d2-71ea030af691"},"labelIndex":1,"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":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"104da2d5-95a1-3c6a-b260-d54b7d12bf89","instanceIdentifier":"0ec254d8-1ada-36b4-73c4-52ecd9b76ce5","name":"","source":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"SplitJson","comments":"","instanceIdentifier":"2945a98f-aaad-3735-1eb6-090084e0b16c"},"destination":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"Get Single Entities","comments":"","instanceIdentifier":"f2de1a59-fefe-3c93-afa0-e541502b4e2e"},"labelIndex":1,"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":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"559928a8-1282-3761-b9a0-2614e01ecadf","instanceIdentifier":"13aa860b-428a-3984-d989-1c8d4fa93c1d","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"Get Single Entities","comments":"","instanceIdentifier":"f2de1a59-fefe-3c93-afa0-e541502b4e2e"},"destination":{"id":"d83461a2-4bfa-366b-a557-3d03db37a25e","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"LogMessage","comments":"","instanceIdentifier":"0e3a7eee-0998-3a97-8829-0ee86c4623ff"},"labelIndex":1,"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":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"56a78445-bf9c-3744-a8a2-9a9f9b38d51b","instanceIdentifier":"5c448a75-462d-3c31-9c6a-ed6a7429dfce","name":"","source":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"5be317bb-bf5a-3c03-c92e-4b8611bd8fda"},"destination":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"SplitJson","comments":"","instanceIdentifier":"66e90f6c-ea58-3b24-88c8-752864e78e83"},"labelIndex":1,"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":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"38c05b85-5f11-3f7f-80d6-c6b41a7fd75e","instanceIdentifier":"d347669f-de64-3328-9113-7d328aa56f12","name":"","source":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"MergeContent","comments":"","instanceIdentifier":"f130471e-3690-3873-8e25-efc79fd8a98b"},"destination":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"ExecuteScript","comments":"","instanceIdentifier":"f00ec316-66ce-38d6-3027-8ba4cc2c418c"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"9e995a06-4b64-3a25-ac1e-6817aec991c6","instanceIdentifier":"9ea5f120-6561-30ff-dad3-134783980019","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"Get Single Entities","comments":"","instanceIdentifier":"f2de1a59-fefe-3c93-afa0-e541502b4e2e"},"destination":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"MergeContent","comments":"","instanceIdentifier":"f130471e-3690-3873-8e25-efc79fd8a98b"},"labelIndex":1,"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":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"d952c0da-248f-36b9-ae66-58a81f1e222e","instanceIdentifier":"71a609b2-d2c3-3cd0-b00e-088a5d690b51","name":"","source":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"ExecuteScript","comments":"","instanceIdentifier":"f00ec316-66ce-38d6-3027-8ba4cc2c418c"},"destination":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"5be317bb-bf5a-3c03-c92e-4b8611bd8fda"},"labelIndex":1,"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":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"},{"identifier":"044fe185-8789-3c80-b927-49da787a4971","instanceIdentifier":"7822f6f5-e158-3417-64a1-5e617b91941f","name":"","source":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"Make ND","comments":"","instanceIdentifier":"fe1695b1-86c2-3e47-850a-f50b6ebddef5"},"destination":{"id":"4546e1db-11b6-351e-83ef-44da3e693086","type":"PROCESSOR","groupId":"9d86befe-9ec3-3ac6-bac3-3991405b4da3","name":"PutFile","comments":"","instanceIdentifier":"661ae21d-fa5b-3e5f-fb15-0b48c6f7fc9e"},"labelIndex":1,"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":"9d86befe-9ec3-3ac6-bac3-3991405b4da3"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE","flowFileConcurrency":"UNBOUNDED"},"externalControllerServices":{},"parameterContexts":{},"flowEncodingVersion":"1.0","parameterProviders":{},"latest":false} \ No newline at end of file