{
  "format": "dataset-manifest/1",
  "slug": "device-alerts",
  "version": 2,
  "seed": "device-alerts:1",
  "spec": {
    "format": "dataset/1",
    "slug": "device-alerts",
    "name": "Device Alerts",
    "tagline": "Device alerts, events with severities, acknowledgements and resolution times from IoT devices.",
    "description": "Devices generate alerts based on predefined thresholds, notifying operators of events that require attention. Each alert is associated with a specific device and may carry varying levels of severity, indicating the urgency of the situation. Operators monitor these alerts in real-time, and upon reviewing them, they can acknowledge the alerts to confirm that they are being addressed. This acknowledgment can help track response times and ensure timely resolution of issues at hand.\n\nThe three tables—alerts, acknowledgements, and devices—interrelate to provide a comprehensive view of device behavior and operator response. The alerts table contains rows that represent individual alerts triggered by devices, detailing their severity and timestamps. Each alert is linked to a device in the devices table, which holds information about each device’s unique identifier and characteristics. The acknowledgements table records the operators’ responses to these alerts, capturing who acknowledged the alert and when it was done. By connecting these tables through the device ID and alert ID, users can track the lifecycle of an alert from its origin to resolution.\n\nThis dataset is ideal for practicing data analysis on operational efficiency, alert management, and response times. Developers can explore questions such as: How quickly are alerts acknowledged? What types of devices generate the most alerts? Are certain devices more prone to severe alerts? Analyzing these interactions can provide insights into device performance and operational workflows. It is important to note that the data in this dataset is synthetic, designed to simulate real-world scenarios for educational purposes and practice.",
    "domain": "iot",
    "shape": "event-log",
    "useCases": [
      "api-mocking",
      "test-fixtures"
    ],
    "keywords": [
      "IoT",
      "alerts",
      "device management",
      "event logging",
      "operator response"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "alerts": {
        "description": "This table records alerts generated by devices, including details such as severity and timestamps.",
        "rows": 100,
        "columns": {
          "alert_id": {
            "kind": "pk",
            "description": "Unique identifier for each alert."
          },
          "device_id": {
            "kind": "uuid",
            "description": "Identifier for the device that generated the alert."
          },
          "alert_time": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Timestamp when the alert was generated.",
            "dayProfile": "waking"
          },
          "severity": {
            "kind": "enum",
            "values": [
              "low",
              "medium",
              "high"
            ],
            "weights": [
              0.5,
              0.3,
              0.2
            ],
            "description": "Severity level of the alert."
          },
          "threshold": {
            "kind": "decimal",
            "min": 0,
            "max": 100,
            "scale": 2,
            "description": "Threshold value that triggered the alert.",
            "distribution": "high"
          }
        }
      },
      "acknowledgements": {
        "description": "This table captures operator responses to alerts, including acknowledgment and resolution times.",
        "rows": {
          "per": "alerts",
          "via": "alert_id",
          "min": 1,
          "max": 3,
          "skew": "long-tail"
        },
        "columns": {
          "acknowledgement_id": {
            "kind": "pk",
            "description": "Unique identifier for each acknowledgement."
          },
          "alert_id": {
            "kind": "fk",
            "ref": "alerts.alert_id",
            "description": "Identifier for the related alert."
          },
          "operator_id": {
            "kind": "uuid",
            "description": "Identifier for the operator acknowledging the alert."
          },
          "acknowledgement_time": {
            "kind": "datetime",
            "after": "alert_id.alert_time",
            "withinSeconds": 3600,
            "description": "Timestamp when the alert was acknowledged."
          },
          "resolution_time": {
            "kind": "datetime",
            "after": "acknowledgement_time",
            "withinDays": 7,
            "description": "Timestamp when the alert was resolved."
          }
        }
      },
      "devices": {
        "description": "This table contains information about the devices generating alerts.",
        "rows": 50,
        "columns": {
          "device_id": {
            "kind": "pk",
            "description": "Unique identifier for each device."
          },
          "device_name": {
            "kind": "words",
            "min": 1,
            "max": 3,
            "description": "Name of the device.",
            "pool": [
              "thermostat",
              "sensor",
              "camera",
              "doorbell",
              "light",
              "smoke",
              "detector",
              "switch",
              "outlet",
              "monitor",
              "hub",
              "controller",
              "lock",
              "thermometer",
              "humidifier",
              "fan",
              "blinds",
              "water-heater",
              "speaker",
              "robot-vacuum",
              "alarm"
            ]
          },
          "device_type": {
            "kind": "enum",
            "values": [
              "sensor",
              "actuator",
              "controller"
            ],
            "description": "Type of the IoT device."
          },
          "location": {
            "kind": "city",
            "description": "Geographical location of the device."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "timestamped",
      "high-cardinality",
      "nullable"
    ],
    "analysisQuestions": [
      "What is the average time taken by operators to acknowledge alerts?",
      "Which devices generate the most high-severity alerts?",
      "How do resolution times vary across different device types?",
      "Are there specific times of day when alerts are more frequent?",
      "What patterns can be observed in operator response times?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Alerts and Acknowledgements",
        "sql": "SELECT a.alert_id, a.alert_time, ack.acknowledgement_time FROM alerts a JOIN acknowledgements ack ON a.alert_id = ack.alert_id;",
        "dialect": "postgres"
      },
      {
        "title": "Count Alerts by Severity",
        "sql": "SELECT severity, COUNT(*) AS alert_count FROM alerts GROUP BY severity;",
        "dialect": "postgres"
      },
      {
        "title": "Average Resolution Time by Device Type",
        "sql": "SELECT d.device_type, AVG(EXTRACT(EPOCH FROM (ack.resolution_time - ack.acknowledgement_time))) AS avg_resolution_time FROM acknowledgements ack JOIN alerts a ON ack.alert_id = a.alert_id JOIN devices d ON a.device_id = d.device_id GROUP BY d.device_type;",
        "dialect": "postgres"
      },
      {
        "title": "Alerts Trend Over Time",
        "sql": "SELECT DATE_TRUNC('day', alert_time) AS day, COUNT(*) AS alert_count FROM alerts GROUP BY day ORDER BY day;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "IoT Device Monitoring",
        "body": "IoT engineers can use this dataset to monitor alerts from devices in real-time, analyzing the frequency and severity of alerts. By tracking these metrics, they can identify potential issues before they escalate, ensuring devices operate smoothly and effectively."
      },
      {
        "title": "Operational Performance Evaluation",
        "body": "Managers can leverage this dataset to evaluate the performance of operators in acknowledging and resolving alerts. By analyzing response times and the number of alerts handled, they can identify training needs or performance improvement areas."
      },
      {
        "title": "Predictive Maintenance Analysis",
        "body": "Data analysts can utilize this dataset to perform predictive maintenance analysis. By identifying patterns in alert generation and resolution, they can forecast potential device failures and recommend maintenance schedules to reduce downtime."
      }
    ]
  },
  "counts": {
    "alerts": 100,
    "acknowledgements": 148,
    "devices": 50
  },
  "stats": {
    "alerts": {
      "rows": 100,
      "columns": {
        "alert_id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "device_id": {
          "nulls": 0,
          "distinct": 100
        },
        "alert_time": {
          "nulls": 0,
          "distinct": 100,
          "min": "2023-01-02 23:50:29",
          "max": "2023-12-31 12:31:29"
        },
        "severity": {
          "nulls": 0,
          "distinct": 3,
          "min": "high",
          "max": "medium"
        },
        "threshold": {
          "nulls": 0,
          "distinct": 100,
          "min": 0.05,
          "max": 100
        }
      }
    },
    "acknowledgements": {
      "rows": 148,
      "columns": {
        "acknowledgement_id": {
          "nulls": 0,
          "distinct": 148,
          "min": 1,
          "max": 148
        },
        "alert_id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "operator_id": {
          "nulls": 0,
          "distinct": 148
        },
        "acknowledgement_time": {
          "nulls": 0,
          "distinct": 148,
          "min": "2023-01-03 00:46:00",
          "max": "2023-12-31 13:16:05"
        },
        "resolution_time": {
          "nulls": 0,
          "distinct": 148,
          "min": "2023-01-09 05:21:59",
          "max": "2024-01-02 17:36:20"
        }
      }
    },
    "devices": {
      "rows": 50,
      "columns": {
        "device_id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "device_name": {
          "nulls": 0,
          "distinct": 47
        },
        "device_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "actuator",
          "max": "sensor"
        },
        "location": {
          "nulls": 0,
          "distinct": 37,
          "min": "Amsterdam",
          "max": "Vienna"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/alerts.csv",
      "format": "csv",
      "table": "alerts",
      "key": "datasets/device-alerts/v2/csv/alerts.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/device-alerts/v2/csv/alerts.csv",
      "bytes": 7238,
      "sha256": "a3dc712d2426485635d709c82589a4b922c38d9719930e6ef124f22acb0b70a9",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/acknowledgements.csv",
      "format": "csv",
      "table": "acknowledgements",
      "key": "datasets/device-alerts/v2/csv/acknowledgements.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/device-alerts/v2/csv/acknowledgements.csv",
      "bytes": 12538,
      "sha256": "5c626094d6f8c898fed94e418887d9ef528588d7270e7506427ebc1631328c44",
      "rows": 148,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/devices.csv",
      "format": "csv",
      "table": "devices",
      "key": "datasets/device-alerts/v2/csv/devices.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/device-alerts/v2/csv/devices.csv",
      "bytes": 2037,
      "sha256": "9437e9cb9e5754e435b65d25c8ce20fff14b39a9552a8046c84639238f97b50a",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "device-alerts.json",
      "format": "json",
      "table": null,
      "key": "datasets/device-alerts/v2/device-alerts.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/device-alerts/v2/device-alerts.json",
      "bytes": 59609,
      "sha256": "1d03c8c6704e1cff36fc679c76f2bae83cdc5efe679fe1f85b10cb5d6df9908e",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/device-alerts/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/device-alerts/v2/sql/postgres.sql",
      "bytes": 28149,
      "sha256": "762cd8982aefad377ce4a9c03d13dee8af323f2bd21962077af53ebc42d74d9a",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/device-alerts/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/device-alerts/v2/sql/mysql.sql",
      "bytes": 27767,
      "sha256": "724329620a3b5af8a3196625325c1e149e3ed1afc993aa0463c9e153cd1d2ac4",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/device-alerts/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/device-alerts/v2/sql/mssql.sql",
      "bytes": 28877,
      "sha256": "4ce29ef67a31b64ddbb1fc2450a46bf7214bda5eaa6fb3f73305269b83bd7dfe",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/device-alerts/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/device-alerts/v2/sql/sqlite.sql",
      "bytes": 27651,
      "sha256": "f17c9cb611c10933366e4f0557cbdc52f51a4cf52a7dc387b476d7b19be020dd",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/device-alerts/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/device-alerts/v2/prisma/seed.ts",
      "bytes": 54650,
      "sha256": "dce22500da558c0186961b1e5f1f7c28410bb7c84537ae6c0ee69b5d4c19d4a8",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/device-alerts/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/device-alerts/v2/django/fixtures.json",
      "bytes": 70436,
      "sha256": "fb8b444e072518fa63683e7d494bd422a4f943e902e5d0ae7f8392ee259715e0",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767409311,
  "updatedAt": 1788778319730
}
