Create Power Apps application to query data in Azure Data Explorer (preview)
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 particularly 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 will create a Power Apps application to query Azure Data Explorer data. During this process, you will 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.preview.powerapps.com/ and sign-in.
Select Connections in the left-hand menu.
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
Navigate to Power Apps and select Apps in the left-hand menu.
Select + New app in the menu bar.
Select Canvas from the resulting dropdown.
In the Blank app section, select Tablet layout.
Add Connector
Click on the Data icon on the left-hand navigation.
Expand Connectors.
Select Azure Data Explorer in the resulting options.
You will see a new area called In your app with Azure Data Explorer now included.
Save Your App
Select File in the menu bar.
Select Save in the left-hand navigation.
Enter a meaningful name for your app. Click the Save button in the lower right.
Advanced Settings
Select Settings in the left-hand menu.
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.
Click 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 )Click 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 click Add button. A preview of the selected data table appears.
Validate
Click 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.