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

[Feature] Add 'data_type' key to measures and metrics #1527

Open
3 tasks done
siljamardla opened this issue Nov 13, 2024 · 0 comments
Open
3 tasks done

[Feature] Add 'data_type' key to measures and metrics #1527

siljamardla opened this issue Nov 13, 2024 · 0 comments
Labels
enhancement New feature or request triage Tasks that need to be triaged

Comments

@siljamardla
Copy link

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing metricflow functionality, rather than a Big Idea better suited to a discussion

Describe the feature

This is an extension to #1287

For downstream usage of measures and metrics to really reduce the workload on the users, it would be great to specify the data type by the owner of the measure or metric.

    measures:
      - name: some_monetary_measure
        expr: some_monetary_column
        agg: sum
        data_type: [Optional, would default to no type conversion] decimal(20,2)

and

metrics:
  - name: some_monetary_metric
    type: simple
    type_params:
      measure: some_monetary_measure
    data_type: [Optional, would pick up on the measure data type if not specified] decimal(20,2)

Describe alternatives you've considered

Sometimes the underlying table does not have the appropriate data type, in this case every downstream user of the metric needs to do the type conversion.

Who will this benefit?

No response

Are you interested in contributing this feature?

Happy to test

Anything else?

No response

@siljamardla siljamardla added enhancement New feature or request triage Tasks that need to be triaged labels Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage Tasks that need to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant