Search code examples
jsonapache-nifijoltnifi-processor

what can be a better way to remove empty flowfiles which contents only curly braces


Is there any better way to remove the empty flowfile which contents only curly braces {} . I have achieved, (attaching the flow for reference) but looking for short and effective method like Jolt Spec or any other to reduce the processing time and processor count.

Attaching the screenshot of flowfile content

And I'm using below approach


Solution

  • You can use "@" wildcard vs. "" matching nested within a wrapper object notation with key "*" in a JoltTransformJSON processor such as

    [
      {
        "operation": "shift",
        "spec": {
          "*": {
            "@": ""
          }
        }
      }
    ]