cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

add custom metadata to avro file with pyspark

zak
New Contributor II

Hello,

i need to add a custom metadata into a avro file. The avro file containt data.

we have tried to use "option" within the write function but it's not taken without generated any error.

df.write.format("avro").option("avro.codec", "snappy").option("header", "metadata_key:metadata_value").mode("overwrite").save("/tmp/avro_with_metadata")

I'm seeking a solution to add a custom metadata into a data avro file.

Thanks,

Zakaria

1 REPLY 1

zak
New Contributor II

thank you a lot for your answer, it's very helpful.

I have a additionnal question please, is it possible to add a avro binnary metada inside the json avro_schema?

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now