cubes:
  - name: conditional_masking_test
    sql_table: public.line_items

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

      - name: product_id
        sql: product_id
        type: number

      - name: price
        sql: price
        type: number
        mask: -1

    measures:
      - name: count
        type: count

      - name: total_price
        sql: price
        type: sum

    access_policy:
      - group: "*"
        member_level:
          includes: []
        member_masking:
          includes: "*"

      - group: "conditional_mask_group"
        member_level:
          includes: "*"
        row_level:
          filters:
            - member: product_id
              operator: lte
              values:
                - "3"

      - group: "conditional_mask_group_extra"
        member_level:
          includes: "*"
        row_level:
          filters:
            - member: product_id
              operator: equals
              values:
                - "5"
