| Actor | Fragment | Worker | State |
|---|---|---|---|
| 737173 | 52163 | 51 | running |
| 737174 | 52163 | 51 | running |
| 737326 | 52164 | 51 | running |
| 737327 | 52164 | 51 | running |
| 737328 | 52165 | 51 | running |
| 737329 | 52165 | 51 | running |
| 737330 | 52166 | 51 | running |
| 737331 | 52166 | 51 | running |
| 737332 | 52167 | 51 | running |
| 737333 | 52167 | 51 | running |
| 737334 | 52168 | 51 | running |
| 737335 | 52168 | 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