RWM Console cluster: risingwave-alinma.alinma-rw.svc.cluster.local

← cluster insights objects settled_cost_basis_carried_mv
Overview Objects Graph History
materialized view · insights.settled_cost_basis_carried_mv Explain plan ▶
Parallelism
2
Actors
18 / 18
running
Distribution
HASH
Rows
741,578
State size
118.8 MiB
Created
2026-08-13 17:16
Initialized
2026-08-13 17:15
Fragment flags
LOCALITY_PROVIDERMVIEWSNAPSHOT_BACKFILL_STREAM_SCANSTREAM_SCAN
Actors
ActorFragmentWorkerState
736716 51796 51 running
736717 51796 51 running
736718 51797 51 running
736719 51797 51 running
736720 51798 51 running
736721 51798 51 running
736722 51799 51 running
736723 51799 51 running
736724 51800 51 running
736725 51800 51 running
736726 51804 51 running
736727 51804 51 running
+ 6 more actor(s) (18 running)
sql · insights.settled_cost_basis_carried_mv — click to expand
CREATE MATERIALIZED VIEW insights.settled_cost_basis_carried_mv AS
WITH real_groups AS (
  SELECT
    account_id,
    asset_id,
    type,
    currency_code,
    dim_value_date,
    average_cost_per_unit,
    average_cost_per_unit_system_currency,
    total_cost_system_currency,
    cost_fx_provenance,
    purchased_quantity,
    m_is_stub,
    SUM(CASE WHEN NOT m_is_stub IS TRUE THEN 1 ELSE 0 END) OVER (
      PARTITION BY account_id, asset_id, currency_code
      ORDER BY dim_value_date
      ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
    ) AS real_group
  FROM insights.settled_cost_basis_dedup_mv
)
SELECT
  account_id,
  asset_id,
  type,
  currency_code,
  dim_value_date,
  average_cost_per_unit,
  CASE
    WHEN m_is_stub IS TRUE
    THEN MAX(
      CASE
        WHEN NOT m_is_stub IS TRUE
        THEN average_cost_per_unit_system_currency
        ELSE NULL
      END
    ) OVER (PARTITION BY account_id, asset_id, currency_code, real_group)
    ELSE average_cost_per_unit_system_currency
  END AS average_cost_per_unit_system_currency,
  CASE
    WHEN m_is_stub IS TRUE
    THEN MAX(CASE WHEN NOT m_is_stub IS TRUE THEN total_cost_system_currency ELSE NULL END) OVER (PARTITION BY account_id, asset_id, currency_code, real_group)
    ELSE total_cost_system_currency
  END AS total_cost_system_currency,
  CASE
    WHEN m_is_stub IS TRUE
    THEN MAX(CASE WHEN NOT m_is_stub IS TRUE THEN cost_fx_provenance ELSE NULL END) OVER (PARTITION BY account_id, asset_id, currency_code, real_group)
    ELSE cost_fx_provenance
  END AS cost_fx_provenance,
  purchased_quantity,
  m_is_stub
FROM real_groups
Lineage · insights.settled_cost_basis_carried_mv 3 objects
Direct (1-hop) dependencies from rw_depend, across schemas. Click a neighbor to expand its dependencies; ⌘/Ctrl-click opens its page. Drag to pan, scroll to zoom. External source/sink endpoints (Kafka, Iceberg) are not shown.