Script activity in Azure Data Factory\ Synapse analytics is very helpful to run queries against data sources mentioned here in this document. When we use two or more queries in the script activity, it is important to understand the output json of script activity to write expressions based on the output in the subsequent activities. Consider the below Pipeline design: We have two select queries as follows in script activity, and each of which will give a resultSet.