Practicing the Jky Combination Package Query Strategy: Moving Data from Source API to the Middle Layer
What This Strategy Solves
Combination packages are common in retail and manufacturing: one SKU is made up of several sub-items, and its coding system differs from regular single items. In one real project we saw combination package data in the source system needing to be reused across multiple target systems. Pulling it in real time every time puts heavy pressure on the source and easily fragments data definitions. So the first step is usually to land combination package data reliably into a middle layer before distributing it further. This article focuses on that kind of query strategy: pulling combination package master data from the source endpoint erp-goods.goods.listgoodspackage, with Qeasy (the data integration platform) handling transport into the middle layer on a scheduled cadence.
Data Flow and Field Mapping
Data flow is unidirectional: source system (A) → Qeasy middle layer → downstream strategies consume it. The source-side strategy only "pulls data"; the target-side is configured as a no-op write trigger so the middle layer has a clear landing point, instead of writing straight into the target business system.
Key field mapping (only fields explicitly present in the source material; nothing is invented):
| Purpose | Source field | Middle layer field | Notes |
|---|---|---|---|
| Pagination start | pageIndex | Scheduler variable PAGINATION_START_PAGE | Incremental start maintained by scheduler |
| Page size | pageSize | Fixed 50 | One page per call to avoid large result timeouts |
| Business number | goodsNo | number | Combination package business code |
| Primary key ID | goodsId | id | Used for idempotency and deduplication |
| SKU identifier | skuId | skuId | Sub-item dimension inside the combination |
| Name | goodsName | goodsName | Used for display and reconciliation |
Mapping principle: code mapping is centralized in the platform's mapping table, not scattered across strategies; only necessary header fields are transported here, and sub-item details are expanded by downstream consumer strategies.
How to Configure on Qeasy
In the Qeasy data integration platform, this is a typical query-only configuration:
- Create a strategy, direction "Source: Jky" → "Target: Qeasy middle layer", type QUERY_ONLY (query only, no direct write to target business system).
- On the source side pick the WebAPI endpoint
erp-goods.goods.listgoodspackage, method POST, enableautoFillResponseso response fields are auto-populated into the response structure for easier mapping. - Pagination: pageIndex references
{{PAGINATION_START_PAGE}}, pageSize is fixed at 50; in incremental mode the platform auto-fills the page based on the last max ID. - Primary key and number: set
goodsNoas number,goodsIdas id, enableidCheckfor idempotency so the same combination package won't be written multiple times. - Target side: pick the no-op write as the trigger node, so the middle layer has a definite execution result rather than bypassing the platform.
- Scheduling: source crontab is
0 0,12 * * *(daily at 00:00 and 12:00), target crontab is23 2 * * *(02:23 daily), staggered to reduce pressure on the source.
Implementation Steps
We recommend a three-phase rollout instead of running all history at once.
- Phase 1: Incremental start. Use a small batch first to validate mapping, set pageIndex to 1, run one full pagination pass, and confirm combination codes and sub-item dimensions land correctly in the middle layer.
- Phase 2: Full trigger. Once verified, turn off incremental mode, manually trigger one full pull to backfill history.
- Phase 3: Steady-state scheduling. Switch the source timer back to
0 0,12 * * *and the target timer to23 2 * * *; configure failure retries and alerting.
Lessons Learned
- Treating a query strategy as a sync strategy. A typical mistake is writing query results straight into the target business system, polluting downstream documents. The safer pattern is QUERY_ONLY on the source, with downstream strategies doing the writing.
- Hard-coded pagination causing data loss. pageSize=50 is reasonable, but pageIndex must reference a variable; if hard-coded to 1 you only ever pull the first page.
- Wrong idempotency key. The primary key for a combination package should be
goodsId, notskuId. skuId is finer-grained and would split the same combination package into multiple records. - Source and target running at the same time. Overlapping crontabs cause "pull while write" behavior. Stagger them, e.g., source at 00:00 and 12:00, target at 02:23.
- Code mapping scattered everywhere. We have seen this on customer sites: every strategy maintains its own code mapping, and three months later the two sides do not match. The stable approach is to centralize mapping in Qeasy's mapping table for global reuse.
When This Applies and When It Does Not
Applies: combination package master data needs to be reused by multiple downstream systems and you want a unified data definition in a middle layer; on-premise deployment with sensitivity to source endpoint pressure.
Does not apply: scenarios that need to write combination packages into the target business system in real time and have them participate in document flow (use a SYNC strategy instead); scenarios where combination package fields change frequently and minute-level freshness is required (use event-triggered integration rather than scheduled query).