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

Support time spine configs for sub-daily granularity #10474

Closed
wants to merge 9 commits into from

Conversation

courtneyholcomb
Copy link
Contributor

@courtneyholcomb courtneyholcomb commented Jul 22, 2024

resolves #10475

Description

Support configuration of multiple semantic layer time spines at different granularities. This will enable support for sub-daily granularity while maintaining query efficiency, since we can default to the most compatible time spine for a given query. YAML configs have been designed to look like this:

time_spines:
  - name: daily_time_spine
    model: ref('daily_time_spine') # a model in your dbt project
    primary_column:
        name: ds_day
        time_granularity: day  # takes second, minute, hour, day, week, month, quarter, year
  - name: hourly_time_spine
    model: ref('hourly_time_spine')
    primary_column:
        name: ds_hour
        time_granularity: hour

Associated schema update here: dbt-labs/schemas.getdbt.com#46

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

@cla-bot cla-bot bot added the cla:yes label Jul 22, 2024
@courtneyholcomb courtneyholcomb changed the title WIP Support time spine configs for sub-daily granularity Jul 23, 2024
@courtneyholcomb courtneyholcomb added user docs [docs.getdbt.com] Needs better documentation semantic Issues related to the semantic layer artifact_minor_upgrade To bypass the CI check by confirming that the change is not breaking labels Jul 23, 2024
@dbt-labs dbt-labs deleted a comment from github-actions bot Jul 23, 2024
@dbt-labs dbt-labs deleted a comment from codecov bot Jul 23, 2024
Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 84.89583% with 29 lines in your changes missing coverage. Please review.

Project coverage is 86.13%. Comparing base (33161a3) to head (e9e5622).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10474      +/-   ##
==========================================
- Coverage   88.82%   86.13%   -2.69%     
==========================================
  Files         180      181       +1     
  Lines       22584    22753     +169     
==========================================
- Hits        20060    19599     -461     
- Misses       2524     3154     +630     
Flag Coverage Δ
integration 86.13% <84.89%> (+0.01%) ⬆️
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 86.13% <84.89%> (-2.69%) ⬇️
Integration Tests 86.13% <84.89%> (+0.01%) ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
artifact_minor_upgrade To bypass the CI check by confirming that the change is not breaking cla:yes semantic Issues related to the semantic layer user docs [docs.getdbt.com] Needs better documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Support for sub-daily granularity in semantic layer configs
1 participant