Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an example of parsing a segment_field and/or subfield from the message column #19

Open
MartinChavezNC opened this issue Mar 18, 2024 · 2 comments
Assignees

Comments

@MartinChavezNC
Copy link

Given a dataframe that loads the HL7 files, can you provide an example of parsing a segment_field and/or subfield from the message column?

val repro = spark.read.format("hl7").load("...")

message

@TXAggie2000
Copy link

Would love to see an example as well. In my particular case, the event id is in the message header and that is needed to define schema of segments

@zavoraad zavoraad self-assigned this Aug 20, 2024
@zavoraad
Copy link
Collaborator

zavoraad commented Sep 4, 2024

Message is stored as a string so you can parse the header information in it with native Spark split() functions to get what you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants