I am trying to use azore datafactory script operator.
I try to use it in query mode to run query however no matter which training guide I check there isn't any mention how to load the result of the sql statement.
My question is : Is there a way to use the script operator in query mode so that you work with the result of the query. (pipe integration).
If not (ChatGPT said so ) what is the point of running anything in query mode if you cannot work with it ?
According to the MS document
Using the script activity, you can execute common operations with Data Manipulation Language (DML), and Data Definition Language (DDL). DML statements like INSERT, UPDATE, DELETE and SELECT let users insert, modify, delete, and retrieve data in the database. DDL statements like CREATE, ALTER and DROP allow a database manager to create, modify, and remove database objects such as tables, indexes, and users.
So, you cannot work with the result of the query in script activity, if you want to work with result of query, you can use Lookup activity which allows fetching a single row or multiple rows from a SQL query with query option as shown below:
The output of the Lookup activity can be passed to subsequent activities using @activity('Lookup1').output.value
expression according to the requirement. Use the Copy activity if the result needs to be saved into another destination, such as a file or another database.