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] Semantic model dimensions should have type: categorical as default #1464

Open
3 tasks done
siljamardla opened this issue Oct 17, 2024 · 0 comments
Open
3 tasks done
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

In semantic models for dimension tables we can have a long list of dimensions.
Most of these are going to be type: categorical. At the moment we need to explicitly specify the type for every single dimension, which is rather tedious (imagine a table with 20+ attributes).

Example:

semantic_models:
  - name: dim_customer
    model: ref('dim_customer')
    defaults:
      agg_time_dimension: customer_created_date
    dimensions:
      - name: customer_created_date
        type: time
        type_params:
          time_granularity: day
      - name: customer_name
        type: categorical
      - name: customer_type
        type: categorical

Describe alternatives you've considered

Make type: categorical the default and allow omitting this config.

Example:

semantic_models:
  - name: dim_customer
    model: ref('dim_customer')
    defaults:
      agg_time_dimension: customer_created_date
    dimensions:
      - name: customer_created_date
        type: time
        type_params:
          time_granularity: day
      - name: customer_name       # defaults to categorical
      - name: customer_type         # defaults to categorical

Who will this benefit?

Anyone using MetricFlow

Are you interested in contributing this feature?

Happy to help with requirements and testing

Anything else?

No response

@siljamardla siljamardla added enhancement New feature or request triage Tasks that need to be triaged labels Oct 17, 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