如何检索版本历史信息和 Azure 逻辑应用程序的 运行 历史

How to retrieve version history information and run history of a azure logic app

我是 Azure 的新开发者,我开发了一个可以正常工作的 逻辑应用程序 ,我需要导入到 azure sql datawarehouse 这个逻辑应用程序的版本历史和 运行 历史。我创建了一个 Analytics 日志工作区并激活了日志,日志正确存储在 blobstorage 中。

我需要提取此逻辑应用程序的 run/version 历史记录以提供数据仓库 table 但我面临两个问题:

  1. 对于 运行 历史: 我如何检索存储在 blobstorage 中的信息?我试图在我的数据仓库中创建一个外部 table(如此处所述 ) 但当我尝试创建外部源时出现以下错误:

    CREATE EXTERNAL DATA SOURCE BlobStorageDataSource WITH ( TYPE = BLOB_STORAGE, LOCATION = 'https://primarystoragedwh.table.core.windows.net/blobstoragedwh', CREDENTIAL = AzureBlobStorageCredential );

    Msg 103010, Level 16, State 1, Line 4 Parse error at line: 4, column: 12: Incorrect syntax near 'BLOB_STORAGE'.

  2. 对于版本历史:我正在尝试使用 SSIS 中的脚本任务从中导入其余 api 数据(如此处所述https://docs.microsoft.com/en-us/rest/api/logic/workflowversions/list) 但我不知道如何编码以从 rest 调用中检索数据。

感谢您的想法和帮助! 曼努埃尔.

回答你的第一个问题,你的操作有两个可能的问题。

  1. 的回答所说,可能是SQL服务器版本不兼容导致的问题。请检查您使用的 SQL 服务器版本并确保为 SQL Server 2017 (14.x).
  2. 主机 *.table.core.windows.net 用于 Table 存储,而不是 *.blob.core.windows.net.
  3. 的 Blob 存储

要回答您的第二个问题,需要为 REST API 传递的访问令牌。所以你必须按照下面的 document to know the flow of calling a REST API with access token. I don't know what programming language you used, but you can try to refer to my answer for a similar needs 或其他官方代码示例。

  1. Mange Azure Virtual Machines using REST API 在 C#
  2. Microsoft Azure Billing API Code Samples: RateCard API 在 C#
  3. Microsoft Azure Billing API Code Samples: RateCard API 在 Python