Incremental and Full-Load Dual-Track Solution for Synchronizing Transfer-In Documents from Yonyou BIP to MySQL
What This Strategy Solves
Synchronizing transfer-in documents from Yonyou BIP to MySQL may appear to be a simple data-persistence task, but three problems commonly emerge after deployment: subsequent pages are omitted because an interface returns only one page, duplicate pushes create multiple database rows, and documents are written before warehouse or item master data becomes available, leaving them impossible to query. One manufacturing enterprise once failed to obtain later records for several cycles because the pagination boundary was handled incorrectly. This design uses paginated retrieval, an incremental starting point, and full-load compensation, with the Qeasy data integration platform handling scheduling and exceptions.
Data Flow and Field Mapping (Yonyou BIP → Intermediate Layer → MySQL)
Data is first retrieved from Yonyou BIP through paginated queries. Qeasy converts the response into a unified intermediate structure and then writes it to MySQL according to the target fields. The source configuration requires pagination parameters and optionally supports filtering by document number, transfer-out number, and business status. On the target side, the system checks for an existing record by using the document primary key.
| Business Meaning | Source Field | MySQL Field | Recommended Handling |
|---|---|---|---|
| Document primary key | orderDetailId | id | Use for idempotency checks |
| Document number | code | code | Validate together with the business number |
| Document date | vouchdate | vouchdate | Preserve the format and validate first |
| Transfer-out warehouse | outwarehouse | outwarehouse | Must reference a synchronized warehouse code |
| Transfer-out warehouse name | outwarehouse_name | outwarehouse_name | Display field; do not use as a unique key |
| Transfer-in warehouse | inwarehouse | inwarehouse | Depends on staged item master data |
| Transfer-in warehouse name | inwarehouse_name | inwarehouse_name | Preserve the source system meaning |
Code mappings should be managed centrally. One retail enterprise initially distributed warehouse and item mappings across several scripts, requiring multiple changes for each master-data update. It later centralized the mappings in the platform, so a new version only required updating the mapping table. The intermediate layer should also retain the source response, conversion status, target primary key, and error reason to support traceability.
How to Configure It in Qeasy
First, configure the Yonyou BIP query action. The method is POST. Start pagination on the first page and set the page size according to the actual response capacity; do not treat a hard-coded page count as proof that the query is complete. The iterator should continue retrieving data until the response page is empty or another termination condition is reached, while preserving the starting position of each page.
Second, configure the transformation model. The key is not simply to copy fields one by one, but to standardize empty values, dates, warehouse codes, and document statuses. Enable idCheck and use id on the target side to determine whether a record already exists. Duplicate data should enter a skip or update branch rather than being inserted again.
Third, configure the MySQL batch-execution action. Parameter values should receive transformed results through template variables. Bind fields explicitly and do not construct SQL by concatenating user input. Before writing, check the primary key and then insert when the record does not exist or update it when it does. Failed records should enter retry and exception queues, with specific reasons such as a missing mapping or invalid field format.
Implementation Steps
Use an incremental and full-load dual track rather than relying only on high-frequency incremental runs.
- Prepare dependencies: Complete synchronization of item and warehouse master data first, create a test document, and confirm that its codes can be resolved.
- Establish the incremental start point: For the initial launch, start from a clearly defined time point or business status and retrieve data through pagination at a fixed frequency. A schedule such as the source configuration’s execution every 17 minutes can be considered, but it must be adjusted according to interface limits and target-database capacity.
- Trigger full-load validation: Before go-live or after a rule change, run one full load by document-number range. Use the full load to establish a baseline and detect omissions. It should not write the same business window concurrently with the incremental load.
- Switch to steady-state scheduling: Run the incremental load at a fixed frequency and monitor pagination completion, transformation failures, duplicate primary keys, and target write counts. If a cross-cycle exception occurs, retrieve again from the last successful time point.
- Reconcile results: Separately count source pages, candidate records, successes, updates, skips, and failures. If the counts do not align, stop expanding the window and locate the missing page or dependency problem first.
The document header and lines can also be released in stages: first synchronize document master information, warehouses, and summaries, and then process line items. One manufacturing enterprise implemented the header before the lines, making on-site problems much easier to isolate.
Lessons Learned
- A typical mistake is to treat a successful HTTP request as sufficient. A successful interface response does not mean every page has been retrieved; the business-level completion condition must be checked.
- Reusing pagination parameters can cause data loss. Recalculate the starting position for every page instead of changing it only once outside the iterator.
- Using the document number instead of the primary key for idempotency is unsafe. Numbers may change or be empty, so the source record primary key should be the final decision criterion.
- Writing names directly as codes is risky. Warehouse names may not be unique. The robust approach is to maintain a source-code-to-target-code mapping and verify that the target code exists.
- Running full and incremental loads concurrently against the same business window is easy to get wrong. A safer approach is to execute them serially or use source version, update time, and primary key for mutual exclusion.
Suitable and Unsuitable Scenarios
This solution is suitable for transferring paginated Yonyou BIP transfer-in documents to MySQL in a public-cloud environment, with the platform responsible for transformation, idempotency, scheduling, and exception tracking. It is not the best fit when the document volume is small, periodic full reconstruction is acceptable, or real-time per-row transactions across systems are required. In the latter case, event-driven triggering may be considered, subject to the source system’s capabilities.