Document current outlook schema behavior
This commit is contained in:
@@ -19,11 +19,16 @@ Inputs are canonical feed events. The mapper currently handles these schemas:
|
||||
- `weather.forecast_discussion.v1`
|
||||
- `weather.weather_story.v1`
|
||||
- `weather.alert.v1`
|
||||
- `weather.outlook.v1`
|
||||
- `weather.outlook.v2`
|
||||
|
||||
Outputs are feedkit `PostgresWrite` values for weatherfeeder-owned tables.
|
||||
Unsupported schemas produce no writes and no error.
|
||||
|
||||
Outlook runs are written to `outlook_runs`, retained local polygons are written
|
||||
to `outlooks`, and run-level day discussions are written to
|
||||
`outlook_discussions`. The parent run row stores `outlook_count` and
|
||||
`discussion_count`.
|
||||
|
||||
## Boundaries
|
||||
|
||||
- Weatherfeeder owns table definitions in `schema.go`.
|
||||
@@ -82,6 +87,7 @@ Child rows use positional indexes to preserve canonical array order:
|
||||
- `alert_index`
|
||||
- `reference_index`
|
||||
- `outlook_index`
|
||||
- `discussion_index`
|
||||
|
||||
Required canonical fields are validated before writes are returned:
|
||||
|
||||
@@ -94,7 +100,10 @@ Required canonical fields are validated before writes are returned:
|
||||
- alert runs require `asOf`, and each alert requires `id`;
|
||||
- outlook runs require `asOf`, and each outlook requires `id`, `provider`,
|
||||
`product`, `day`, `outlookType`, `label`, `validFrom`, `validTo`, `issuedAt`,
|
||||
`expiresAt`, and `geometry`.
|
||||
`expiresAt`, `containsLocation: true`, and `geometry`;
|
||||
- outlook discussions require day `1`, `2`, or `3`; at least one of
|
||||
`headline`, `summary`, or `discussion`; and no duplicate discussion day in the
|
||||
same run.
|
||||
|
||||
Nullable canonical values are converted to SQL nulls by mapper helpers.
|
||||
Observation present-weather raw values and outlook geometry values are stored as
|
||||
|
||||
Reference in New Issue
Block a user