cubes:
  - name: test_cube
    sql: "SELECT * FROM test_data"
    dimensions:
      - name: created_at
        sql: created_at
        type: time
    measures:
      - name: val
        type: sum
        sql: val
        rolling_window:
          trailing: unbounded
      - name: val_leading
        type: sum
        sql: val
        rolling_window:
          leading: unbounded
      - name: val_both
        type: sum
        sql: val
        rolling_window:
          trailing: unbounded
          leading: unbounded
      - name: val_bounded
        type: sum
        sql: val
        rolling_window:
          trailing: 3 day
          leading: 1 day
      - name: val_trailing_bounded
        type: sum
        sql: val
        rolling_window:
          trailing: 7 day
      - name: val_to_date
        type: sum
        sql: val
        rolling_window:
          type: to_date
          granularity: month
