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

← cluster opportunity objects portfolio_days_since_transaction_breaches_mv
Overview Objects Graph History
materialized view · opportunity.portfolio_days_since_transaction_breaches_mv Explain plan ▶
Parallelism
2
Actors
12 / 12
running
Distribution
HASH
Rows
46
State size
8.4 KiB
Created
2026-08-20 17:00
Initialized
2026-08-20 17:00
Fragment flags
LOCALITY_PROVIDERMVIEWSNAPSHOT_BACKFILL_STREAM_SCANSTREAM_SCAN
Actors
ActorFragmentWorkerState
743733 62588 51 running
743734 62588 51 running
743735 62587 51 running
743736 62587 51 running
743737 62589 51 running
743738 62589 51 running
743739 62591 51 running
743740 62591 51 running
743741 62590 51 running
743742 62590 51 running
743743 62592 51 running
743744 62592 51 running
sql · opportunity.portfolio_days_since_transaction_breaches_mv — click to expand
CREATE MATERIALIZED VIEW opportunity.portfolio_days_since_transaction_breaches_mv AS
WITH conditions AS (
  SELECT
    opportunity_id,
    activity_name,
    op,
    threshold,
    as_of_date
  FROM opportunity.opportunity_conditions_mv AS opportunity_conditions_mv_next
  WHERE
    activity_name = 'GET_PORTFOLIO_DAYS_SINCE_LAST_TRANSACTION'
    AND NOT as_of_date IS NULL
), matched AS (
  SELECT
    c.opportunity_id,
    p.portfolio_id,
    c.as_of_date,
    c.activity_name,
    p.last_transaction_date,
    c.op,
    c.threshold,
    (
      c.as_of_date - p.last_transaction_date
    ) AS days_since
  FROM opportunity.portfolio_last_transaction_mv AS p
  JOIN conditions AS c
    ON c.activity_name = p.activity_name
)
SELECT
  opportunity_id,
  portfolio_id AS resource_id,
  as_of_date AS fact_date,
  activity_name,
  last_transaction_date,
  days_since
FROM matched
WHERE
  CASE op
    WHEN 'GTE'
    THEN days_since >= threshold
    WHEN 'GT'
    THEN days_since > threshold
    WHEN 'LTE'
    THEN days_since <= threshold
    WHEN 'LT'
    THEN days_since < threshold
    WHEN 'EQ'
    THEN days_since = threshold
    ELSE FALSE
  END
Lineage · opportunity.portfolio_days_since_transaction_breaches_mv 5 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.