Forum Discussion
Ka13
9 months agoHelper II
Copy Activity Fabric
How to extract the values of rowsCopied and rowsRead from the below Copy activity output in Fabric and store in Fabric Warehouse to maintain the log table of rowsCopied and rowsRead in fabric warehou...
tayloramy
9 months agoSuper User
Hi Ka13,
Let's go through this step by step.
First, I created a metadata table in my warehouse:
CREATE TABLE metadata (
runid UNIQUEIDENTIFIER,
rowsRead int,
rowsCopied int,
CopyDuration int
)
Next I add a script activity after the copy activity:
Next, in the expression builder, I will build the expression:
@concat('INSERT INTO dbo.metadata (runid, rowsRead, rowsCopied, CopyDuration) VALUES
(''',pipeline().RunId,''', '''
,activity('Copy data1').output.rowsRead, ''','''
,activity('Copy data1').output.rowsCopied, ''','''
,activity('Copy data1').output.copyDuration, ''');' )
THis runs successfully:
and wehn I look at the warehouse, I see my run recorded:
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.