SplitJSON doesnt split anything
Hello,
I'm new to nifi so my problem may be dumb. Sorry if it seems really basic.
I'm trying to use nifi to :
1/ Read a JSON response from a REST GET endpoint.
2/ Parse the JSON and split some JSON array into JSON objects
3/ insert objects in SQL.
I'm stuck at Step 2 because my SplitJSON doesnt return anything. No error as well.
Here is a sample of my JSON :
{
"context":"q%3D%2523all%26q.restriction%3Dclass%253Acr_hashtag%26of%3Djson",
"nhits":1000000,
"nmatches":1000000,
"start":0,
"ellql":"#query{nbdocs=26966678, text_relevance.expr=\"@term.score*@proximity+@b\", noproximity, term.score=NO_RANKING}(#and(#true() #category(categories,\"Top/datamodelclass/cr_hashtag\") ))",
"executor":null,
"estimated":false,
"autocorrected":false,
"spellCheckSuggestions":{
"origStr":null,
"suggestions":[
]
},
"hits":[
{
"did":1,
"url":"ID=10055&",
"buildGroup":"bg0",
"source":null,
"slice":3,
"score":0,
"sort":0,
"groups":[
],
"metas":[
{
"name":"created_by",
"type":2,
"value":"L37"
},
{
"name":"created_dttm",
"type":2,
"value":"2022/07/13 11:29:30"
},
{
"name":"last_modified_dttm",
"type":2,
"value":"2022/07/13 11:29:30"
},
{
"name":"legal_entity_id",
"type":2,
"value":"100000000000313"
},
{
"name":"source",
"type":2,
"value":"consolidation-cbx_bg0"
},
{
"name":"tags",
"type":2,
"value":"test10055"
},
{
"name":"id",
"type":2,
"value":"10055"
},
{
"name":"url",
"type":2,
"value":"ID=10055&"
}
]
},
{
"did":2,
"url":"ID=10119&",
"buildGroup":"bg0",
"source":null,
"slice":4,
"score":0,
"sort":0,
"groups":[
],
"metas":[
{
"name":"created_by",
"type":2,
"value":"L37"
},
{
"name":"created_dttm",
"type":2,
"value":"2022/07/13 11:29:30"
},
{
"name":"last_modified_dttm",
"type":2,
"value":"2022/07/13 11:29:30"
},
{
"name":"legal_entity_id",
"type":2,
"value":"100000000000313"
},
{
"name":"source",
"type":2,
"value":"consolidation-cbx_bg0"
},
{
"name":"tags",
"type":2,
"value":"test10119"
},
{
"name":"id",
"type":2,
"value":"10119"
},
{
"name":"url",
"type":2,
"value":"ID=10119&"
}
]
}
]
}
I want to split the "hits" array.
This is my nifi config so far. I'm able to get the JSON from the invokeHTTP



Still, the output of the relation "split" is empty... The one of "failure" as well. I have no idea what's going on.
What am i doing wrong?
Thanks for your help

