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

Add Tags to Semantic Layer Saved Queries #180

Merged

Conversation

theyostalservice
Copy link
Contributor

@theyostalservice theyostalservice commented Dec 19, 2024

Title says it all.

This is modeled off of this previous PR adding features to Semantic Layer objects.

Linked PRs:

Example of how this would look in an actual saved
query in a yml file:

saved_queries:
- name: with_list_tags_v2
    tags: ['tag_b', 'tag_d', 'tag_a']
    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_table
        config:
          export_as: table
      - name: new_customer_orders_view
        config:
          export_as: view
          alias: new_customer_orders_export_alias
          testing: "what"
          breaking: 'break it now'

If there's any testing I should do for this, please lmk. :-)

Title says it all.

Linked PRs:
* the starting point at [dbt-semantic-interfaces](https://github.com/dbt-labs/dbt-semantic-interfaces/pull/366/files)
* [dbt-core](dbt-labs/dbt-core#10987)
* [schemas.dbt.com](dbt-labs/schemas.getdbt.com#75)

Example of how this would look in an actual saved
query in a yml file:
```
saved_queries:
- name: with_list_tags_v2
    tags: ['tag_b', 'tag_d', 'tag_a']
    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_table
        config:
          export_as: table
      - name: new_customer_orders_view
        config:
          export_as: view
          alias: new_customer_orders_export_alias
          testing: "what"
          breaking: 'break it now'
```
@theyostalservice theyostalservice merged commit 59d6420 into main Dec 19, 2024
27 checks passed
@theyostalservice theyostalservice deleted the patrickyost/sl-2896-add-tags-to-saved-queries branch December 19, 2024 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants