Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

unable to store HL7 attributes in Hbase

Highlighted

unable to store HL7 attributes in Hbase

Explorer

Hi @Artem Ervits

I'm trying to extract and store HL7 attribute in hbase but getting this error -

9068-nifi-hbase-error.png

7 REPLIES 7
Highlighted

Re: unable to store HL7 attributes in Hbase

Mentor

@Ankit Jain

can you confirm the output of UpdateAttribute is in JSON format? PutHBaseJSON expects the incoming flowfiles to be of JSON type.

Highlighted

Re: unable to store HL7 attributes in Hbase

Explorer

@Artem Ervits

Actually my data flow looks like this -

9093-nifi-hbase-error2.png

Assuming that AttributeToJson processor should give a json output. Is there any other way to verify it.

I'm following this post -

https://community.hortonworks.com/articles/20318/visualize-patients-complaints-to-their-doctors-usi....

Highlighted

Re: unable to store HL7 attributes in Hbase

@Ankit Jain ExtractHL7Attributes is just going to parse the HL7 and add the field values as attributes on the FlowFile. The FlowFile contents remains as the original pipe-delimited HL7 flat file. You need to add AttributesToJSON after ExtractHL7Attributes and before PutHBaseJSON, since as @Artem Ervits mentions, PutHBaseJSON needs the FlowFile to be JSON and not the original HL7.

Highlighted

Re: unable to store HL7 attributes in Hbase

Explorer

Sorry about the first image, it wasn't clear. but I've used AttributeToJson processor,Please check the 2nd screen shot still getting the above highlighted error.

Highlighted

Re: unable to store HL7 attributes in Hbase

I'd suggest inspecting the content of the data in the queues or via the data provenance to verify whether there is indeed invalid data. If you don't specify specific fields AttributesToJSON does dump attributes besides the HL7 attributes, so it is possible there is content that wouldn't be valid from the point of view of PutHBaseJSON.

If you are working with example or non-PII HL7 data, it'd be helpful to post the HL7 message itself and the JSON output itself.

Highlighted

Re: unable to store HL7 attributes in Hbase

Explorer

I'm trying to parse following MDM^T02.hl7 message -

MSH|^~\&|||||20160229002413.415-0500||MDM^T02|7|P|2.3

EVN|T02|201602290024

PID|1||599992601||cunningham^beatrice^||19290611|F

PV1|1|O|Burn center^60^71

TXA|1|CN|TX|20150211002413||||||||DOC-ID-10001|||||AU||AV

Where i could check the json output?

Highlighted

Re: unable to store HL7 attributes in Hbase

@Ankit Jain Copying the answer from https://community.hortonworks.com/questions/65241/error-while-storing-hl7-attributes-in-hbase.html: In AttributesToJSON do you have the Destination property set to "flowfile-content"? If you don't then what it does is put the JSON in the JSONAttributes attribute and it leaves the FlowFile contents the same, in this case an HL7 document. An HL7 document of course isn't JSON and starts with MSH, so this is the error you'd see if you have Destination set to "flowfile-attribute" (the default) and not "flowfile-content".

Don't have an account?
Coming from Hortonworks? Activate your account here