I'm a new user for Nifi, and just started my first Nifi project, where we
need to move Json messages into HBase.  After I read the templates and user
guide, I see I still need help to learn how to concatenate the values
pulled out from the Json messages to form a unique row key for HBase tables.

Given the sample message below, I run into errors where I need to create
the unique keys for HBase by concatenating values pulled from the messages.

{
"effectiveTimestamp": "2015-12-03T23:17:29.874Z",
"event": {
"@class": "events.policy.PolicyCreated",
"id": "1e9b91398160471f8b6197ad974e2464",
"ipAddress": "10.8.30.145",
"policy": {
"additionalListedInsureds": [],
"address": {
"city": "Skokie",
"county": "Cook",
"id": "b863190a5bf846858eb372fb5f532fe7",
"latitude": 42.0101,
"longitude": -87.75354,
"state": "IL",
"street": "5014 Estes Ave",
"zip": "60077-3520"
},
"applicant": {
"age": 36,
"birthDate": "1979-01-12",
"clientId": "191",
"creditReport": {
"id": "ca5ec932d33d444b880c9a43a6eb7c50",
"reasons": [],
"referenceNumber": "15317191300474",
"status": "NoHit"
},
"firstName": "Kathy",
"gender": "Female",
"id": "1f4a3862fab54e058305e3c73cc13dd3",
"lastName": "Bockett",
"maritalStatus": "Single",
"middleName": "Sue",
"ssn": "*******"
},
"channelOfOrigin": "PublicWebsite",
... ...

For example, in processor EvaluateJsonPath, I could pull out individual
values as shown below:

$.effectiveTimestamp
$.event.id
$.event.applicant.id


However, when I tried to create the HBase row key there such as

${allAttributes($.event.id,
$event.applicant.id):join($.effectiveTimestamp:toDate('MMM
d HH:mm:ss'):toString()}_${uuid}


I could not make it work no matter how I modified or simplified the long
string.  I must have misunderstood something here.  I don't know if this
question has already been asked and answered.

Thank you for your help.
Hong


*Hong Li*

*Centric Consulting*

*In Balance*
(888) 781-7567 office
(614) 296-7644 mobile
www.centricconsulting.com | @Centric <https://twitter.com/centric>

Reply via email to