Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change started_at ended_at to be timestamps #53

Merged
merged 3 commits into from
Jan 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
school_year::varchar,
school_year::varchar(7),

school_year_int::integer,
started_at::timestamp,
ended_at::timestamp,
school_year_long::varchar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
school_year_long::varchar
school_year_long::varchar(9)

from {{ ref('seed_school_years') }}
)

select *
select
*
from school_years
where current_date >= started_at