Search code examples
apache-nifi

EvaluateJsonPath in NiFi returns empty string


The output of ExecuteSqlRecord is fed to EvaluateJsonPath and it returns empty string. Output of ExecuteSqlRecord:

[
  {
    "X_LAST_DAY": "1618459200000",
    "X_FIRST_DAY_3MON_PREV": "1610427600000",
    "X_FIRST_DAY_1MON_PREV": "1615525200000",
    "X_LAST_DAY_1MON_PREV": "1617163200000"
  }
]

The attribute values are coming as 'Empty String Set'. Why is it coming as empty and what am I doing wrong?
In the EvaluateJsonPath, I have also tried different options like setting the following.
Return Type - auto-detect
Null Value Representation - empty string



Solution

  • your data is array, which should be split. use SplitJson before EvaluateJsonPath

    enter image description here