Use the KQL activity to run a query
The KQL activity in Data Factory for Microsoft Fabric allows you to run a query in Kusto Query Language (KQL) against an Azure Data Explorer instance.
Prerequisites
To get started, you must complete the following prerequisites:
- A tenant account with an active subscription. Create an account for free.
- A workspace is created.
Add a KQL activity to a pipeline with UI
To use a KQL activity in a pipeline, complete the following steps:
Creating the activity
Create a new pipeline in your workspace.
Search for KQL in the pipeline Activities pane, and select it to add it to the pipeline canvas.
Note
You may need to expand the menu and scroll down to see the KQL activity as highlighted in the screenshot below.
Select the new KQL activity on the pipeline editor canvas if it isn't already selected.
Refer to the General settings guidance to configure the General settings tab.
KQL activity settings
Select the Settings tab, and then select your KQL Database connection from the dropdown, or create a new one. If you select a workspace data store you can use dynamic content to parameterize the database selection by selecting the Add dynamic content option that appears in the dropdown.
Then provide a KQL query to execute against the selected database for the Command property. You can use dynamic content in the query by selecting the Add dynamic content link that appears when the text box is selected.
Finally, specify a command timeout or leave the default timeout of 20 minutes. You can use dynamic content for this property too.
Save and run or schedule the pipeline
The KQL activity might typically be used with other activities. After you configure any other activities required for your pipeline, switch to the Home tab at the top of the pipeline editor, and select the save button to save your pipeline. Select Run to run it directly, or Schedule to schedule it. You can also view the run history here or configure other settings.