Search code examples
sql-serverazure-data-factory

Capture ADF user name in SQL Server when ADF user makes changes to table


I have a pipeline in Azure Data Factory (ADF) that I use to update a table in SQL Server.

Now I want to capture the details like timestamp & user name who ran the pipeline that caused the change in the database table.

Please help me doing so.

NOTE: I tried to add triggers in SQL Server, but that is not capturing user details if the data is changed using an ADF pipeline. It only captures user name if it's done manually


Solution

  • As such ADF doesnt have out of box feature to identify who manually trigerred the ADF pipeline. But to identify it in an automated way , you can use the REST API to get the Activity Logs at ADF level/log analytics enablement.

    Sample reference: https://stackoverflow.com/questions/66678256/find-who-triggered-azure-data-factory-pipeline-adf#:~:text=Go%20to%20particular%20ADF%20Resource,by%20whom%20it%20was%20done.&text=Great!