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

← cluster alinma_bff objects portfolio_owners_mv
Overview Objects Graph History
materialized view · alinma_bff.portfolio_owners_mv Explain plan ▶
Parallelism
2
Actors
24 / 24
running
Distribution
HASH
Rows
53
State size
13.2 KiB
Created
2026-08-20 17:12
Initialized
2026-08-20 17:12
Fragment flags
LOCALITY_PROVIDERMVIEWSNAPSHOT_BACKFILL_STREAM_SCANSTREAM_SCAN
Actors
ActorFragmentWorkerState
745237 63078 51 running
745238 63078 51 running
745239 63082 51 running
745240 63082 51 running
745314 63072 51 running
745315 63072 51 running
745316 63073 51 running
745317 63073 51 running
745326 63074 51 running
745327 63074 51 running
745328 63075 51 running
745329 63075 51 running
+ 12 more actor(s) (24 running)
sql · alinma_bff.portfolio_owners_mv — click to expand
CREATE MATERIALIZED VIEW alinma_bff.portfolio_owners_mv AS
WITH owner_rows AS (
  SELECT
    cp.portfolio_id,
    c.id AS owner_id,
    c.display_name,
    c.local_display_name,
    c.preferred_name,
    cp.owner_type
  FROM olap.clients_portfolios_dm AS cp
  JOIN olap.clients_dm AS c
    ON c.id = cp.client_id AND c.closing_date IS NULL
  WHERE
    cp.disabled_at IS NULL AND cp.effective_end_date IS NULL
  UNION ALL
  SELECT
    ptp.portfolio_id,
    p.id AS owner_id,
    p.display_name,
    CAST(NULL AS VARCHAR) AS local_display_name,
    CAST(NULL AS VARCHAR) AS preferred_name,
    CASE
      WHEN ptp.involvement_type = 'PORTFOLIO_HOLDER'
      THEN 'PRIMARY'
      ELSE 'SECONDARY'
    END AS owner_type
  FROM alinma_bff.party_active_portfolio_involvements_mv AS ptp
  JOIN party.parties AS p
    ON p.id = ptp.party_id AND p.disabled_at IS NULL
)
SELECT
  portfolio_id,
  JSONB_AGG(
    JSONB_BUILD_OBJECT(
      'id',
      owner_id,
      'displayName',
      display_name,
      'localDisplayName',
      local_display_name,
      'preferredName',
      preferred_name,
      'ownerType',
      owner_type
    ) ORDER BY owner_id
  ) AS owners,
  CAST(COUNT(*) AS INT) AS owner_count
FROM owner_rows
GROUP BY
  portfolio_id
Lineage · alinma_bff.portfolio_owners_mv 7 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.