且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用Rest API将数据加载到Azure Datalake存储Gen2的表数据存储中

更新时间:2023-09-07 20:29:40

嗨Naveen,

Hi Naveen,

一种简单的方法是使用SAS(共享访问签名)。为此,请执行以下操作:

An easy way to do so is by using SAS (Shared Access Signature). To do so, please do the following :


  • 打开您的门户网站中的存储帐户。
  • 转到设置下的"共享访问签名"。
  • 点击"生成SAS和连接字符串":

  • 生成后,复制SAS令牌,如下所示:

  • 在您的POST请求中,URI应该在表单中:

    https://<存储帐户名称> .table.core.windows.net / Tables< SAS令牌>
  • 您需要设置以下标题:

    Content-Type:application / json

    x-ms-version:
    2018-11-09

    日期:<当前日期> eg-
    Wed,22 May 2019 13:25:00 GMT
  • 在请求正文中,包括:

    {  

      " TableName" ;:<表名>

    }
  • open your storage account in the portal.
  • Go to "Shared Access Signature" under settings.
  • Click on "Generate SAS and connection string" :
  • Once generated, copy the SAS token as shown below :
  • In your POST request the URI should be in the form :
    https://<storage account name>.table.core.windows.net/Tables<SAS token>
  • You need to set the following headers :
    Content-Type : application/json
    x-ms-version :
    2018-11-09
    Date : <current date> eg- Wed, 22 May 2019 13:25:00 GMT
  • In the body of the request, include :
    {   
        "TableName":<table name>
    }

希望这会有所帮助。