Forum Discussion
Copy Activity Fabric
Create a Log Table in Fabric Warehouse
CREATE TABLE CopyActivityLog ( ActivityDate DATETIME, RowsRead INT, RowsCopied INT );
2. Use a Data Pipeline with Script Activity
- After the Copy activity, add a Script activity in the pipeline.
- Use dynamic content to pass rowsRead and rowsCopied from the Copy activity output.
3. Insert Values Using SQL Script
Example SQL script using pipeline parameters:
INSERT INTO CopyActivityLog (ActivityDate, RowsRead, RowsCopied) VALUES (GETDATE(), @{activity('CopyData').output.rowsRead}, @{activity('CopyData').output.rowsCopied});
Replace 'CopyData' with the actual name of your Copy activity.
4. Validate Pipeline Execution
- Run the pipeline and check the log table.
- Ensure the Script activity executes after the Copy activity.
- Ka139 months agoHelper II
anilgavhane @Thanks for the response
i tried adding the Script activity after Copy Activity as below but getting Error. Seems The Script dynamic content is not correct. Can you please suggest
- tayloramy9 months agoSuper User
Hi Ka13,
Here's my set up for this:
I have a pipeline with a copy data activity and an email activity.
In the body of the email activity, I click "View in expression builder" to open up the expression builder:
And then for the expression, I put
@concat('Rows Read ', activity('Copy data1').output.rowsRead)This results in the following email:
As you can see, the rowsRead output of 6 is added to the email.
Here is the output from my copy data activity:
{ "dataRead": 6608, "dataWritten": 4572, "filesRead": 1, "filesWritten": 1, "sourcePeakConnections": 4, "sinkPeakConnections": 1, "rowsRead": 6, "rowsCopied": 6, "copyDuration": 14, "throughput": 1.101, "errors": [], "usedDataIntegrationUnits": 4, "usedParallelCopies": 1, "executionDetails": [ { "source": { "type": "Lakehouse" }, "sink": { "type": "Lakehouse" }, "status": "Succeeded", "start": "11/4/2025, 12:10:42 PM", "duration": 14, "usedDataIntegrationUnits": 4, "usedParallelCopies": 1, "profile": { "queue": { "status": "Completed", "duration": 6 }, "transfer": { "status": "Completed", "duration": 6, "details": { "listingSource": { "type": "Lakehouse", "workingDuration": 0 }, "readingFromSource": { "type": "Lakehouse", "workingDuration": 0 }, "writingToSink": { "type": "Lakehouse", "workingDuration": 0 } } } }, "detailedDurations": { "queuingDuration": 6, "transferDuration": 6 } } ], "dataConsistencyVerification": { "VerificationResult": "NotVerified" } }Hope this helps.
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.