将JSON直接发布到Azure Data Lake [英] post JSON directly to Azure Data Lake

查看:110
本文介绍了将JSON直接发布到Azure Data Lake的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有,我当前正在发布一个WebApp,客户端将作为我的终结点,而我要做的就是将接收到的JSON有效负载推送到Azure数据湖.我正在使用python,并在调用"lib.auth"之后,根据消息我创建了一个文件 接收并调用多线程.ADLUploader

All, I am currently publishing a WebApp where a client will my endpoint and all I have to do is to push the JSON payload I receive to Azure data lake. I am using python and after calling the "lib.auth", I am creating a file off of the message I receive and then calling the multithread.ADLUploader

无论如何,我都可以避免创建文件.我了解datalake会将所有数据存储在文件中,但是ADLS API是否可以使用某种默认格式来创建文件,以便我可以推送负载?

Is there anyway I can avoid creating a file. I understand datalake stores all data in files but is there a way ADLS APIs will create a file using some default format so that I can just push my payload?

谢谢.

推荐答案

最简单的方法如下:

The simplest way is below:

1.您可以使用adl.touch()函数创建文件

1. You can create a file using adl.touch() function

2.您可以使用adl.open()打开创建的文件

2. you can use adl.open() to open the created file

3.使用write()函数写入文件.

3. write into the file using write() function.

请参考 文档以获取更多信息

Please refer to this document for more information on it


这篇关于将JSON直接发布到Azure Data Lake的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆