deercreeklabs / lancaster

Apache Avro library for Clojure and ClojureScript
Other
60 stars 5 forks source link

Reading schema from avro file #28

Open wilkerlucio opened 1 year ago

wilkerlucio commented 1 year ago

Hello, first, sorry I'm pretty noob to Avro, but I'm trying to read data from an Avro file that has the schema embedded in it. I browse to a lot of functions in the library but I can't figure how to make it. Is there a helper to extract the schema from the avro file? Or to read already considering the schema there?

I found this for the Java API: https://stackoverflow.com/questions/45496786/how-to-extract-schema-from-an-avro-file-in-java

Wonder if there is an equivalent solution using lancaster.

chadharrington commented 1 year ago

Hi Wilker, Thanks for taking the time to create this issue. I assume you are talking about an Object Container File. Is that right?

Lancaster doesn't currently have functions to read and write Object Container Files, though they would be straightforward to add. How urgent is this for you? Can you provide an example file to test with?

Best regards, Chad

wilkerlucio commented 1 year ago

Hello @chadharrington, I can't say for sure, but I guess it is. I'm currently just running some experiments, nothing for prod at this point, I went down and use the Avro official library, and I was able to extract the schema using that, so no urgency at this point.