Triggering Logic App Standard when changes to Data Lake Gen 2 occurs and deletes a table
I want to test a simple workflow below:
1 Upload a text file to a Data Lake Gen 2 blob container, which triggers Logic Apps Standard
2 The workflow then deletes a table in the same storage account.
The problem is that the table still exists, which is supposed to be deleted.
Refs:
https://docs.microsoft.com/en-us/connectors/azureblob/
https://docs.microsoft.com/en-us/connectors/azuredatalake/
Azure Data Lake Gen 2 - How to opt in to "Multi-protocol access on Azure Data Lake Storage"
Update: Design issues with Connectors of Logic Apps Std
This is confusing from Logic Apps. There are two versions of Blob storage connectors. One supports (in Azure
and must use Stateful
workflow) Data Lake G2, the other (Built-in
connectors) doesn't, but none of them has any information on what is supported or not supported.
Furthermore, the one that supports, ie. in Azure
and must use Stateful
workflow, uses polling not push notification, which is not the ideal solution.
Stateless
workflow with connectors in Azure
below, compared the one with stateful
Workflow in Built-in
1 answer
-
answered 2022-01-19 17:31
SwethaKandikonda-MT
This will be working with the Azure's Blob Trigger (When a blob is added or modified (properties only) (V2)) but not the built-in's.(When a blob is added or modified) i.e..
Here is my logic app
Output:
do you know?
how many words do you know
See also questions close to this topic
-
Deploy VueJS + API app to Azure Static Web App with Gitlab doesn't create functions
I've started creating a small application that will use VueJS as a frontend with Azure Functions as the backend. I was looking at using Azure Static Web Apps to host both components for the application and Gitlab to store / deploy the app.
Everything but the creation of the Azure functions works. Following https://docs.microsoft.com/en-us/azure/static-web-apps/gitlab?tabs=vue
The output from the deploy step, listed below is:
App Directory Location: '/builds/*/valhalla/valhalla-client/dist/spa' was found. Api Directory Location: '/builds/*/valhalla/valhalla-api/dist' was found. Looking for event info Could not get event info. Proceeding Starting to build app with Oryx Azure Static Web Apps utilizes Oryx to build both static applications and Azure Functions. You can find more details on Oryx here: https://github.com/microsoft/Oryx ---Oryx build logs--- Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx You can report issues at https://github.com/Microsoft/Oryx/issues Oryx Version: 0.2.20220131.3, Commit: ec344c058843461525ff03b46031553b6e15a47a, ReleaseTagName: 20220131.3 Build Operation ID: |qAffRWArEg8=.deee9498_ Repository Commit : 7cdd5b61f956e6cb8459b13a42af363c4440a97b Detecting platforms... Could not detect any platform in the source directory. Error: Could not detect the language from repo. ---End of Oryx build logs--- Oryx was unable to determine the build steps. Continuing assuming the assets in this folder are already built. If this is an unexpected behavior please contact support. Finished building app with Oryx Starting to build function app with Oryx ---Oryx build logs--- Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx You can report issues at https://github.com/Microsoft/Oryx/issues Oryx Version: 0.2.20220131.3, Commit: ec344c058843461525ff03b46031553b6e15a47a, ReleaseTagName: 20220131.3 Build Operation ID: |NGXLP5bVBRk=.705477f6_ Repository Commit : 7cdd5b61f956e6cb8459b13a42af363c4440a97b Detecting platforms... Could not detect any platform in the source directory. Error: Could not detect the language from repo. ---End of Oryx build logs--- Oryx was unable to determine the build steps. Continuing assuming the assets in this folder are already built. If this is an unexpected behavior please contact support. [WARNING] The function language could not be detected. The language will be defaulted to node. Function Runtime Information. OS: linux, Functions Runtime: ~3, node version: 12 Finished building function app with Oryx Zipping Api Artifacts Done Zipping Api Artifacts Zipping App Artifacts Done Zipping App Artifacts Uploading build artifacts. Finished Upload. Polling on deployment. Status: InProgress. Time: 0.1762737(s) Status: InProgress. Time: 15.3950401(s) Status: Succeeded. Time: 30.5043965(s) Deployment Complete :) Visit your site at: https://polite-pebble-0dc00000f.1.azurestaticapps.net Thanks for using Azure Static Web Apps! Exiting Cleaning up project directory and file based variables 00:00 Job succeeded
The deploy step appears to have succeeded, and the frontend is deployed, but there are no Azure Functions showing up in this Static Web App. Is something missed here? So far, the Azure Functions I have are the boiler-plate from instantiating a new Azure Function folder.
image: node:latest variables: API_TOKEN: $DEPLOYMENT_TOKEN APP_PATH: '$CI_PROJECT_DIR/valhalla-client/dist/spa' API_PATH: '$CI_PROJECT_DIR/valhalla-api/dist' stages: - install_api - build_api - install_client - build_client - deploy install_api: stage: install_api script: - cd valhalla-api - npm ci artifacts: paths: - valhalla-api/node_modules/ cache: key: node paths: - valhalla-api/node_modules/ only: - master install_client: stage: install_client script: - cd valhalla-client - npm ci artifacts: paths: - valhalla-client/node_modules/ cache: key: node paths: - valhalla-client/node_modules/ only: - master build_api: stage: build_api dependencies: - install_api script: - cd valhalla-api - npm install -g azure-functions-core-tools@3 --unsafe-perm true - npm run build artifacts: paths: - valhalla-api/dist cache: key: build_api paths: - valhalla-api/dist only: - master needs: - job: install_api artifacts: true optional: true build_client: stage: build_client dependencies: - install_client script: - cd valhalla-client - npm i -g @quasar/cli - quasar build artifacts: paths: - valhalla-client/dist/spa cache: key: build_client paths: - valhalla-client/dist/spa only: - master needs: - job: install_client artifacts: true optional: true deploy: stage: deploy dependencies: - build_api - build_client image: registry.gitlab.com/static-web-apps/azure-static-web-apps-deploy script: - echo "App deployed successfully." only: - master
-
Azure Synapse Notebooks Vs Azure Databricks notebooks
I was going through the features of Azure Synapse Notebooks Vs Azure Databricks notebooks.
- Are there any major differences between these apart from the component they belong to ?
- Are there any scenarios where one is more appropriate over other?
-
How to authorize azure container registry requests from .NET CORE C#
I have a web application which creates ContainerInstances, I have specific container registry images I want to use. As a result, I use this code to get my azure container registry
IAzure azure = Azure.Authenticate($"{applicationDirectory}/Resources/my.azureauth").WithDefaultSubscription(); IRegistry azureRegistry = azure.ContainerRegistries.GetByResourceGroup("testResourceGroup", "testContainerRegistryName");
I get this error when the second line of code is hit
The client 'bc8fd78c-2b1b-4596-827e-6a3c918b7c17' with object id 'bc8fd78c-2b1b-4596-827e-6a3c918b7c17' does not have authorization to perform action 'Microsoft.ContainerRegistry/registries/read' over scope '/subscriptions/506b787d-83ef-426a-b7b8-7bfcdd475855/resourceGroups/testapp-live/providers/Microsoft.ContainerRegistry/registries/testapp' or the scope is invalid. If access was recently granted, please refresh your credentials.
I literally have no idea what to do about this. I have seen so many articles talking about Azure AD and giving user roles and stuff. Can someone please walk me step by step how to fix this? I REALLY appreciate the help. Thanks.
I cannot find any client under that object ID so perfectly fine starting from scratch again with a better understanding of what I am doing.
-
Python - List all the files and blob inside an Azure Storage Container
This is my first post here on StackOverflow, hope it respects the guideline of this community.
I'm trying to accomplish a simple task in Python because even though I'm really new to it, I found it very easy to use. I have a storage account on Azure, with a lot of containers inside. Each container contains some random files and/or blobs.
What I'm trying to do, is to get the name of all these files and/or blob and put it on a file.
For now, I got here:
import os, uuid import sys from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient, __version__ connection_string = "my_connection_string" blob_svc = BlobServiceClient.from_connection_string(conn_str=connection_string) try: print("Azure Blob Storage v" + __version__ + " - Python quickstart sample") print("\nListing blobs...") containers = blob_svc.list_containers() list_of_blobs = [] for c in containers: container_client = blob_svc.get_container_client(c) blob_list = container_client.list_blobs() for blob in blob_list: list_of_blobs.append(blob.name) file_path = 'C:/my/path/to/file/randomfile.txt' sys.stdout = open(file_path, "w") print(list_of_blobs) except Exception as ex: print('Exception:') print(ex)
But I'm having 3 problems:
I'm getting the <name_of_ the_blob>/<name_of_the_file_inside>: I would like to have just the name of the file inside the blob
If in a container there is a blob (or more than 1 blob) + a random file, this script prints only the name of the blob + the name of the file inside, skipping the other files outside the blobs.
I would like to put all the names of the blobs/files in a .csv file.
But I'm not sure how to do point 3, and how to resolve points 1 and 2.
Cloud some maybe help on this?
Thanks!
Edit:
I'm adding an image here just to clarify a little what I mean when I talk about blob/files
-
How to get blob URL using Logic App Standard
How to get the blob URL from Azure Blob Storage?
The trigger is when a blob is added or modified. The blob content could be read and I was very happy as I could insert the content into an Azure Table property, so using PK and RK the file content would be quickly retrieved.
However with larger blobs it did not work due to 32k max size for a property. The approach to overcome this limitation seems to be to save the URL blob into the property but for my life I cannot figure it out how (tried almost all actions, even those that did not make sense, perhaps the url was somewhere in the output)
-
Azure Blob Starage - Rest API - 400 One of the request inputs is not valid
I am trying to delete a blob from an Azure Blob Storage with a batch request. At the moment I am using postman to verify my request before I use it in my application. I cannot manage to get a different output or error. For authorization I use SAS.
Here is my request:
Url:https://APPLICATIONNAME.blob.core.windows.net/MYCONTAINER?restype=container&comp=batch&sig=SIGNATURE&sp=racwdl&sip=92.60.9.18&sv=2020-08-04&st=2022-04-27T08:52:29Z&spr=https&se=2022-05-30T16:52:29Z&sr=c
Headers:
Content-Type: multipart/mixed; boundary=batch_357de4f7-6d0b-4e02-8cd2-6361411a9525 x-ms-version: 2020-08-04
Body:
--batch_357de4f7-6d0b-4e02-8cd2-6361411a9525 Content-Type: application/http Content-Transfer-Encoding: binary Content-ID: 0 DELETE /MYCONTAINER/NAVIGATIONS.sql?sp=racwdl&sig=SIGNATURE&sip=92.60.9.18&sv=2020-08-04&st=2022-04-27T08:52:29Z&spr=https&se=2022-05-30T16:52:29Z&sr=c HTTP/1.1 Content-Length: 0 --batch_357de4f7-6d0b-4e02-8cd2-6361411a9525--
Response:
--batchresponse_cdb19852-af76-4719-b9d2-8d61b5d3e6da Content-Type: application/http HTTP/1.1 400 One of the request inputs is not valid. x-ms-error-code: InvalidInput x-ms-request-id: 4dd49405-d01e-0035-12c4-601f12000000 x-ms-version: 2020-08-04 Content-Length: 221 Content-Type: application/xml Server: Windows-Azure-Blob/1.0 <?xml version="1.0" encoding="utf-8"?> <Error><Code>InvalidInput</Code><Message>One of the request inputs is not valid. RequestId:4dd49405-d01e-0035-12c4-601f12000000 Time:2022-05-05T21:07:45.5349988Z</Message></Error> --batchresponse_cdb19852-af76-4719-b9d2-8d61b5d3e6da--
I hope someone can give me a hint or solution.
-
Issue with Power BI dataset refresh
I am using Azure Logic App workflows to refresh a Power BI dataset every 5 minutes. The workflow was working for several weeks without any issues . But since last 2 days the dataset refresh is failing (Message - Another refresh running at same time). I have attached the picture on the refresh status. Though it shows the alternate refresh status as Success , the Power BI dashboard shows the same number all the time.
Is there a way to fix this the steps I tried - Disabled and enabled the flow, Deleted the flow and created again but its the same problem.
Also there are other reports that do not have this issue. I am using a Service account for the API connection .Is there a way to check if there is another refresh running at same time. Thanks for any inputs.
-
Azure SQL: can we grant 'execute' permission for stored procedure to API connections in logic app?
I want to execute the stored procedures from the logic app.
I have added an SQL connector for it. but in the 'Procedure name' dropdown, that particular procedure is not visible to me.
do I need to get permission from the admin, to grant execute permission for the stored procedure for a particular API connection? or do I have to get permission for any other objects/azure services?
I added permission to the logic app resource group but still, a stored procedure is not visible in the dropdown.
Thanks in advance!
-
Display data from SharePoint Online document library on Powerapp
I am looking for the best solution to get the documents from SharePoint online document library and display them on a website or power app. The website or app will be used by anonymous users. I worked on the Powerapp and was able to display the documents from SharePoint but when we deploy the app then it asks for authentication. How can this be avoided?
Can this be achieved by azure logic app? Many thanks, Rajesh