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

"excludes" doesn't work in views when references cube has a prefix or an alias #7100

Closed
igorlukanin opened this issue Sep 4, 2023 · 1 comment
Assignees
Labels
bug Something isn't working data modeling:views

Comments

@igorlukanin
Copy link
Member

igorlukanin commented Sep 4, 2023

Describe the bug
In a view, excludes would not actually exclude members of a referenced cube if that cube is defined with prefix: true or some alias.

To Reproduce
Steps to reproduce the behavior:

  1. Use the following data model
cubes:
  - name: other_cube
    sql: SELECT 123 AS id

    dimensions:
      - name: id
        sql: id
        type: number
        primary_key: true

  - name: cube
    sql: >
      SELECT 1 AS id, 123 AS other_id UNION
      SELECT 2 AS id, 123 AS other_id

    joins:
      - name: other_cube
        relationship: one_to_one
        sql: "{CUBE.other_id} = {other_cube.id}"

    dimensions:
      - name: id
        sql: id
        type: number
        primary_key: true

      - name: other_id
        sql: other_id
        type: number

views:
  - name: view

    cubes:
      - join_path: cube
        includes: "*"

        excludes:
          - id

      - join_path: cube.other_cube
        prefix: true
        # alias: another
        includes: "*"

        excludes:
          - id
  1. Check the members of the view in Playground—there will be two of them.

Expected behavior
Out of 3 dimensions, only other_id should be included in the view.

Screenshots
Screenshot 2023-09-04 at 23 09 02

Version:
0.33.41

@marcNY
Copy link

marcNY commented Oct 28, 2023

Just adding that it also does not work if prefix=false at least for dimensions

@ovr ovr assigned ovr and unassigned paveltiunov Nov 27, 2023
@ovr ovr closed this as completed in f89ef8d Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data modeling:views
Projects
None yet
Development

No branches or pull requests

4 participants