views:
  - name: line_items_view_price_gt_200
    cubes:
      - join_path: line_items
        includes: "*"
    access_policy:
      - group: "*"
        row_level:
          filters:
            - member: "${CUBE}.price_dim"
              operator: gt
              values:
                - 200

  - name: line_items_view_joined_orders
    cubes:
      - join_path: line_items
        includes: "*"
      - join_path: line_items.orders
        prefix: true
        includes: "*"

  - name: line_items_view_no_policy
    cubes:
      - join_path: line_items
        includes: "*"

  - name: orders_view
    cubes:
      - join_path: orders
        includes: "*"
    access_policy:
      - group: admin
        member_level:
          includes: "*"
        row_level:
          allow_all: true

  # Two-layer row-level filtering: the underlying `orders` cube restricts rows
  # to id IN {1, 10, 11} (group "*" → id = 1, group admin → id = 10 OR id = 11),
  # while this view adds its own row filter id < 11. A row must satisfy BOTH
  # the cube policy AND the view policy, so the result is id IN {1, 10}.
  - name: orders_two_layer_test
    cubes:
      - join_path: orders
        includes: "*"
    access_policy:
      - group: "*"
        member_level:
          includes: "*"
        row_level:
          filters:
            - member: id
              operator: lt
              values:
                - "11"
