Reviewed by Aditya Kumar · Last reviewed 2026-08-08
The most efficient way to copy many tables in ADF is a metadata driven approach using a Lookup activity to fetch table names, followed by a ForEach activity that iterates and executes a Copy Data…
This easy-level Cloud/Tools question appears frequently in data engineering interviews at companies like FedEx Dataworks. While less common, it tests deeper understanding that distinguishes strong candidates.
Start by clearly defining the core concept being asked about. Interviewers want to see that you understand the fundamentals before diving into implementation details. Structure your answer with a definition, then explain the practical application with a concise example. The expert answer includes a code example that demonstrates the implementation pattern.
The most efficient way to copy many tables in ADF is a metadata-driven approach using a Lookup activity to fetch table names, followed by a ForEach activity that iterates and executes a Copy Data activity for each table.
INFORMATION_SCHEMA.TABLES for SQL Server, PostgreSQL, Snowflake, or sys.tables for SQL Server) to retrieve a list of table names. This list is then passed as input to a ForEach activity. Inside the ForEach loop, a Copy Data activity is configured. Both its source and sink datasets are parameterized to dynamically accept the current table name from the ForEach item. For example, the table name parameter in the dataset would be set to @item().TABLE_NAME. This pattern ensures reusability and scalability without creating individual copy activities for each table.
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA = 'dbo';
INFORMATION_SCHEMA, use a dedicated control table or JSON file. This allows for selective table inclusion/exclusion, custom source-to-target table mappings, or different copy configurations per table (e.g., specific column mappings for certain tables).
* Concurrency: Set the batchCount property of the ForEach activity (typically 5-10) to control parallel execution. This balances performance with resource consumption, preventing throttling on source or sink systems.
* Error Handling: Implement robust error handling within the ForEach loop (e.g., using on failure paths or try-catch patterns) to log and manage failures gracefully for individual tables without stopping the entire pipeline. This is critical for large-scale operations.
* Logging: Ensure comprehensive logging for each table copy operation, capturing status, row counts, and any errors, which is vital for monitoring, auditing, and debugging.
* Parameterization: Maximize the use of pipeline and dataset parameters to make the solution flexible and reusable across different environments or source/target connections.
In the interview, also mention: Discuss how you'd handle schema evolution, data type conversions, or implement change data capture (CDC) for production-grade solutions.
Red Flag: Sequential copy of 1000 tables. Pro-Move: 'Lookup + ForEach batchCount 8; we log each table success/fail—full refresh in 2h, rerun only failed.'
Some links below are affiliate links. If you buy through them we may earn a small commission at no extra cost to you — it helps keep DataEngPrep free.
According to DataEngPrep.tech, this is one of the most frequently asked Cloud/Tools interview questions, reported at 1 company. DataEngPrep.tech maintains an editor-reviewed database of 1,863 data engineering interview questions across 7 categories.