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

← cluster insights objects user_account_membership_mv
Overview Objects Graph History
materialized view · insights.user_account_membership_mv Explain plan ▶
Parallelism
2
Actors
50 / 50
running
Distribution
HASH
Rows
747,466
State size
66.9 MiB
Created
2026-07-15 08:07
Initialized
2026-07-15 08:07
Fragment flags
MVIEWSNAPSHOT_BACKFILL_STREAM_SCANSTREAM_SCAN
Actors
ActorFragmentWorkerState
99322 13364 26 running
99323 13364 26 running
99324 13365 26 running
99325 13365 26 running
99328 13366 26 running
99329 13366 26 running
99337 13367 26 running
99338 13367 26 running
99346 13369 26 running
99347 13369 26 running
99348 13368 26 running
99349 13368 26 running
+ 38 more actor(s) (50 running)
sql · insights.user_account_membership_mv — click to expand
CREATE MATERIALIZED VIEW insights.user_account_membership_mv AS
WITH user_account_paths AS (
  SELECT
    up.user_id,
    oa.account_id,
    oa.is_restricted
  FROM insights.user_to_portfolios_mv AS up
  JOIN olap.account_to_portfolios_dm AS atp
    ON atp.portfolio_id = up.portfolio_id
  JOIN insights.open_accounts_mv AS oa
    ON oa.account_id = atp.account_id
  WHERE
    atp.disabled_at IS NULL
  UNION ALL
  SELECT
    uc.user_id,
    oa.account_id,
    oa.is_restricted
  FROM insights.user_to_clients_mv AS uc
  JOIN olap.accounts_to_clients_dm AS atc
    ON atc.client_id = uc.client_id
  JOIN insights.open_accounts_mv AS oa
    ON oa.account_id = atc.account_id
  WHERE
    atc.disabled_at IS NULL
  UNION ALL
  SELECT
    uc.user_id,
    oa.account_id,
    oa.is_restricted
  FROM insights.user_to_clients_mv AS uc
  JOIN olap.clients_portfolios_dm AS cp
    ON cp.client_id = uc.client_id
  JOIN olap.account_to_portfolios_dm AS atp
    ON atp.portfolio_id = cp.portfolio_id
  JOIN insights.open_accounts_mv AS oa
    ON oa.account_id = atp.account_id
  WHERE
    cp.disabled_at IS NULL AND atp.disabled_at IS NULL
), deduped AS (
  SELECT
    user_id,
    account_id,
    BOOL_OR(is_restricted) AS is_restricted
  FROM user_account_paths
  GROUP BY
    user_id,
    account_id
), active_user_accounts AS (
  SELECT
    d.user_id,
    d.account_id,
    d.is_restricted
  FROM deduped AS d
  JOIN olap.users_dm AS u
    ON u.user_id = d.user_id
  WHERE
    u.disabled_at IS NULL
)
SELECT
  user_id,
  account_id,
  CAST('all' AS VARCHAR) AS type
FROM active_user_accounts
Lineage · insights.user_account_membership_mv 11 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.