简体   繁体   English

Azure Data Lake-.avro到SQL

[英]Azure Data Lake - .avro to SQL

I'm using the capture function on an Event Hub to push data into a data lake. 我正在使用事件中心上的捕获功能将数据推入数据湖。 This is being saved into the lake in .avro files. 这将以.avro文件形式保存到湖泊中。

I would like to join this data to some existing data I have in in a SQL data warehouse. 我想将此数据与SQL数据仓库中已有的一些现有数据结合起来。 So the most sensible action seems for me to push the .avro files into SQL. 因此,对我来说,最明智的选择似乎是将.avro文件推送到SQL中。 How can I do this? 我怎样才能做到这一点?

Frustratingly the data from the API is originally in JSON format, but is returned as .avro from the web app on azure. 令人沮丧的是,来自API的数据最初是JSON格式,但从Azure上的网络应用以.avro的形式返回。 If I could get the files to be JSON then I would just use the OPENJSON functions in T-SQL. 如果我可以使文件为JSON,则只需在T-SQL中使用OPENJSON函数即可。

Thank you 谢谢

I know im kind of late with this answer, but whenever I work with U-SQL I find it useful to check their github for examples to have a baseline so I can work on improving those to my needs. 我对这个答案有点晚了,但是每当我使用U-SQL时,我发现检查他们的github以获取具有基线的示例很有用,因此我可以根据自己的需求进行改进。

Going to your question, have you checked this? 要问的问题,您检查了吗? https://github.com/Azure/usql/tree/master/Examples/AvroExamples It shows the basics of handling avro files. https://github.com/Azure/usql/tree/master/Examples/AvroExamples它显示了处理avro文件的基础知识。

Hope this helped!! 希望这有所帮助! Martin 马丁

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM