Skip to content
Datablare
Claude Code Manufacturing Operations

Production output, yield and downtime

4.64M good units at 96.9% yield and 84.9% plan attainment, with downtime by line and reason pointing at Line B2.

Data
Synthetic manufacturing plant demo data (PostgreSQL)
Asked in
Claude Code
Updated
Try this on your data

1 · The brief

What Claude Code was asked

Build a plant dashboard for 2026: good units produced, yield, line availability and plan attainment, weekly output, downtime by production line and by reason, and yield by line so I can see which line needs attention.

Given exactly like this. Claude Code asked Datablare which tables it could read, wrote the SQL itself, ran each query through Datablare and built the dashboard from what came back.

2 · The dashboard

The dashboard Claude Code built

Production output, yield and downtime dashboard: Good units per week, Downtime by line, Downtime by reason, Scrap rate by line, Lines

Built from 4 read-only queries. Every figure on the dashboard was read from the database through Datablare; nothing was estimated or typed in.

Headline numbers (January–October 2026):

  • Good units: 4.64M (All lines, 2026)
  • Yield: 96.9% (Good ÷ (good + scrap))
  • Availability: 93.2% (Runtime ÷ scheduled time)
  • Plan attainment: 84.9% (Good ÷ planned units)

What stands out:

  • Good units per week: About 106,904 good units in a typical week
  • Downtime by line: Line B2 lost 775 hours, about twice any other line
  • Downtime by reason: Changeover is the largest cause at 810 hours
  • Scrap rate by line: Line B2 scraps 5.3% of output

The data is a synthetic manufacturing plant dataset made for this example, so the numbers describe no real company. The queries, the dashboard and the audit entries are real: Claude reached the database only through Datablare, read-only, and every query is on record with the question it served.

3 · What Datablare ran

4 read-only queries, nothing changed

Each query below is copied from the audit log of this run. Datablare checked that it only reads, ran it read-only, and gave only the rows to Claude Code; it never stores them.

  1. Query 1

    Good units, yield, availability and plan attainment across all runs in 2026

    1 row · 49 ms

    SELECT sum(good_units) AS good_units,
           round(sum(good_units)::numeric / nullif(sum(good_units + scrap_units), 0), 4) AS yield,
           round(sum(runtime_min)::numeric / sum(runtime_min + downtime_min), 4) AS availability,
           round(sum(good_units)::numeric / sum(planned_units), 4) AS plan_attainment
    FROM manufacturing.production_runs
    WHERE run_date >= DATE '2026-01-01'
  2. Query 2

    Good units per full week in 2026 (weeks starting Monday 5 January)

    42 rows · 54 ms

    SELECT to_char(date_trunc('week', run_date), 'YYYY-MM-DD') AS week, sum(good_units) AS good_units
    FROM manufacturing.production_runs
    WHERE run_date >= DATE '2026-01-05' AND run_date < DATE '2026-10-26'
    GROUP BY 1
    ORDER BY 1
  3. Query 3

    Downtime minutes and yield by production line, 2026

    6 rows · 57 ms

    SELECT l.name AS line, l.plant, sum(r.downtime_min) AS downtime_min,
           round(sum(r.good_units)::numeric / sum(r.good_units + r.scrap_units), 4) AS yield
    FROM manufacturing.production_runs r
    JOIN manufacturing.lines l ON l.id = r.line_id
    WHERE r.run_date >= DATE '2026-01-01'
    GROUP BY 1, 2
    ORDER BY 1
  4. Query 4

    Downtime minutes by reason, 2026

    5 rows · 39 ms

    SELECT downtime_reason, sum(downtime_min) AS downtime_min, count(*) AS runs_affected
    FROM manufacturing.production_runs
    WHERE run_date >= DATE '2026-01-01' AND downtime_reason IS NOT NULL
    GROUP BY 1
    ORDER BY 2 DESC
Tables read manufacturing.linesmanufacturing.production_runs

4 · The audit entry

Who asked what, on record

Every query is recorded with the person who asked, the question in their words and why the agent ran it. Admins see this in the audit log; nothing reaches the database without it.

How the audit log works

query_data_source

via Claude Code

Allowed
Who
The person signed in (hidden on this public page)
Question
Build a plant dashboard for 2026: good units produced, yield, line availability and plan attainment, weekly output, downtime by production line and by reason, and yield by line so I can see which line needs attention.
Intent
Good units, yield, availability and plan attainment across all runs in 2026
Result
4 queries, 54 rows, read-only

More use cases

All examples
  • Plant comparison: output and attainment dashboard: Good units per month by plant, Plan attainment by plant, Downtime by plant and reason, Plants
    Claude Code Manufacturing Executive overview

    Plant comparison: output and attainment

    Pune leads output with 1,575,170 good units; Chennai trails at 82.5% of plan, held back by breakdowns.

    Updated Open

  • Shift performance across the plant dashboard: Plan attainment by shift, per month, Downtime hours by shift, Downtime by line and shift, Scrap rate by shift
    Claude Code Manufacturing Operations

    Shift performance across the plant

    The night shift reaches 80.9% of plan against 86.9% in the morning, scraps 4.2% and loses 1,357 hours.

    Updated Open

  • E-commerce sales and retention dashboard dashboard: Monthly revenue, Revenue by category, 2026, Lifetime revenue per customer, by channel, Orders per month
    Claude Code E-commerce Executive overview

    E-commerce sales and retention dashboard

    ₹5.21M revenue from 11,897 orders this year, a 57.9% repeat-customer rate, and which channels bring the customers who spend most.

    Updated Open

Build this on your own data.

Connect your database, choose the tables Claude may read, and give it the same brief. Claude is connected in about two minutes.

30 minutes with the founder. Or WhatsApp / [email protected]