Skip to content

[Feature] Allow specifying saved query group by items with dundered syntax vs the object syntax #260

@Jstein77

Description

@Jstein77

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 change to existing dbt-semantic-interfaces functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Currently you need to to use the object syntax to call dimensions in a saved query:

saved_queries:
  - name: new_customer_orders
    description: New customer orders by name and time
    query_params:
      metrics:
        - orders
      group_by:
        - Dimension('customer__customer_name')
        - TimeDimension('metric_time', 'day')
      where:
        - "{{ Dimension('customer__customer_type') }}  = 'new'"
    exports:
      - name: new_customer_orders
        config:
          export_as: table

You should be able to add call dimensions without needing jinja brackets. This is consistent with how you call dimensions in the CLI.

saved_queries:
  - name: new_customer_orders
    description: New customer orders by name and time
    query_params:
      metrics:
        - orders
      group_by:
        - customer__customer_name
        - metric_time__day
      where:
        - "{{ Dimension('customer__customer_type') }}  = 'new'"
    exports:
      - name: new_customer_orders
        config:
          export_as: table

Describe alternatives you've considered

No response

Who will this benefit?

No response

Are you interested in contributing this feature?

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions