cubes:
  - name: order_shipment
    sql_table: inventory_v2.order_shipment
    data_source: default

    joins:
      - name: order
        sql: "{CUBE}.order_id = {order.id}"
        relationship: many_to_one

      - name: shipment
        sql: "{CUBE}.shipment_id = {shipment.id}"
        relationship: many_to_one

      - name: site_stock_points_stock_point
        sql: "{CUBE}.`stockPointId` = {site_stock_points_stock_point}.`stockPointId`"
        relationship: many_to_one

      - name: site_v2_stock_points_stock_point
        sql: "{CUBE}.`stockPointId` = {site_v2_stock_points_stock_point}.`stockPointId`"
        relationship: many_to_one

      - name: stock_point
        sql: "{CUBE}.`stockPointId` = {stock_point.id}"
        relationship: many_to_one

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

    measures:
      - name: count
        type: count

    pre_aggregations:
      # Pre-aggregation definitions go here.
      # Learn more in the documentation: https://cube.dev/docs/caching/pre-aggregations/getting-started

