| Actor | Fragment | Worker | State |
|---|---|---|---|
| 121979 | 25194 | 26 | running |
| 121980 | 25194 | 26 | running |
| 121981 | 25195 | 26 | running |
| 121982 | 25195 | 26 | running |
| 121983 | 25196 | 26 | running |
| 121984 | 25196 | 26 | running |
| 121985 | 25199 | 26 | running |
| 121986 | 25200 | 26 | running |
| 121987 | 25197 | 26 | running |
| 121988 | 25197 | 26 | running |
| 121989 | 25198 | 26 | running |
| 121990 | 25198 | 26 | running |
CREATE MATERIALIZED VIEW authz.active_parties_to_portfolios_mv
WITH (
backfill_order=FIXED(party.customer_relationships_next -> olap.party_involvements_dm)
) AS
SELECT
inv.party_id,
inv.entity_id AS portfolio_id
FROM (
SELECT
party_id,
customer_relationship_id,
entity_id
FROM olap.party_involvements_dm
WHERE
entity_type = 'PORTFOLIO'
AND involvement_type = '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 party.customer_relationships AS cr
ON cr.id = inv.customer_relationship_id
AND cr.type = 'CUSTOMER'
AND cr.status = 'ACTIVE'
AND cr.disabled_at IS NULL
GROUP BY
inv.party_id,
inv.entity_id