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] Allow specifying saved query group by items with dundered syntax vs the object syntax #260

Open
3 tasks done
Jstein77 opened this issue Jan 31, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Jstein77
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 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

@Jstein77 Jstein77 added the enhancement New feature or request label Jan 31, 2024
@plypaul
Copy link
Contributor

plypaul commented Jan 31, 2024

I vaguely recall that we specifically did not want to have the dundered syntax in the configs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants