Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions nifi/user_python_extensions/convert_json_to_attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ class Java:

class ProcessorDetails:
version = '0.0.1'
description = "Build ids_csv attribute from merged JSON records (dedupe, numeric-only)"
tags = ["ids", "sql", "in-clause"]

def __init__(self, jvm: JVMView):
super().__init__(jvm)

self.field_name: str = "base64"
self.field_name: str = "id"

# this is directly mirrored to the UI
self._properties: list[PropertyDescriptor] = [
Expand All @@ -40,9 +42,6 @@ def __init__(self, jvm: JVMView):
validators=[StandardValidators.NON_EMPTY_VALIDATOR])
]

self.description = "Build ids_csv attribute from merged JSON records (dedupe, numeric-only)"
self.tags = ["ids", "sql", "in-clause"]

self.descriptors: list[PropertyDescriptor] = self._properties

@overrides
Expand All @@ -61,7 +60,6 @@ def transform(self, context: ProcessContext, flowFile: JavaObject) -> FlowFileTr
except Exception:
parsed = []


records = parsed if isinstance(parsed, list) else parsed.get("records", [])
if not isinstance(records, list):
records = []
Expand Down
4 changes: 2 additions & 2 deletions nifi/user_scripts/tests/nifi/test_service_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from nifi.user_scripts.dto.nifi_api_config import NiFiAPIConfig
from nifi.user_scripts.dto.service_health import DatabaseHealth, ElasticHealth, NiFiHealth
from nifi.user_scripts.utils.generic import get_logger
from nifi.user_scripts.utils.nifi.nifi_api_client import NiFiClient, NiFiRegistryClient
from nifi.user_scripts.utils.health.service import check_elasticsearch, check_kibana, check_postgres
from nifi.user_scripts.utils.nifi.nifi_api_client import NiFiClient, NiFiRegistryClient


class TestServices(unittest.TestCase):
Expand Down Expand Up @@ -51,4 +51,4 @@ def test_elastic_health(self):
def test_kibana_health(self):
elastic_health: ElasticHealth = check_kibana(self.elastic_config)
self.assertTrue(elastic_health.connected)
self.assertEqual(elastic_health.status, "healthy")
self.assertEqual(elastic_health.status, "healthy")