无法使用REST Data Lake Storage Gen API - 需要知道从何处获取参数? [英] Unable to use the REST Data Lake Storage Gen API - Need to know where to get the parameters from ?

查看:52
本文介绍了无法使用REST Data Lake Storage Gen API - 需要知道从何处获取参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Data Lake Storage Gen2文件系统中的信息读入Collibra Connect,但在此之前,我尝试使用此处提供的API:https://docs.microsoft.com / en-us / rest / api / storageservices / datalakestoragegen2 / filesystem / getproperties


特别是GET属性。我想知道在哪里可以找到填充accountName,dnsSuffix,fileSystem和资源的信息。

解决方案

您好shanksab,谢谢您将此问题提请我们注意。 我们正在更新Storage SDK以支持ADLS Gen2。 在此之后,我们希望将大部分REST API用法转移到SDK。 在此期间,让
我与您分享调用其余API的参数。


摘录


< span style ="font-family:Consolas; color:#767171"> curl -I -H" x-ms-version:2018-11-09" -H"授权:承载


ACCESS_TOKEN" " https://


STORAGE_ACCOUNT_NAME.dfs.core.windows.net/mydata/data/file2?action=getAccessControl"


< p style ="">


文件存储的后缀是"dfs.core.windows.net"。


文件系统是您要查看的存储帐户中的哪个文件存储。


资源是文件名/路径。


accountName将是存储帐户的名称,就像您在门户网站中创建的存储资源一样。



您可以通过浏览存储帐户找到其余的内容。



假设我我的存储帐户中有一个文件共享,名称为"ocean",文件名为"fish.txt"。

https://demostorageaccountname.file.core.windows.n et / ocean / fish.txt


您可以浏览您的存储帐户并找到您要查找的文件的网址。 在门户网站中,单击该文件会在右侧打开一个窗格,其中包含您可以复制的URL。


I am trying to READ information from my Data Lake Storage Gen2 Filesystem into Collibra Connect, but before I can venture that far I tried to use the API provided here : https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/filesystem/getproperties

Specifically the GET Property. I want to know where do I find the information to populate accountName, dnsSuffix, fileSystem, and resource.

解决方案

Hello shanksab, and thank you for bringing this issue to our attention.  We are in the midst of updating the Storage SDK to support ADLS Gen2.  After that point we expect much of the REST API usage to move to the SDK.  In the interim, let me share with you the parameters to call the rest API.

An excerpt

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


ACCESS_TOKEN" "https://


STORAGE_ACCOUNT_NAME.dfs.core.windows.net/mydata/data/file2?action=getAccessControl"


The suffix in the case of Files storage, would be "dfs.core.windows.net".

The filesystem is which of the file stores in your storage account you want to look inside.

The resource is the filename / path.

The accountName would be the name of the storage account, as in the storage resource you created in the portal.


The rest you can find by exploring your storage account.

Suppose I have a fileshare in my storage account with the name "ocean", with a file named "fish.txt".
https://demostorageaccountname.file.core.windows.net/ocean/fish.txt

You can explore your storage account and find a url for the file you are looking for.  In the portal, clicking on the file opens a pane on the right, with a URL you can copy.


这篇关于无法使用REST Data Lake Storage Gen API - 需要知道从何处获取参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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