{
  "crossfield": 1,
  "id": "test/measurements/utc",
  "name": "measurements",
  "imports": [
    {
      "path": "source.ossie.json"
    }
  ],
  "metrics": {
    "rainfall": {
      "expression": "SUM(weather.amount)",
      "type": "DOUBLE"
    },
    "complete_rainfall": {
      "expression": "SUM(weather.amount)",
      "type": "DOUBLE"
    },
    "weighted_flux": {
      "expression": "AVG(weather.mean_value)",
      "type": "DOUBLE"
    },
    "alias_rainfall": {
      "expression": "SUM(weather.amount_alias)",
      "type": "DOUBLE"
    },
    "unsafe_mean": {
      "expression": "AVG(weather.mean_value)",
      "type": "DOUBLE"
    },
    "unsafe_probability": {
      "expression": "SUM(weather.probability)",
      "type": "DOUBLE"
    },
    "unsafe_derived": {
      "expression": "SUM(weather.doubled)",
      "type": "DOUBLE"
    },
    "unsafe_physical_copy": {
      "expression": "SUM(weather.physical_copy)",
      "type": "DOUBLE"
    },
    "unsafe_flux_sum": {
      "expression": "SUM(weather.mean_value)",
      "type": "DOUBLE"
    }
  },
  "policy": {
    "policy_version": 1,
    "timezone": "UTC",
    "key_evidence": "verified",
    "metrics": [
      "rainfall",
      "complete_rainfall",
      "weighted_flux",
      "alias_rainfall",
      "unsafe_mean",
      "unsafe_probability",
      "unsafe_derived",
      "unsafe_physical_copy",
      "unsafe_flux_sum"
    ],
    "dimensions": [
      "weather.location",
      "weather.time",
      "weather.report_day",
      "weather.report_alias"
    ],
    "filter_dimensions": [
      "weather.location",
      "weather.time",
      "weather.report_day",
      "weather.id"
    ],
    "detail_fields": [
      "weather.id",
      "weather.location",
      "weather.time",
      "weather.start_at",
      "weather.end_at",
      "weather.seconds",
      "weather.amount",
      "weather.mean_value",
      "weather.instant",
      "weather.event_at",
      "weather.unknown_value",
      "weather.probability",
      "weather.offset_seconds",
      "weather.amount_alias",
      "weather.doubled",
      "weather.physical_copy",
      "weather.report_day",
      "weather.report_alias"
    ],
    "field_semantics": {
      "weather.time": {
        "granularity": "second"
      },
      "weather.event_at": {
        "granularity": "second"
      },
      "weather.report_alias": {
        "granularity": "day",
        "calendar": "gregorian"
      },
      "weather.amount": {
        "unit": "mm"
      },
      "weather.mean_value": {
        "unit": "W/m2"
      }
    },
    "metric_semantics": {
      "rainfall": {
        "dataset": "weather",
        "additivity": "non_additive"
      },
      "complete_rainfall": {
        "dataset": "weather",
        "additivity": "non_additive"
      },
      "weighted_flux": {
        "dataset": "weather",
        "additivity": "non_additive"
      },
      "alias_rainfall": {
        "dataset": "weather",
        "additivity": "non_additive"
      },
      "unsafe_mean": {
        "dataset": "weather",
        "additivity": "non_additive"
      },
      "unsafe_probability": {
        "dataset": "weather",
        "additivity": "non_additive"
      },
      "unsafe_derived": {
        "dataset": "weather",
        "additivity": "non_additive"
      },
      "unsafe_physical_copy": {
        "dataset": "weather",
        "additivity": "non_additive"
      },
      "unsafe_flux_sum": {
        "dataset": "weather",
        "additivity": "non_additive"
      }
    },
    "measurements": {
      "version": 1,
      "fields": {
        "weather.amount": {
          "support": "interval",
          "statistic": "sum",
          "time_field": "weather.time",
          "start_field": "weather.start_at",
          "end_field": "weather.end_at",
          "duration_field": "weather.seconds",
          "anchor": "end",
          "time_basis": {
            "kind": "utc"
          },
          "series": [
            "weather.location"
          ]
        },
        "weather.mean_value": {
          "support": "interval",
          "statistic": "mean",
          "time_field": "weather.time",
          "start_field": "weather.start_at",
          "end_field": "weather.end_at",
          "duration_field": "weather.seconds",
          "anchor": "end",
          "time_basis": {
            "kind": "utc"
          },
          "series": [
            "weather.location"
          ]
        },
        "weather.probability": {
          "support": "interval",
          "statistic": "probability",
          "time_field": "weather.time",
          "start_field": "weather.start_at",
          "end_field": "weather.end_at",
          "duration_field": "weather.seconds",
          "anchor": "end",
          "time_basis": {
            "kind": "utc"
          },
          "series": [
            "weather.location"
          ]
        },
        "weather.instant": {
          "support": "instant",
          "statistic": "value",
          "time_field": "weather.time",
          "time_basis": {
            "kind": "utc"
          }
        },
        "weather.event_at": {
          "support": "event_time",
          "statistic": "value",
          "time_field": "weather.event_at",
          "time_basis": {
            "kind": "utc"
          }
        },
        "weather.unknown_value": {
          "support": "unknown",
          "statistic": "unknown",
          "time_field": "weather.time",
          "time_basis": {
            "kind": "utc"
          }
        }
      },
      "periods": {
        "weather.report_day": {
          "measurement": "weather.amount",
          "granularity": "day",
          "time_basis": {
            "kind": "utc"
          }
        }
      },
      "metrics": {
        "rainfall": {
          "field": "weather.amount",
          "period": "weather.report_day",
          "assignment": "whole_interval",
          "reduction": "sum",
          "coverage": "available"
        },
        "complete_rainfall": {
          "field": "weather.amount",
          "period": "weather.report_day",
          "assignment": "whole_interval",
          "reduction": "sum",
          "coverage": "require_complete"
        },
        "weighted_flux": {
          "field": "weather.mean_value",
          "period": "weather.report_day",
          "assignment": "whole_interval",
          "reduction": "duration_weighted_mean",
          "coverage": "available"
        },
        "alias_rainfall": {
          "field": "weather.amount_alias",
          "period": "weather.report_day",
          "assignment": "whole_interval",
          "reduction": "sum",
          "coverage": "available"
        }
      }
    }
  }
}
