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

← cluster opportunity objects portfolio_extreme_sector_breaches_mv
Overview Objects Graph History
materialized view · opportunity.portfolio_extreme_sector_breaches_mv Explain plan ▶
Parallelism
2
Actors
23 / 23
running
Distribution
HASH
Rows
0
State size
Created
2026-08-19 23:11
Initialized
2026-08-19 23:10
Fragment flags
LOCALITY_PROVIDERMVIEWNOWSNAPSHOT_BACKFILL_STREAM_SCANSTREAM_SCAN
Actors
ActorFragmentWorkerState
740789 62005 51 running
740790 62005 51 running
740819 61995 51 running
740820 61995 51 running
740821 61994 51 running
740822 61994 51 running
740823 61996 51 running
740824 61996 51 running
740827 61998 51 running
740828 61998 51 running
740829 61997 51 running
740830 61997 51 running
+ 11 more actor(s) (23 running)
sql · opportunity.portfolio_extreme_sector_breaches_mv — click to expand
CREATE MATERIALIZED VIEW opportunity.portfolio_extreme_sector_breaches_mv AS
WITH sector_metrics AS (
  SELECT
    account_group_id,
    dim_balance_date,
    taxonomy_node_id,
    weight AS sector_weight,
    'GET_PORTFOLIO_EXTREME_SINGLE_SECTOR_PERCENTAGE' AS activity_name
  FROM insights.position_by_distribution_mv AS position_by_distribution_mv_next
  WHERE
    distribution_type = 'sectors'
    AND source_entity_type = 'portfolio'
    AND position_type = 'ASSET'
    AND weight > 0
    AND weight <= 1
    AND CAST(dim_balance_date AS TIMESTAMPTZ) >= CURRENT_TIMESTAMP - INTERVAL '30 DAYS'
)
SELECT
  c.opportunity_id,
  pag.portfolio_id AS resource_id,
  m.dim_balance_date AS fact_date,
  m.taxonomy_node_id,
  m.sector_weight * 100 AS sector_percentage_value,
  m.sector_weight
FROM sector_metrics AS m
JOIN insights.portfolio_to_account_groups_mv AS pag
  ON pag.account_group_id = m.account_group_id AND pag.type = 'all'
JOIN opportunity.opportunity_conditions_mv AS c
  ON c.activity_name = m.activity_name
WHERE
  CASE c.op
    WHEN 'GTE'
    THEN m.sector_weight >= c.threshold
    WHEN 'GT'
    THEN m.sector_weight > c.threshold
    WHEN 'LTE'
    THEN m.sector_weight <= c.threshold
    WHEN 'LT'
    THEN m.sector_weight < c.threshold
    WHEN 'EQ'
    THEN m.sector_weight = c.threshold
    ELSE FALSE
  END
Lineage · opportunity.portfolio_extreme_sector_breaches_mv 6 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.