I am new on Apache Nifi
We create Nifi flow, which is consuming json data from kafka and the results are being sent to another kafka topic after enrichment. However HBase lookup does not return value of key. Instead it returns key, value pair like MapRecord[{SERIAL_NUM=123456789}]. But I require only value as '123456789'.
I could not resolve this issue. can anybody help me about this topic?
I am sharing the output of my flow. We want to see value of "hbase_integid" as "123456789", but lookup service returns
MapRecord[{SERIAL_NUM=123456789}]"
How can we extract only value of SERIAL_NUM value ("123456789")??
[
{
"table" : SIEBEL.S_ASSET,
"op" : Update,
"hbase_integid" : **MapRecord[{SERIAL_NUM=123456789}]**,
"op_type" : U,
"op_ts" : 2018-04-02 05:48:35.055299,
"current_ts" : 2018-04-02T08:48:40.071000,
"pos" : 00000000020530642196,
"before" : {
"ROW_ID" : 1-G7B7EGF,
"BILLACCT_ID" : ,
"BILL_ACCNT_ID" : 1-G79GNWP,
"BILL_PROFILE_ID" : 1-1FJHFB0,
"INTEGRATION_ID" : 1-G79GU5K,
"NAME" : ,
"OWNER_ACCNT_ID" : 1-G79GEVV,
"OWNER_CON_ID" : 1-G79GEW3,
"PROD_ID" : 1-Q5B470,
"PROMOTION_ID" : ,
"PROM_INTEG_ID" : ,
"PROM_ITEM_ID" : ,
"PR_ACCNT_ID" : ,
"PR_CON_ID" : No Match Row Id,
"ROOT_ASSET_ID" : 1-G7B7EFI,
"SERIAL_NUM" : ,
"X_VF_MSISDN" : ,
"X_VF_PERMISSONS" :
},
"after" : {
"ROW_ID" : 1-G7B7EGF,
"BILLACCT_ID" : ,
"BILL_ACCNT_ID" : ,
"BILL_PROFILE_ID" : ,
"INTEGRATION_ID" : ,
"NAME" : ,
"OWNER_ACCNT_ID" : ,
"OWNER_CON_ID" : ,
"PROD_ID" : ,
"PROMOTION_ID" : ,
"PROM_INTEG_ID" : ,
"PROM_ITEM_ID" : ,
"PR_ACCNT_ID" : ,
"PR_CON_ID" : ,
"ROOT_ASSET_ID" : ,
"SERIAL_NUM" : ,
"X_VF_MSISDN" : ,
"X_VF_PERMISSONS" :
}
}
]
In case your are using LookupRecord processor, the documentation is somewhat misleading. Set up your processor as shown in the screenshot. Ensure the following two properties are set propery:
/ and not hbase_integid (This is a bug in documentation it seems)Hope that helps!

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With