Forum Discussion
Copy Activity Fabric
Hi Ka13,
You will need to reference the lookup activity the same way you reference the copy data activity. activity("Lookup Query").output.XXXX When you run the pipeline, after the lookup is successful, you can click on the output to see exactly what the lookup query is returning
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
Can you pls suggest
1. Below is the output of the lookup activity. But in the Script activity how to reference the table name.
{
"count": 1,
"value": [
{
"id": 1,
"TableName": "emp",
}
]
}
2. But in the Script activity ( which is after the Copy Activity) how to reference the table name?
Below insert is working fine but if I pass the TableName getting Error -
-- Working INSERT query
@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, ''');' )
-- Below error in the Insert Query ( I tried adding the Table name as below but was getting the Error. Can you please suggest.
Error - concat is primitive and does not support nested properties )
@concat('INSERT INTO [dbo].[log] (RowsRead,TableName) VALUES (''' ,activity('Copy data1').output.rowsRead, ''',
''', item().TableName, '''');' )