Skip to content

Avro field names not getting parsed, just values #311

Answered by kevinwallimann
cjlyons81 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @cjlyons81
Thanks for your interest in our library. I am not sure I understand your issue correctly. What command do you use to arrive at the output?

"parsed": [
    "CDC.REMEDY.T1908",
    "U",
......

The field names are converted to Dataframe column names. You can see them by inspecting the schema, e.g. df2.printSchema. Also btw, quite often, it is convenient to select the fields directly, instead of keeping the wrapper struct (parsed in your case). E.g. you can write val df2 = df.select(from_avro(col("value"), from_avro_abris_settings, sc) as 'data).select("data.*")

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cjlyons81
Comment options

Answer selected by cjlyons81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants