You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traffic Prophet reads from prj_volume.tp_daily_volumes to generate CountMatch predictions. The source table is prj_volume.centreline_volumes, which uses an arterycode to centreline geo_id mapping to map FLOW counts to the centreline. A recent refresh of this table uses a mapping with centreline segments not defined in gis.centreline, so we generated the following temporary matview:
CREATE MATERIALIZED VIEW prj_volume.tp_daily_volumes_clean
TABLESPACE pg_default
AS
WITH distinct_centrelines AS (
SELECT DISTINCTtp_daily_volumes_1.centreline_idFROMprj_volume.tp_daily_volumes tp_daily_volumes_1
), available_centrelines AS (
SELECTdistinct_centrelines.centreline_idFROM distinct_centrelines
JOINgis.centrelineONdistinct_centrelines.centreline_id::numeric=centreline.geo_id
)
SELECTavailable_centrelines.centreline_id,
tp_daily_volumes.direction,
tp_daily_volumes.count_year,
tp_daily_volumes.count_date,
tp_daily_volumes.daily_countFROM available_centrelines
JOINprj_volume.tp_daily_volumes USING (centreline_id)
ORDER BYavailable_centrelines.centreline_id, tp_daily_volumes.direction, tp_daily_volumes.count_year, tp_daily_volumes.count_date
WITH DATA;
ALTERTABLEprj_volume.tp_daily_volumes_clean
OWNER TO prj_volume_admins;
COMMENT ON MATERIALIZED VIEW prj_volume.tp_daily_volumes_clean
IS 'Version of tp_daily_volumes_clean without centreline IDs that do not exist in gis.centreline.';
to read data into Traffic Prophet. Annoyingly I didn't manage to document this entire process during my offboarding.
If the problem can be corrected quickly, this issue is to remove tp_daily_volumes_clean and ensure all documentation in docs uses tp_daily_volumes rather than _clean. If the problem cannot be corrected quickly, this issue is to add the script above to input_data/flow.
The text was updated successfully, but these errors were encountered:
Traffic Prophet reads from
prj_volume.tp_daily_volumes
to generate CountMatch predictions. The source table isprj_volume.centreline_volumes
, which uses anarterycode
to centrelinegeo_id
mapping to map FLOW counts to the centreline. A recent refresh of this table uses a mapping with centreline segments not defined ingis.centreline
, so we generated the following temporary matview:to read data into Traffic Prophet. Annoyingly I didn't manage to document this entire process during my offboarding.
If the problem can be corrected quickly, this issue is to remove
tp_daily_volumes_clean
and ensure all documentation indocs
usestp_daily_volumes
rather than_clean
. If the problem cannot be corrected quickly, this issue is to add the script above toinput_data/flow
.The text was updated successfully, but these errors were encountered: