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

Improved support for dbt_date and dbt_metrics #18

Closed
wants to merge 4 commits into from

Conversation

RobbertDM
Copy link
Contributor

@RobbertDM RobbertDM commented Feb 8, 2023

  • dbt_date needs to know how to convert a time zone. trino does that {{ column }} at time zone '{{ target_tz }}'
  • dbt_metrics uses some dateadd functionality that looks like this in trino: date_add('day', -5, calendar.date_day)

I did not run any tests except that I succeeded in generating some metrics and using some date functions.

To make this work, one should adapt their dbt_project.yml to include

dispatch:
  - macro_namespace: dbt_date
    search_order: ['trino_utils', 'dbt_date']
  - macro_namespace: metrics
    search_order: ['trino_utils', 'metrics']

We should also probably modify this repo's readme

@mdesmet
Copy link
Member

mdesmet commented Feb 8, 2023

We should probably split this in three different PR and try to add the tests from the respective repo's

@RobbertDM
Copy link
Contributor Author

split into #19 and #20

@RobbertDM RobbertDM closed this Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants