A daily chart should distinguish a measured zero from a day with no complete observation. Start from the reporting calendar and attach evidence of completeness, so missing days do not vanish from the chart.

Executed synthetic walkthrough: the report was run in the actual OriginChainDB console, exported as CSV and validated by the local application adapter. Three reviewed light-mode screenshots are included.

7 calendar days retained. Day 2: measured 0. Day 3: unknown. Late event → new report revision

Conceptual illustration of the synthetic application workflow. Light PNG · Dark PNG. This is not a product screenshot.

The data contract

Use a calendar spine to define the days that belong in the report. Store activity separately from ingestion completeness. A day can be complete with zero events, incomplete with some events, or absent from the observation feed entirely.

Prepare the fixture

Seven fictional days form the reporting week. Day 2 is a verified zero. Day 3 has no completed observation and must remain unknown. Day 5 has two observed events but is marked partial. A late event on day 2 creates a revised report rather than silently rewriting the old receipt.

Use Python 3 for the local example. It uses only the standard library and does not require credentials. For the live extension, use a dedicated demonstration namespace and only the permissions needed by the chosen client. Keep connection values outside source files, logs and recordings.

Download the runnable example · Inspect expected local output

python example.py

Build the recorded workflow

  1. Create a seven-row reporting calendar, separate daily activity totals, explicit completeness records and a separate late-revision table in a fresh namespace. The fixture uses logical day numbers and already grouped counts.

  2. Inspect the observed totals. Query from the calendar and LEFT JOIN the three evidence tables so every reporting day survives, including the day with no observation.

  3. Export the successful seven-row report and run route-export.py on the actual CSV. It distinguishes observed zero from null and validates the complete, partial and unknown states against the supplied evidence fields.

  4. Display the baseline days and the separate day-2 revision together. Keep day 2 at zero in the baseline receipt while showing the later revision as one; this fixture does not replace ingestion cutoffs or establish immutable snapshot behavior.

Inspect the executable rule

counts = {1:4,2:0,4:6,5:2,6:3,7:1}
complete = {1,2,4,6,7}
result = {"days":[{"day":d,"count":counts.get(d),"state":"complete" if d in complete else "partial" if d in counts else "unknown"} for d in range(1,8)],"revised_day_2":1}
assert result["days"][1] == {"day":2,"count":0,"state":"complete"}
assert result["days"][2] == {"day":3,"count":None,"state":"unknown"}

Interpret the local result

The local result preserves all seven days. Day 2 is 0 with complete status; day 3 is null with unknown status; day 5 is 2 with partial status. The separate late-event revision changes day 2 to 1. No live database output or ingestion schedule is fabricated.

Executed local output

{
  "days": [
    {
      "day": 1,
      "count": 4,
      "state": "complete"
    },
    {
      "day": 2,
      "count": 0,
      "state": "complete"
    },
    {
      "day": 3,
      "count": null,
      "state": "unknown"
    },
    {
      "day": 4,
      "count": 6,
      "state": "complete"
    },
    {
      "day": 5,
      "count": 2,
      "state": "partial"
    },
    {
      "day": 6,
      "count": 3,
      "state": "complete"
    },
    {
      "day": 7,
      "count": 1,
      "state": "complete"
    }
  ],
  "revised_day_2": 1
}

The recorded SQL-to-application walkthrough

The actual report retains all seven days. Day 2 is zero with complete status; day 3 is null with unknown status; day 5 has two observed events and partial status. The separate revision adds one event to day 2 and produces revised_day_2 = 1 without changing its baseline count. The adapter checks these distinctions. Completeness was supplied explicitly, not inferred from how many rows the query returned.

DayBaseline countCoverage
14complete
20complete
3unknownunknown
46complete
52partial
63complete
71complete

The separately recorded day-2 revision is 1. Its baseline remains zero in the table above.

The following stills come from actual native console captures. Private fields were blurred before encoding. Open an image for the full-size query or result. Timing shown by the console is one observation, not a benchmark.

Actual light-mode OriginChainDB console. The actual stored totals include an explicit zero for day 2 and no observation row for day 3.

The actual stored totals include an explicit zero for day 2 and no observation row for day 3.

Actual light-mode OriginChainDB console. The successful calendar-first report joins activity, completeness and the separately stored late revision.

The successful calendar-first report joins activity, completeness and the separately stored late revision.

Actual light-mode OriginChainDB console. The actual seven-row report preserves zero, unknown and partial states and exposes the separate day-2 revision.

The actual seven-row report preserves zero, unknown and partial states and exposes the separate day-2 revision.

Reproduce the verified handoff

Executed fixture and report SQL · Actual downloaded CSV · CSV adapter · Executed adapter output · Verification receipt.

Choose a new demonstration namespace for a repeat run. Execute the setup statements, inspect the stored input rows, and then execute this report. Export its complete successful result and pass that actual file to the adapter.

SELECT c.day_no AS day_no, a.day_no AS observed_day, a.event_count AS event_count, f.day_no AS completed_day, CASE WHEN f.day_no IS NOT NULL THEN 'complete' WHEN a.day_no IS NOT NULL THEN 'partial' ELSE 'unknown' END AS coverage_state, l.added_events AS late_event_count, l.revision_label AS revision_label, CASE WHEN l.day_no IS NULL THEN NULL ELSE a.event_count + l.added_events END AS revised_count FROM academy_blog_20261016_daily_coverage.calendar_days c LEFT JOIN academy_blog_20261016_daily_coverage.activity_totals a ON c.day_no = a.day_no LEFT JOIN academy_blog_20261016_daily_coverage.complete_days f ON c.day_no = f.day_no LEFT JOIN academy_blog_20261016_daily_coverage.late_revisions l ON c.day_no = l.day_no ORDER BY day_no;
python route-export.py export.csv

The adapter checks a local CSV and produces application output. It performs no network calls or external actions. The packaged synthetic-contract-input.csv is a separate offline test input; it is not the actual console export.

Diagnose and recover safely

If a zero unexpectedly appears for an unknown day, inspect default-value replacement and aggregation logic. Replacing null with zero may be appropriate only after a completeness rule establishes that the period was fully observed. If dates shift, inspect timezone conversion before changing the query.

Boundaries and the next improvement

Completeness is a claim from the ingestion system, not something a chart can infer from row count alone. Document how it is established and how late events reopen a period. Exercise: add an event after the cutoff and ensure the previous report remains reproducible.

The practical takeaway

A truthful daily dashboard shows both the number and the evidence behind it. This recorded handoff keeps the reporting calendar complete while preserving uncertainty and a separate revision. For timestamped production events, define the timezone, cutoff and ingestion-completeness contract before grouping data into days.

Continue with the product reference

OriginChainDB SQL documentation. The integration design was checked against the local official documentation and Python client source on 9 October 2026. Source inspection does not establish the behavior of the current deployment.

Local Python execution: sanitized receipt. The recorded SQL-to-CSV scope is verified above. No customer data, performance benchmark or production deployment is claimed.