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

[CT-2698] use_approximate_percentile and use_discrete_percentile keys defualt to None but are defined as bool in the protocol #7866

Closed
2 tasks done
Tracked by #7498
Jstein77 opened this issue Jun 14, 2023 · 1 comment · Fixed by #7877
Assignees
Labels
bug Something isn't working semantic Issues related to the semantic layer

Comments

@Jstein77
Copy link

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

The default None for use_approximate_percentile and use_discrete_percentile causes an error. I need to define the bool value for these parameters in the measure. However, I should only assign true or false to these parameters if I need to use them, and they should default to false.

Current implementation:

- name: discrete_order_value_p99
        expr: order_total
        agg: percentile
        agg_params:
          percentile: 0.99
          use_discrete_percentile: True
          use_approximate_percentile: False
        create_metric: true

Expected implementation:

- name: discrete_order_value_p99
        expr: order_total
        agg: percentile
        agg_params:
          percentile: 0.99
          use_discrete_percentile: True
        create_metric: true

Expected Behavior

I should not need to define true or false explicitly for use_discrete_percentile and use_approximate_percentile. They should default to false.

Steps To Reproduce

Define a measure like below and run dbt run.

- name: discrete_order_value_p99
        expr: order_total
        agg: percentile
        agg_params:
          percentile: 0.99
          use_discrete_percentile: True
        create_metric: true

Relevant log output

No response

Environment

- OS:
- Python:
- dbt:

Which database adapter are you using with dbt?

No response

Additional Context

No response

@Jstein77 Jstein77 added bug Something isn't working triage labels Jun 14, 2023
@github-actions github-actions bot changed the title use_approximate_percentile and use_discrete_percentile keys defualt to None but are defined as bool in the protocol [CT-2698] use_approximate_percentile and use_discrete_percentile keys defualt to None but are defined as bool in the protocol Jun 14, 2023
@Jstein77
Copy link
Author

cc @QMalcolm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working semantic Issues related to the semantic layer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants