All posts

WBS Cloud in practice — turning a Vietnamese BOQ export into a checkable tree

2026-10-26 wbs, pipeline, example

The input is the kind of file estimating teams actually have: a BOQ export from cost software — semicolon CSV, Vietnamese headers, comma decimals. This post follows it through WBS Cloud stage by stage.

The input

Mã;Tên công tác;Khối lượng;Đơn vị;Nhóm
1.1;Đào đất nền;12.500,50;m3;Đất
1.2;Đắp nền;2.000;m3;Đất
2.1;Bê tông móng C25;150,25;m3;Bê tông
2.2;Cốt thép D14;12,5;tan;Bê tông

(Real exports run to thousands of rows; capped at 2 MB of text per upload.)

Stage 1 — extract

The pipeline detects the format (.csv extension, ; delimiter), counts rows and columns, and captures the headers — visible on the run page: kind=csv, 4 rows, 5 columns, delimiter ;.

Stage 2 — chunk

Text is split into ~800-character chunks on heading/page boundaries. For tabular sources this is mostly bookkeeping — but it means a later structure stage (and any future text-analysis stage) has bounded units to work on, with page/section hints preserved.

Stage 3 — structure (the interesting one)

Header mapping recognizes Vietnamese aliases: Mã → code, Tên công tác → name, Khối lượng → qty, Đơn vị → unit, Nhóm → category. Then the tree is built:

Code Name Qty Unit Parent
01 Đất — root
01.01 Đào đất nền 12,500.5 m³ 01
01.02 Đắp nền 2,000 m³ 01
02 Bê tông — root
02.01 Bê tông móng C25 150.25 m³ 02
02.02 Cốt thép D14 12.5 ton 02

Note what just happened silently: 12.500,50 parsed as 12,500.5 (Vietnamese thousands-dot + decimal-comma), 2.000 as 2,000, tan → ton, m3 → m³. Categories became roots; items got codes; explicit codes from the file are kept.

Stage 4 — lineage (why this isn't just a converter)

The lineage graph records: this upload → produced these chunks (4) → this WBS tree (5 items, 2 roots) → written by these stages, at these times. When a quantity looks wrong in three months, the run page answers "where did this come from?" without archaeology. Every stage is idempotent and runs can be re-run with one click — fix the export upstream, re-run, compare.

With a Neo4j AuraDB instance configured, each run's lineage is mirrored into a real graph ((:WbsRun)-[:HAS_NODE]->(:WbsNode)-[:FLOWS]->…), queryable with Cypher — Postgres stays the source of truth, the graph is a projection that can never break a run.

Schedules, quietly

Periodic work (pipeline ticks every 5 minutes, nightly cleanup with a 7-day floor) is editable at runtime on the schedules page — pause, resume, re-cadence — no redeploys.

Try it

Open WBS Cloud, upload any CSV/TSV/JSON/TXT/MD up to 2 MB, and watch the four stages run on the run page. Full guide: WBS Cloud guide.

Reproduce it yourself — exact input, exact output

Input — boq-test.csv (download, or copy below):

Mã;Tên công tác;Khối lượng;Đơn vị;Nhóm;Đơn giá;Thành tiền
1.1;Đào đất nền;100;m3;Đất;12.5;1.250
2.1;Bê tông móng;10;m3;Bê tông;200;2.500
2.2;Cốt thép;1;tan;Bê tông;1.500;2.000

Steps: open WBS Cloud → upload boq-test.csv → open the run → watch the four stages.

Output — structure stage detail (note the deliberate price error on row 2.2 caught by the check):

{ "items": 5, "leaves": 3, "roots": 2,
  "price_checked": 3,
  "price_mismatches": [
    { "code": "02.02", "name": "Cốt thép", "qty": 1, "unitPrice": 1500,
      "total": 2000, "expected": 1500 } ] }

Output — items table: Đào đất nền qty 100 (from 100), unit m³; Đào đất total 1.250 parsed as 1250; roots 01 Đất, 02 Bê tông; every value traceable via the lineage tab. Fix row 2.2 to 1.500, re-upload, Re-run — the mismatch disappears.

Ready to try it yourself? Explore the cloud apps.