Azure Data Lake GEN2 REST API [英] Azure Data Lake GEN2 REST API

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

问题描述

我们正在从REST API GEN1转换为REST API GEN2,我可以使用一些CURL示例。我看到了创建目录或文件的示例,但我需要list命令的示例来检查文件或目录以及将文件上传到数据湖。

解决方案

Hi Barney,


列出目录中文件的CURL示例:


在文件系统中列出文件时,可以选择允许递归以列出包括子目录在内的所有文件。


要从根目录列出所有文件,请运行以下命令:


curl -H" x-ms-version:2018-11-09" -H"授权:承载


ACCESS_TOKEN" " HTTPS://

STORAGE_ACCOUNT_NAME.dfs.core.windows.net/mydata?resource=filesystem&recursive=true" | jq"。"


要仅列出单个目录中的文件,请运行以下命令:


curl -H"x-ms-version:2018-11-09" -H"授权:持票人


We are converting from REST API GEN1 to REST API GEN2 and I could use some CURL Examples. I see the examples to create a directory or file but I need an example of the list command to check for a file or directory and the upload of a file to the data lake.

解决方案

Hi Barney,

CURL example to list files in a directory:

When listing files in the file system, you have the option to allow recursion in order to list all files including subdirectories.

To list all files recursively from the root, run the following command:

curl -H "x-ms-version: 2018-11-09" -H "Authorization: Bearer


ACCESS_TOKEN" "https://


STORAGE_ACCOUNT_NAME.dfs.core.windows.net/mydata?resource=filesystem&recursive=true" | jq "."

To list just the files in a single directory, run this command:

curl -H "x-ms-version: 2018-11-09" -H "Authorization: Bearer


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

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