| Actor | Fragment | Worker | State |
|---|---|---|---|
| 744646 | 62813 | 51 | running |
| 744647 | 62813 | 51 | running |
| 744648 | 62814 | 51 | running |
| 744649 | 62814 | 51 | running |
| 744650 | 62815 | 51 | running |
| 744651 | 62815 | 51 | running |
| 744652 | 62816 | 51 | running |
| 744653 | 62816 | 51 | running |
| 744654 | 62817 | 51 | running |
| 744655 | 62817 | 51 | running |
| 744656 | 62818 | 51 | running |
| 744657 | 62818 | 51 | running |
CREATE MATERIALIZED VIEW alinma_bff.party_active_portfolio_involvements_mv
WITH (
backfill_order=FIXED(olap.portfolios_dm -> olap.party_involvements_dm)
) AS
SELECT
inv.party_id,
inv.customer_relationship_id,
inv.entity_id AS portfolio_id,
inv.involvement_type
FROM (
SELECT
party_id,
customer_relationship_id,
entity_id,
involvement_type
FROM olap.party_involvements_dm
WHERE
entity_type = 'PORTFOLIO'
AND involvement_type IN ('PORTFOLIO_HOLDER', 'JOINT_PORTFOLIO_HOLDER')
AND status = 'ACTIVE'
AND disabled_at IS NULL
AND effective_from <= CURRENT_TIMESTAMP
AND (
effective_to IS NULL OR effective_to > CURRENT_TIMESTAMP
)
) AS inv
JOIN alinma_bff.party_active_customer_relationships_mv AS acr
ON acr.party_id = inv.party_id
AND acr.customer_relationship_id = inv.customer_relationship_id
JOIN olap.portfolios_dm AS port
ON port.portfolio_id = inv.entity_id
AND port.disabled_at IS NULL
AND NOT port.m_is_stub IS TRUE
GROUP BY
inv.party_id,
inv.customer_relationship_id,
inv.entity_id,
inv.involvement_type