| Actor | Fragment | Worker | State |
|---|---|---|---|
| 33115 | 12179 | 33 | running |
| 33116 | 12179 | 33 | running |
| 33123 | 12171 | 33 | running |
| 33124 | 12171 | 33 | running |
| 33163 | 12172 | 33 | running |
| 33164 | 12172 | 33 | running |
| 33165 | 12173 | 33 | running |
| 33166 | 12173 | 33 | running |
| 33167 | 12176 | 33 | running |
| 33168 | 12177 | 33 | running |
| 33169 | 12178 | 33 | running |
| 33170 | 12178 | 33 | running |
CREATE MATERIALIZED VIEW authz.active_parties_to_portfolios_mv
WITH (
backfill_order=FIXED(party.customer_relationships -> 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