{
  "schemaVersion": 1,
  "fixture": {
    "name": "Pagila Rental Facts",
    "file": "pagila-rental-facts.csv",
    "mediaType": "text/csv",
    "bytes": 11138814,
    "sha256": "0e7a033d85e4e5657e2fefd5e81f68c7c067de92a43e3dae4b96ad75aef4a2ee",
    "rowCount": 51805,
    "columnCount": 21,
    "columns": [
      "rental_id",
      "rental_date",
      "return_date",
      "rental_hours",
      "payment_amount",
      "payment_date",
      "customer_id",
      "customer_name",
      "customer_city",
      "customer_country",
      "store_id",
      "store_city",
      "store_country",
      "film_id",
      "film_title",
      "film_category",
      "film_rating",
      "release_year",
      "film_length_minutes",
      "rental_rate",
      "replacement_cost"
    ],
    "referenceFacts": {
      "paymentRowCount": 51061,
      "firstRentalDate": "2022-02-14 15:16:03+00",
      "lastRentalDate": "2026-07-28 22:25:29.109854+00",
      "uniqueFilms": 958,
      "uniqueCustomers": 997,
      "categoryCount": 16,
      "storeCount": 2,
      "openRentals": 241,
      "totalRevenue": "170962.39",
      "topRevenueCategory": {
        "name": "Documentary",
        "revenue": "12860.97"
      },
      "rentalsByStore": {
        "1": 25761,
        "2": 26044
      }
    }
  },
  "upstream": {
    "repository": "https://github.com/devrimgunduz/pagila",
    "tag": "pagila-v4.0.0",
    "commit": "481abd8fd518fec9abeba14db9ed1a2895c9bd33",
    "files": [
      {
        "path": "pagila-data.sql",
        "bytes": 12988763,
        "sha256": "c8bb1978d9bdc7d0e79821b7380908a6812b704340555e7ce859770dc5bcbe40"
      },
      {
        "path": "pagila-schema.sql",
        "bytes": 88240,
        "sha256": "1450e2e74569680ab689b9244a47541820210802c1ad5817be31a03aa5e8a8a5"
      },
      {
        "path": "LICENSE.txt",
        "bytes": 1100,
        "sha256": "516e7dac679ac1eeb62d5614b01c4e7318154e9a147377d6264954215997ff38"
      }
    ]
  },
  "license": {
    "name": "MIT License",
    "file": "LICENSE.txt",
    "sha256": "516e7dac679ac1eeb62d5614b01c4e7318154e9a147377d6264954215997ff38",
    "attribution": "Pagila © Devrim Gündüz. Pagila originated as a PostgreSQL port of the Sakila sample database, initially developed by Mike Hillyer."
  },
  "derivation": {
    "id": "pagila-rental-facts-v1",
    "generator": "ROKKS Pagila fixture builder v1",
    "grain": "One output row per Pagila rental row.",
    "inputTables": [
      "country",
      "city",
      "address",
      "store",
      "customer",
      "category",
      "film",
      "film_category",
      "inventory",
      "rental",
      "payment_p2022_01 through payment_p2026_07"
    ],
    "joins": "Rental rows are enriched through inventory, film/category, customer/address/city/country, and store/address/city/country.",
    "payments": "Payment amount is summed by rental_id; payment_date is the earliest matching payment date; rentals without a payment use 0.00 and an empty payment_date.",
    "rentalHours": "For returned rentals, rental_hours is (return_date - rental_date) / 3,600,000 rounded to two decimal places; open rentals are empty.",
    "ordering": "Numeric rental_id ascending.",
    "serialization": "RFC 4180-compatible CSV, UTF-8, comma delimiter, LF line endings, final newline.",
    "confidentiality": "Derived exclusively from the public Pagila release; no ROKKS vault or customer data is used."
  }
}
