usql
usql copied to clipboard
Is there any Avro outputter example?
There is avro Reader, I am also interested in Avro outputter. Can somebody create an example for USQL based on this?
https://msdn.microsoft.com/en-us/library/dn749865.aspx
Thanks!
I am working on it. I will soon make a PR.
Waiting for Avro outputter
@flomader any success with this? Starting to look at this same issue myself
Any updates? Im also in need of an Avro outputter.
Since I couldnt find any info I wrote a very basic one today, but its very difficult since the documentation is very sparse.. The Apache Avro library only have very limited class documentation, and the documentation for how to implement your own IOutputter is also very very basic.
I have managed to produce a working avro file in a small test project that I can read from a python script, but it behaves very strange:
Apache Avro provides a DataFileWriter object which uses the Stream from the IUnstructuredWriter object. The issue is that DataFileWriter want to call Stream.Position when flushing the written data. But it seems like Position is not available and generates a null ref exception here: Microsoft.Analytics.UnitTest.USqlStreamProxy
1.get_Position()`. Now, this is very difficult to research further since the USqlStreamProxy class is part of Microsoft.Analytics.UnitTest that I dont have the source code for..
For now I solved this with a try catch block, but that is very ugly
Adding @flomader
In case you are interested, I made a fork with my AvroOutputter here: https://github.com/nordicfactory/usql
What is everyone using as an Avro outputter?