Sub topic 2
Choosing a transfer approach: files, staging tables, or direct transfer
This chapter assumes you know what the migration cockpit is, can tell master data from transactional data, and can work with CSV or XML files. You will compare the three ways the cockpit receives legacy data and learn how to pick one.
The three approaches
Every migration project uses exactly one transfer approach. You choose it when you create the project, so decide before you start.
- Files: You download a template for each migration object, fill it with legacy data, and upload it to the cockpit. Templates are XML or CSV files, depending on the object.
- Staging tables: The cockpit creates tables in a SAP HANA database schema. You fill them with your own tools, such as ETL jobs or SQL scripts. The cockpit reads the data from those tables.
- Direct transfer: The cockpit reads data straight from tables in a connected SAP source system through an RFC connection. No file or staging table sits in between.
Comparing them
| Aspect | Files | Staging tables | Direct transfer |
|---|---|---|---|
| Source | Any system that can export CSV or XML | Any system, loaded by your own tools | SAP system only |
| Typical volume | Small to medium | Medium to large | Medium to large |
| Extra setup | Spreadsheet work | Database access and ETL skills | RFC connection to the source |
| Main risk | Manual errors and file size limits | Table structure mistakes | Source data not cleaned in advance |
Common errors
- Choosing files for large volumes. Uploads can hit size limits and take a long time. If you expect hundreds of thousands of rows for one object, plan for staging tables.
- Assuming direct transfer works for every object. It covers only the objects that SAP delivers for that scenario. Check the object list in your release before you commit to it.
- Skipping the pre-check. All approaches reach the cockpit's own validation step, but fixing obvious problems earlier is cheaper. The script below finds duplicate keys and over-long values in a CSV extract. The file and field names are placeholders, not SAP template fields.
import csv
from collections import Counter
def precheck(path, key_field, max_lengths):
"""Return a list of problems found in a source CSV before upload."""
problems = []
keys = Counter()
with open(path, newline="", encoding="utf-8") as f:
for line_no, row in enumerate(csv.DictReader(f), start=2):
keys[row[key_field]] += 1
for field, limit in max_lengths.items():
if len(row[field]) > limit:
problems.append(f"line {line_no}: {field} is longer than {limit} characters")
problems += [f"duplicate key {k}" for k, n in keys.items() if n > 1]
return problems
for problem in precheck("customers.csv", "CustomerId", {"Name": 40}):
print(problem)Decision criteria
Ask these questions in order:
- Is the source an SAP system, and does the cockpit offer the objects you need for direct transfer? If yes, direct transfer avoids file handling.
- Is the volume large, or must loading be repeatable and automated? If yes, use staging tables.
- Otherwise, use files. They need the least infrastructure and suit small, one-time loads.
Exercise
A company moves 20,000 material records from a non-SAP legacy system. A data engineer will rerun an ETL job several times during test cycles. Which approach fits best, and why?
Show answer
Staging tables. The source is not an SAP system, so direct transfer is out. The volume is moderate, but the repeated ETL runs favor tables that a job can reload automatically over manually edited files.