- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Error while storing HL7 attributes in Hbase
- Labels:
-
Apache Hive
-
Apache NiFi
Created on ‎11-08-2016 05:24 PM - edited ‎08-18-2019 04:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm doing HL7 parsing using ExtractHL7Attribute processor. My data flow looks like this -
I'm getting above error when storing in Hbase table. i'm storing this message.mdm-t02-x2.txt
I print the flow file using a custom processor attached is the output of AttributeToJson processor -json-output.txt . I can see the generated json in attached file still it does not get store in Hbase table and throw above error.
Can someone please help. Thanks
Created ‎11-08-2016 05:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Ankit Jain 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".
Created ‎11-08-2016 05:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Ankit Jain 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".
Created ‎11-08-2016 05:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks It worked when I changed it to "flowfile-content".
I just have one more question, is it possible to extract single segment from a HL7 message. for example below is my 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
I want to extract only PID segment from this message. output should be - PID|1||599992601||cunningham^beatrice^||19290611|F
Created ‎11-08-2016 05:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Ankit Jain There are a few ways you can do this:
- ReplaceText with a regex matching lines that start with PID
- You could SplitText -> RouteText matching lines that start with PID
What you can't do though is extract the PID first and then run it through ExtractHL7Attributes. ExtractHL7Attributes requires a full, valid HL7 message. If you want to do that, you're best bet is to run ExtractHL7Attributes and then (re)create a new message from the created PID attribute values.
Created ‎11-08-2016 05:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Ankit Jain is this sample HL7 dummy data or an actual patient? I am moving this thread to moderation.
Created ‎11-09-2016 06:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Artem Ervits it's dummy data.
Created ‎11-08-2016 05:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In AttributesToJson, is the destination set as flow file content or flow file attribute?
It would need be set as flow file content for it to work with PutHBaseJson.
