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
52
State size
9.6 KiB
Created
2026-08-19 08:29
Initialized
2026-08-19 08:29
Fragment flags
LOCALITY_PROVIDERMVIEWSNAPSHOT_BACKFILL_STREAM_SCANSTREAM_SCAN
Actors
ActorFragmentWorkerState
739174 60884 51 running
739175 60884 51 running
739176 60883 51 running
739177 60883 51 running
739178 60885 51 running
739179 60885 51 running
739186 60887 51 running
739187 60887 51 running
739188 60886 51 running
739189 60886 51 running
739190 60888 51 running
739191 60888 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.