Create Power Apps application to query data in Azure Data Explorer
Azure Data Explorer is a fast, fully managed data analytics service for real-time analysis of large volumes of data streaming from applications, websites, IoT devices, and more.
Power Apps is a suite of apps, services, connectors, and data platform that provides a rapid application development environment to build custom apps that connect to your business data. The Power Apps connector is useful if you have a large and growing collection of streaming data in Azure Data Explorer and want to build a low code, highly functional app to make use of this data. In this article, you'll create an Power Apps application to query Azure Data Explorer data. During this process, you'll see the steps of data parameterization, retrieval, and presentation.
Prerequisites
- Power platform license. Get started at https://powerapps.microsoft.com.
- Familiarity with the Power Apps suite.
Connect to Azure Data Explorer Connector
Navigate to https://make.powerapps.com/ and sign-in.
On the left menu, select Dataverse > Connections.
Select + New connection.
Search for Azure Data Explorer in the search bar. Select Azure Data Explorer from the resulting options.
Select Create on the Azure Data Explorer popup. Provide credentials as required.
Create App
On the left menu, select Apps.
Select + New app > Canvas in the menu bar.
Provide an app name, and under Format, select Tablet.
Add Connector
On the left menu, select Data.
Select Add data, expand Connectors, and then elect Azure Data Explorer.
Under Data, you'll now see the Azure Data Explorer app in the list of connectors.
Save Your App
Select File in the menu bar.
Select Save in the left-hand navigation.
Enter a meaningful name for your app. Select the Save button in the lower right.
Advanced Settings
On the left menu, select Settings.
Select Advanced settings.
Select Dynamic schema from resulting options. Enable this feature.
Search for the Data row limit for non-delegable queries setting. Set your returned records limit.
Note
The default limit is 500, with a maximum of 2,000 returned records.
Important
Save your app again and restart as required.
Add Dropdown
Select Insert in the menu bar.
Select Input in the resulting sub menu bar.
Select Drop down in the resulting dropdown.
Select on the Advanced tab in the right-hand popout.
Populate the Items input box with: ["CALIFORNIA","MICHIGAN"]
With the dropdown still selected, select OnChange from the Property dropdown in the formula bar.
Enter the following formula:
ClearCollect( Results, AzureDataExplorer.listKustoResultsPost( "https://help.kusto.windows.net", "Samples", "StormEvents | where State == '" & Dropdown1.SelectedText.Value & "' | take 15" ).value )
Select the Capture schema button. Allow time for processing.
Add Data Table
Select Insert in the menu bar.
Select Data table in the resulting sub menu bar.
Reposition the data table and consider adding a border for visibility.
Select the Properties tab in the right-hand popout. Select Results from the Data Source dropdown.
Select Edit fields link.
Select + Add field in the resulting popout.
Select desired fields and select Add button. A preview of the selected data table appears.
Validate
Select the Preview the app button in the upper right of the screen.
Try the dropdown, scroll through the data table, and confirm successful data retrieval and presentation.
Limitations
- Power Apps has a limit of up to 2,000 results records returned to the client. The overall memory for those records can't exceed 64 MB and a time of seven minutes to run.
- The connector doesn't support the fork and facet operators.
- Timeout exceptions: The connector has a timeout limitation of 7 minutes. To avoid potential timeout issue, make your query more efficient so that it runs faster, or separate it into chunks. Each chunk can run on a different part of the query. For more information, see Query best practices.
Next steps
Learn about the Azure Kusto Logic App connector, which is another way to run Kusto queries and commands automatically, as part of a scheduled or triggered task.