0
votes

I'm kind of new developing in Azure, I developed a logic app that works correctly and I need to import to an azure sql datawarehouse the version history and the run history of this logic app. I created an Analytics logs workspace and I activated the logs, the logs are correctly stored in a blobstorage.

I need to extract the run/version history of this logic app to feed a datawarehouse table but I'm facing two problems:

  1. For the run history: How can I retrieve the information stored in a blobstorage? I tried to create an external table in my datawarehouse (like described here Can't CREATE EXTERNAL DATA SOURCE in SQL) but I get the following error when I tried to create the external source:

    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. For the version history: Im trying to use a scrip task in SSIS to import the rest api data from (as described here https://docs.microsoft.com/en-us/rest/api/logic/workflowversions/list) but I dont know how to code to retrieve the data from the rest call.

Your thoughts and help are appreciated! Manuel.

1

1 Answers

0
votes

To answer your first question, there are two possible issues in your operation.

  1. As the answer of your refered SO thread said, the issue might be caused by the incompatible version of SQL Server. Please check the SQL Server version you used and make sure that be SQL Server 2017 (14.x).
  2. The host *.table.core.windows.net is for Table Storage, not Blob Storage which be *.blob.core.windows.net.

To answer your second question, an access token passed for the REST API is required. So you have to follow the 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 How to check the health of application gateway in Azure or other offical code samples as below.

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