How To Use Script Activity in Azure Data Factory

This article demonstrates how to use script activity in ADF to execute SQL commands.

Tech Zero
5 min readMay 16, 2022

We’ll cover the following topics-

✅ Exploration of components of ADF script activity;
✅ Example of Use Cases on how to use script activity;
📢 a Tip

Image credit — https://www.freepik.com/icon/programmer_90603

Let’s explore the Script activity in ADF and its components.

Script Activity in ADF
(Script Activity in ADF)

Right away, we can see that there are two radio buttons — Query and NonQuery.

  • Query — Pick this radio button when you expect your SQL command to return a result. Example — Aggregate queries such as count.
  • NonQuery — Pick this radio button when you do not expect the SQL command to return a result. Example — DML statement such as delete, insert, update.

Furthermore, we observe that there’s another feature called Script parameters. This enables a data engineer to pass dynamic parameters to the SQL command being executed by the script activity.

Click New button to observe the properties associated with the parameters.

--

--

Tech Zero

Product Manager, Data & Governance | Azure, Databricks and Snowflake stack | Here to share my knowledge with everyone