-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from code-dot-org/fix/int_school_years_timestamps
change started_at ended_at to be timestamps
- Loading branch information
Showing
1 changed file
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |