Reputation: 9
My look up component in Azure Data Factory is working well but it is not fetching value in for each component - database and copy data to sink location
These are the tables I'm trying to migrate:
Loop-up activity is executing perfectly:
But I getting an error in my for each activity:
I'm trying to copy SalesLT
schema tables to Azure Data Lake Gen 2
Error Message enter image description here
Upvotes: 0
Views: 73
Reputation: 7156
Incorrect syntax near FROMSalesLt.,
From the error message, it looks like the space is missing between the key word from
and @item().Schemaname
. This causes the error.
The correct syntax is,
SELECT * FROM [@{item().Schemaname}].[@{item().Tablename}]
When you give the above query in the source tab of copy activity, pipeline will run without any error.
If you want to copy only the SalesLt
schema tables, you can also give the query as
SELECT * FROM [SalesLt].[@{item().Tablename}]
Upvotes: 0