{
  "format": "dataset-manifest/1",
  "slug": "work-orders",
  "version": 2,
  "seed": "work-orders:1",
  "spec": {
    "format": "dataset/1",
    "slug": "work-orders",
    "name": "Work Orders",
    "tagline": "Work orders, products, machines, operators, and quality inspection results from a factory floor across three shifts.",
    "description": "Operators manage work orders on the factory floor, ensuring that products are manufactured to specification. Each work order details the specific products to be created, assigning various operations that machines must perform to accomplish their tasks. The manufacturing process unfolds through shifts, with operators overseeing the operations and coordinating the use of machines. Quality inspections are conducted to assess the products, recording pass and fail results that inform further adjustments or improvements in production. \n\nThe tables in this dataset provide a comprehensive view of the factory operations. The 'work_orders' table contains unique entries for each order, linking to the 'products' table, which lists the specific items being manufactured. Each work order aligns with specific operations detailed in the 'operations' table, which outlines the tasks required on machines categorized in the 'machines' table. Operators, listed in the 'operators' table, are tasked with managing these operations during their shifts. To ensure quality control, the 'quality_inspections' table records the outcomes of inspections, detailing whether products pass or fail based on pre-established criteria. \n\nThis dataset is ideal for exploring various analytical questions, such as examining efficiency metrics, understanding the impact of operator performance on product quality, and analyzing machine utilization rates over different shifts. You can practice SQL joins, aggregations, and other analytical techniques to reveal insights about production processes, operational bottlenecks, and quality control effectiveness. Note that the data is synthetic, crafted to simulate realistic manufacturing scenarios for your development and practice needs.",
    "domain": "manufacturing",
    "shape": "transactional",
    "useCases": [
      "orm-seeding",
      "bi-dashboards"
    ],
    "keywords": [
      "work orders",
      "manufacturing",
      "quality inspection",
      "operations",
      "machines",
      "shift work"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "work_orders": {
        "description": "Each row represents a unique work order for a product, linking to the operators, machines, and inspections involved.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the work order."
          },
          "product_id": {
            "kind": "fk",
            "ref": "products.id",
            "description": "The product associated with this work order."
          },
          "operator_id": {
            "kind": "fk",
            "ref": "operators.id",
            "nullable": true,
            "description": "The operator assigned to this work order."
          },
          "machine_id": {
            "kind": "fk",
            "ref": "machines.id",
            "description": "The machine used for this work order."
          },
          "status": {
            "kind": "enum",
            "values": [
              "pending",
              "in_progress",
              "completed"
            ],
            "description": "Current status of the work order.",
            "weights": [
              8,
              3,
              5
            ]
          },
          "created_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Timestamp when the work order was created.",
            "dayProfile": "business"
          }
        }
      },
      "products": {
        "description": "Contains information about products being manufactured, with each row representing a unique product.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the product."
          },
          "name": {
            "kind": "productName",
            "description": "Name of the product."
          },
          "description": {
            "kind": "sentence",
            "description": "Brief description of the product."
          }
        }
      },
      "machines": {
        "description": "Details of the machines used in the factory, with each row representing a unique machine.",
        "rows": 30,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the machine."
          },
          "name": {
            "kind": "productName",
            "description": "Name of the machine."
          },
          "status": {
            "kind": "enum",
            "values": [
              "operational",
              "maintenance",
              "decommissioned"
            ],
            "description": "Current operational status of the machine.",
            "weights": [
              10,
              4,
              1
            ]
          }
        }
      },
      "operators": {
        "description": "Information about operators working on the factory floor, with each row representing a unique operator.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the operator."
          },
          "first_name": {
            "kind": "firstName",
            "description": "First name of the operator."
          },
          "last_name": {
            "kind": "lastName",
            "description": "Last name of the operator."
          },
          "shift": {
            "kind": "enum",
            "values": [
              "morning",
              "afternoon",
              "night"
            ],
            "description": "Shift assigned to the operator."
          }
        }
      },
      "quality_inspections": {
        "description": "Records of quality inspections performed on products, linking them to work orders and results.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the quality inspection."
          },
          "work_order_id": {
            "kind": "fk",
            "ref": "work_orders.id",
            "description": "The work order associated with this inspection."
          },
          "result": {
            "kind": "enum",
            "values": [
              "pass",
              "fail"
            ],
            "description": "Result of the quality inspection.",
            "weights": [
              7,
              2
            ]
          },
          "inspected_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Timestamp of when the inspection was conducted.",
            "dayProfile": "business"
          }
        }
      },
      "operations": {
        "description": "Tracks operations performed on machines for each work order, with each row representing an operation.",
        "rows": 250,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the operation."
          },
          "work_order_id": {
            "kind": "fk",
            "ref": "work_orders.id",
            "description": "The work order associated with this operation."
          },
          "machine_id": {
            "kind": "fk",
            "ref": "machines.id",
            "description": "The machine used for this operation."
          },
          "duration": {
            "kind": "int",
            "min": 1,
            "max": 480,
            "description": "Duration of the operation in minutes.",
            "distribution": "normal"
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "timestamped",
      "categorical",
      "nullable"
    ],
    "analysisQuestions": [
      "What is the average duration of operations across different machines?",
      "How often do quality inspections result in failures?",
      "Which operators have the highest efficiency based on completed work orders?",
      "Are there specific products that consistently pass or fail inspections?",
      "What are the peak hours for work orders during each shift?"
    ],
    "suggestedQueries": [
      {
        "title": "List all work orders with product information",
        "sql": "SELECT wo.id, p.name as product_name FROM work_orders wo JOIN products p ON wo.product_id = p.id;",
        "dialect": "postgres"
      },
      {
        "title": "Count work orders by status",
        "sql": "SELECT status, COUNT(*) FROM work_orders GROUP BY status;",
        "dialect": "postgres"
      },
      {
        "title": "Average operation duration by machine",
        "sql": "SELECT m.name, AVG(o.duration) as avg_duration FROM operations o JOIN machines m ON o.machine_id = m.id GROUP BY m.name;",
        "dialect": "postgres"
      },
      {
        "title": "Quality inspection results per product",
        "sql": "SELECT p.name, qi.result, COUNT(*) FROM quality_inspections qi JOIN work_orders wo ON qi.work_order_id = wo.id JOIN products p ON wo.product_id = p.id GROUP BY p.name, qi.result;",
        "dialect": "postgres"
      },
      {
        "title": "Shift performance analysis",
        "sql": "SELECT o.shift, COUNT(wo.id) as total_work_orders FROM work_orders wo JOIN operators o ON wo.operator_id = o.id GROUP BY o.shift;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Manufacturing Analysts",
        "body": "Manufacturing analysts can leverage this dataset to create BI dashboards that visualize operational metrics, such as average operation durations and quality inspection outcomes. By analyzing trends over time, they can identify bottlenecks in production and ensure that manufacturing processes align with efficiency targets. This enables data-driven decision-making to enhance productivity and improve overall product quality."
      },
      {
        "title": "Quality Assurance Teams",
        "body": "Quality assurance teams can utilize this dataset to monitor and evaluate the success of various quality inspections conducted on products. By diving into inspection results and identifying patterns in failures, they can target specific products or shifts that consistently underperform. This insight allows them to implement corrective actions and improve the quality control process, ultimately ensuring that only high-quality products are shipped to customers."
      },
      {
        "title": "Operations Managers",
        "body": "Operations managers can use this dataset to oversee the performance of their factory floor by analyzing work orders and operations performed by machines and operators. By correlating machine performance with operator shifts and work orders, they can optimize workforce scheduling and machine utilization. This comprehensive view helps in maintaining smooth operations and minimizing downtime, leading to increased efficiency and reduced operational costs."
      },
      {
        "title": "Data Scientists",
        "body": "Data scientists can explore this dataset to build predictive models that forecast work order completion times based on historical data. By analyzing factors such as machine performance, operator efficiency, and inspection outcomes, they can develop algorithms that predict potential delays or quality issues. This proactive approach allows manufacturing companies to take preventive measures and enhance their production planning and resource allocation strategies."
      }
    ]
  },
  "counts": {
    "machines": 30,
    "operators": 100,
    "products": 50,
    "work_orders": 200,
    "operations": 250,
    "quality_inspections": 150
  },
  "stats": {
    "work_orders": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "product_id": {
          "nulls": 0,
          "distinct": 49,
          "min": 1,
          "max": 50
        },
        "operator_id": {
          "nulls": 26,
          "distinct": 81,
          "min": 1,
          "max": 99
        },
        "machine_id": {
          "nulls": 0,
          "distinct": 30,
          "min": 1,
          "max": 30
        },
        "status": {
          "nulls": 0,
          "distinct": 3,
          "min": "completed",
          "max": "pending"
        },
        "created_at": {
          "nulls": 0,
          "distinct": 200,
          "min": "2023-01-01 11:38:49",
          "max": "2023-12-31 05:33:45"
        }
      }
    },
    "products": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "name": {
          "nulls": 0,
          "distinct": 46,
          "min": "Classic Bottle",
          "max": "Vintage Watch"
        },
        "description": {
          "nulls": 0,
          "distinct": 50
        }
      }
    },
    "machines": {
      "rows": 30,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 30,
          "min": 1,
          "max": 30
        },
        "name": {
          "nulls": 0,
          "distinct": 29,
          "min": "Compact Tripod",
          "max": "Wireless Jacket"
        },
        "status": {
          "nulls": 0,
          "distinct": 3,
          "min": "decommissioned",
          "max": "operational"
        }
      }
    },
    "operators": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "first_name": {
          "nulls": 0,
          "distinct": 56,
          "min": "Alice",
          "max": "Zoe"
        },
        "last_name": {
          "nulls": 0,
          "distinct": 58,
          "min": "Adams",
          "max": "Zhang"
        },
        "shift": {
          "nulls": 0,
          "distinct": 3,
          "min": "afternoon",
          "max": "night"
        }
      }
    },
    "quality_inspections": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "work_order_id": {
          "nulls": 0,
          "distinct": 105,
          "min": 4,
          "max": 200
        },
        "result": {
          "nulls": 0,
          "distinct": 2,
          "min": "fail",
          "max": "pass"
        },
        "inspected_at": {
          "nulls": 0,
          "distinct": 150,
          "min": "2023-01-04 08:05:42",
          "max": "2023-12-25 13:11:19"
        }
      }
    },
    "operations": {
      "rows": 250,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 250,
          "min": 1,
          "max": 250
        },
        "work_order_id": {
          "nulls": 0,
          "distinct": 148,
          "min": 1,
          "max": 199
        },
        "machine_id": {
          "nulls": 0,
          "distinct": 30,
          "min": 1,
          "max": 30
        },
        "duration": {
          "nulls": 0,
          "distinct": 160,
          "min": 82,
          "max": 398
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/machines.csv",
      "format": "csv",
      "table": "machines",
      "key": "datasets/work-orders/v2/csv/machines.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/work-orders/v2/csv/machines.csv",
      "bytes": 955,
      "sha256": "df75cc6a419dd73564c737a6f8d09ed856f467ae806f95666694268ceb109252",
      "rows": 30,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/operators.csv",
      "format": "csv",
      "table": "operators",
      "key": "datasets/work-orders/v2/csv/operators.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/work-orders/v2/csv/operators.csv",
      "bytes": 2478,
      "sha256": "5495ee2c14f8436901140c42e8599940d26e9f0dd8f2962c2c08eb241a71ac07",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/products.csv",
      "format": "csv",
      "table": "products",
      "key": "datasets/work-orders/v2/csv/products.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/work-orders/v2/csv/products.csv",
      "bytes": 3734,
      "sha256": "a504f61b4753f752d93f347ae93d22010354b3914094b18bfe7d418e37f8ab99",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/work_orders.csv",
      "format": "csv",
      "table": "work_orders",
      "key": "datasets/work-orders/v2/csv/work_orders.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/work-orders/v2/csv/work_orders.csv",
      "bytes": 8457,
      "sha256": "7f148487e8e2f866fbb312f9d84a6fbc247779751ea405aa28e97954a0a43cbe",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/operations.csv",
      "format": "csv",
      "table": "operations",
      "key": "datasets/work-orders/v2/csv/operations.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/work-orders/v2/csv/operations.csv",
      "bytes": 3706,
      "sha256": "daa19c454ba4b247fb904d6daf8ba3f2f253906035dd9efce574a104469bd91c",
      "rows": 250,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/quality_inspections.csv",
      "format": "csv",
      "table": "quality_inspections",
      "key": "datasets/work-orders/v2/csv/quality_inspections.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/work-orders/v2/csv/quality_inspections.csv",
      "bytes": 4948,
      "sha256": "e0e09ae1c200fb953d0f1e0760774f4cebe92a5ca56b18f2dc36949675015e16",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "work-orders.json",
      "format": "json",
      "table": null,
      "key": "datasets/work-orders/v2/work-orders.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/work-orders/v2/work-orders.json",
      "bytes": 99860,
      "sha256": "c2e5cccf997a711d9979a9e1e990a69293bd314782ab268464abb5bd53173c2f",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/work-orders/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/work-orders/v2/sql/postgres.sql",
      "bytes": 37236,
      "sha256": "91f7ba196a9aee1bc9f65025ca90cd3201a6b16486c726ae6aa6ef57fa11b76b",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/work-orders/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/work-orders/v2/sql/mysql.sql",
      "bytes": 36533,
      "sha256": "b1e7220bdc56f0d74e84d33d0a15df10aae11b650af22350642e3dc88e3f9f8a",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/work-orders/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/work-orders/v2/sql/mssql.sql",
      "bytes": 38112,
      "sha256": "ab47372fef5ceda1c8dd26c2bd3f7b0233f1cece8b656380b3ede04ec35f23fd",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/work-orders/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/work-orders/v2/sql/sqlite.sql",
      "bytes": 36222,
      "sha256": "93900a36ebfd9f7ea76d4d8607fa66fca3dbfa0f4c212b69793176dfb109cc10",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/work-orders/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/work-orders/v2/prisma/seed.ts",
      "bytes": 80271,
      "sha256": "ea9360ca1882eb98e02a737ede49c4bb65c38d8258e98d0fb0c1f14c9276f617",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/work-orders/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/work-orders/v2/django/fixtures.json",
      "bytes": 133143,
      "sha256": "5bcd469a27c46e7a4375f9bf9dd032494dc050245ffcc96a2f027982906a5c1f",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788734082768,
  "updatedAt": 1788787044871
}
