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

Fix get_base_dates for BQ #106

Merged
merged 1 commit into from
Aug 6, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
DBT_PROFILES_DIR: ./integration_tests/ci
DBT_PROJECT_DIR: ./integration_tests
BIGQUERY_SERVICE_KEY_PATH: "/home/circleci/bigquery-service-key.json"
DBT_VERSION: 1.4.1
DBT_VERSION: 1.6.0

steps:
- checkout
Expand Down
4 changes: 2 additions & 2 deletions macros/get_base_dates.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ from
{% macro bigquery__get_base_dates(start_date, end_date, n_dateparts, datepart) %}

{%- if start_date and end_date -%}
{%- set start_date="cast('" ~ start_date ~ "' as date )" -%}
{%- set end_date="cast('" ~ end_date ~ "' as date )" -%}
{%- set start_date="cast('" ~ start_date ~ "' as datetime )" -%}
{%- set end_date="cast('" ~ end_date ~ "' as datetime )" -%}

{%- elif n_dateparts and datepart -%}

Expand Down