I would like to ask you if is it possible to use "output inserted" SQL statement in data flow (Azure Data Factory)
Currently, I am getting an error:
at Source 'source1': shaded.msdataflow.com.microsoft.sqlserver.jdbc.SQLServerException: A nested INSERT, UPDATE, DELETE, or MERGE statement is not allowed in a SELECT statement that is not the immediate source of rows for an INSERT statement.
What I did:
I also checked stored procedures but they do not provide any output.
What I want:
I would like to get the 'Id' of row of inserted elements (Insert+Select in one operation).
As error shows, insert statement isn't allowed.
As a work around, you can do like this.
@activity('Lookup1').output.firstRow.ID
3.Inside data flow, choose your table as your source and enter this expression:
concat('select ID from dbo.test6 where ID =',toString($ID))
4.If your need to do some transform, you can create a DerivedColumn
and do like this:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.