Jignesh Waghela
Jignesh Waghela

Reputation: 9

Migrating data from on-premises SQL Server to Azure using Azure Data Factory

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:

enter image description here

Loop-up activity is executing perfectly:

enter image description here

But I getting an error in my for each activity:

enter image description here

enter image description here

enter image description here

I'm trying to copy SalesLT schema tables to Azure Data Lake Gen 2

Error Message enter image description here

Upvotes: 0

Views: 73

Answers (1)

Aswin
Aswin

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

Related Questions