A nice feature with Azure Data Factory is the ability to copy multiple tables with a minimum of coding. To do this we can use a lookup, a for each loop, and a copy task.
To make this sample work you need to create all the tables you want to copy in the sink database. And make sure that you can insert values to all of the columns.
If you have primary key columns with auto-increment it needs to be changed. If you have foreign keys in your tables these need to be dropped. And all computed columns must be changed
In my lookup, I will use this code to list all the tables and schema names in the AdventureWorksLT database.
SELECT '[' + TABLE_SCHEMA + '].[' + TABLE_NAME + ']' As MyTableWithSchema
, TABLE_SCHEMA As MySchema,
TABLE_NAME As MyTable
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
This gives me a list of tables and schema names inside the database

Continue reading →