Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
I have a JSON document that I want to index into Hbase.
{
"field1" : {
"nestedfield" : "value1"
}
"field2" : "value2"
}
In this case I want `nestedfield` to be the one used as a row identifier field, but I can't figure out how to specify this to the `PutHBaseJson` processor. I have tried multiple ways :
- field1/nestedfiled
- field1['nestedfiled']
- field1.nestedfield
- $.filed1.nestedfiled
None of them are working, the processor is saying that "the Row ID was null".
Using `field2` for this purpose is working fwiw.
Created 03-29-2022 04:44 PM
@sheep ,
You need to add an EvaluateJsonPath processor before your PutHBaseJson to extract the value that you need and save it as an attribute in the flowfile. For example, you could get the value from $.field1.nestedfield and save that as the attribute mynestedfieldvalue. You can then refer to that attribute in your PutHBaseJson processor as ${mynestedfieldvalue}.
Please check out this other answer to a similar question: https://community.cloudera.com/t5/Support-Questions/Hash-key-value-missing-putdynamodb-nifi/m-p/3396...
Cheers,
André
Created 03-29-2022 04:44 PM
@sheep ,
You need to add an EvaluateJsonPath processor before your PutHBaseJson to extract the value that you need and save it as an attribute in the flowfile. For example, you could get the value from $.field1.nestedfield and save that as the attribute mynestedfieldvalue. You can then refer to that attribute in your PutHBaseJson processor as ${mynestedfieldvalue}.
Please check out this other answer to a similar question: https://community.cloudera.com/t5/Support-Questions/Hash-key-value-missing-putdynamodb-nifi/m-p/3396...
Cheers,
André