Skip to content

Commit

Permalink
Merge pull request #480 from cagov/meta_data-duplicate_issue
Browse files Browse the repository at this point in the history
Meta data duplicate issue
  • Loading branch information
mmmiah authored Nov 17, 2024
2 parents 1aea685 + 315d94e commit bf76d3f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions transform/models/marts/geo/geo__current_stations.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
with station_config as (
select * from {{ ref('int_vds__station_config') }}
),

current_stations as (
select
* exclude (_valid_from, _valid_to),
st_makepoint(longitude, latitude) as geometry
from station_config
where _valid_to is null
),

current_stationsc as (
{{ get_county_name('current_stations') }}
)

select * from current_stationsc
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ bottleneck_delay_with_county as (
),

geo as (
select distinct
select
station_id,
latitude,
longitude,
concat(longitude, ',', latitude) as location
from {{ ref('geo__current_detectors') }}
from {{ ref('geo__current_stations') }}
),

bottleneck_delay_county_geo as (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ aadt_with_county as (
),

geo as (
select distinct
select
station_id,
latitude,
longitude,
concat(longitude, ',', latitude) as location,
absolute_postmile
from {{ ref('geo__current_detectors') }}
from {{ ref('geo__current_stations') }}
),

aadt_county_geo as (
Expand Down

0 comments on commit bf76d3f

Please sign in to comment.