Essential cookies keep authentication working. With your permission, we also use analytics cookies to understand and improve the product. Read our Privacy Policy

DataEngPrep.tech
QuestionsPracticeAI CoachDashboardPricingBlog
ProLogin
Home/Questions/Cloud/Tools/How to copy all 1000 tables from source to target in ADF?

How to copy all 1000 tables from source to target in ADF?

Cloud/Toolseasy2 min read

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…

🤖 Analyze Your Answer
Frequency
Low
Asked at 1 company
Category
179
questions in Cloud/Tools
Difficulty Split
104E|27M|48H
in this category
Total Bank
1,863
across 7 categories
Asked at these companies
FedEx Dataworks

Why This Question Matters

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.

How to Approach This

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.

Expert Answer
339 wordsIncludes code

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.

Mechanics

The Lookup activity queries the source database's system catalog (e.g., 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';

Key Trade-offs & Best Practices

* Metadata-Driven Control: For more complex scenarios, instead of querying 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.

⚡
Pro Tip

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.'

Want all answers as a PDF for offline study?
Seven focused volumes with 750+ in-depth answers — Answer Vault →

Related Cloud/Tools Questions

easyWhat are Airflow Operators? Give examples.FreeeasyExplain the difference between Azure Data Factory (ADF) and Databricks.FreeeasyHow do you handle data security and compliance in a cloud environment?FreehardWhat are the key components of AWS Glue, and how do they work together?FreeeasyWhat is Azure Data Factory (ADF), and what are its main components?Free

Level up your prep

Recommended
Educative
Educative Unlimited

800+ hands-on courses — Grokking System Design, Coding Patterns, and AI mock interviews for your DE loop.

Start learning →

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.

← Back to all questionsMore Cloud/Tools questions →
Categories
All QuestionsSQLSpark / Big DataPython / CodingSystem DesignCloud / ToolsBehavioral
By Company
AmazonGoogleDatabricksSnowflakeAWSAzureMicrosoftNetflixUberTCS
Interview Guides
All GuidesTop SQL QuestionsTop Spark QuestionsPySpark QuestionsTop Python QuestionsTop System DesignKafka QuestionsAirflow QuestionsSQL Window FunctionsETL QuestionsData Modeling
Products
AI Interview CoachAnswer AnalyzerSQL PlaygroundResume AnalyzerAnswer Vault PDFsPricing
Company
About & Editorial PolicyContact UsAI DisclosureDisclaimerTerms of ServicePrivacy Policy
© 2026 DataEngPrep.tech. All rights reserved.
AboutBlogContactDisclaimer