Skip to content

Commit

Permalink
Merge pull request #53 from code-dot-org/fix/int_school_years_timestamps
Browse files Browse the repository at this point in the history
change started_at ended_at to be timestamps
  • Loading branch information
jordan-springer authored Jan 19, 2024
2 parents 3984102 + b2e81f9 commit 7a3d15e
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions dbt/models/intermediate/int_school_years.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
{#
Casting data types to match analysis.school_years

REFERENCE:
> DESCRIBE analysis.school_years
COLUMN_NAME DATA_TYPE
school_year varchar(256)
school_year_int integer
started_at timestamp
ended_at timestamp
school_year_long varchar(256)


#}

with
school_years as (
select *
select
school_year::varchar,
school_year_int::integer,
started_at::timestamp,
ended_at::timestamp,
school_year_long::varchar
from {{ ref('seed_school_years') }}
)

select *
select
*
from school_years
where current_date >= started_at

0 comments on commit 7a3d15e

Please sign in to comment.