Practical Tutorial: Syncing Order Line Items from Jushuitan to Hologres
What This Strategy Solves
In retail and supply-chain integration, order line items often need to flow from the operational system into the analytics backbone. A retail customer uses Jushuitan as the front-end business system and Hologres as the downstream analytics warehouse. The order header and the order body live in two different semantic models, and the customer wants the line-level detail from Jushuitan in Hologres for sales analysis, fulfillment tracking, and reconciliation. This article unpacks that single sync link.
Data Flow and Field Mapping
The link runs from Jushuitan to Hologres, carrying only the order line items. The order header is out of scope for this strategy.
The source side is Jologres, and the target side is a wide detail table in Hologres. We treat it on Qeasy as a staging semantic table, rather than writing directly to the final business table. The field mapping below is the version our team aligned with the customer on site (only key fields shown):
| Semantic | Jushuitan source | Staging field | Hologres target |
|---|---|---|---|
| Platform order no. | platform_order_no | src_order_no | order_no |
| Platform sub-order no. | platform_sub_no | src_sub_no | sub_order_no |
| SKU | sku | sku | sku_code |
| Product name | product_name | product_name | product_name |
| Quantity | qty | qty | qty |
| Unit price | price | price | unit_price |
| Amount | amount | amount | line_amount |
| Order time | order_time | order_time | order_time |
| Modify time | modify_time | modify_time | update_time |
| Shop | shop_id | shop_id | shop_code |
The two most error-prone fields in the line items are the platform sub-order number and the amount: the sub-order number decides whether a single line can be uniquely identified, and the amount decides whether downstream aggregation is correct.
How to Configure It on Qeasy
The strategy itself is not complex, but a few configuration points matter.
First, register the Jushuitan source connection and the Hologres target connection. In a public cloud environment, the platform-managed connectors are enough.
Second, create a staging table in Hologres for the order line items, named clearly, for example ods_order_line_stage. A common pattern we see on Qeasy deployments is to keep headers and bodies in separate stages: first move the body into a staging table to validate the link and the field mapping, then assemble header and body downstream at the business cadence.
Third, configure the source read. We use a dual approach of an initial full load followed by incremental reads on modify_time: the first run pulls the historical full set, and subsequent runs use an incremental condition that scrolls forward. The incremental condition is anchored on a clear timestamp field so the same row is not written twice.
Fourth, configure the field mapping. The field that customers stumble on repeatedly is encoding mapping. Another common pattern on Qeasy is to centralize encoding mapping: keep SKU, shop, and warehouse code conversions in a dedicated mapping table maintained by a separate strategy, rather than scattering the logic across many sync links.
Fifth, when writing to Hologres, use upsert semantics. The recommended primary key is the triple (src_order_no, src_sub_no, sku_code), which guarantees that the same row is overwritten rather than duplicated.
Implementation Steps
We split the rollout into three scheduling phases so the operations team can verify it step by step.
Phase one: full-load starting point. Use a one-time full load to pour the historical line items into the staging table, then sample-check row counts and amounts afterwards. A common approach on site is to schedule the full load during off-peak hours to avoid pressure on the source.
Phase two: incremental scheduling. On Qeasy, configure this strategy as a scheduled job, for example every 15 minutes, pulling rows that changed after the previous window using modify_time. The start timestamp for the incremental phase should be set to a definite value once the first full load is complete — do not use "now," or the gap at the end of the full load will be lost.
Phase three: stable operation with a backfill mechanism. After the incremental job has run for a while, compare row counts and amounts between the two sides. A third common pattern on Qeasy is to run an incremental feed together with a periodic full load: keep the full load as a safety net, use the incremental feed as the main path, and let the full-load diff drive reconciliation.
Lessons from the Field
- A typical mistake is treating the platform sub-order number as optional. When it is null, multiple lines under the same order number cannot be distinguished, and downstream aggregation breaks. The safe approach is to require it and validate at the source.
- A typical mistake is using
order_timeas the incremental field. Order time only says when something happened, not when it changed, so data is missed. The incremental field should be an update timestamp such asmodify_time. - A typical mistake is using "now" as the incremental starting point right after the full load. This drops the window between the end of the full load and the moment the incremental job starts. The safe approach is to record a definite cutoff time once the full load is complete and use that as the incremental start.
- A typical mistake is hardcoding encoding conversion into every strategy. When SKU encoding rules change, every link has to be edited. A centralized mapping table collapses the change into a single place.
- A typical mistake is writing directly into the final business table. When sync goes wrong, it disturbs live analytics. Keeping a staging layer provides a buffer for replay and reconciliation.
When to Use and When Not to Use
This strategy fits the scenario where order line items from Jushuitan are synced into the Hologres analytics backbone, especially when there is an update-time-based incremental pull and encoding conversion involved. It does not fit order header sync, refund sync, or scenarios that require strict per-order real-time consistency. It also does not fit complex cross-body business validation — those should be carried by separate strategies.