| Actor | Fragment | Worker | State |
|---|---|---|---|
| 156791 | 17840 | 33 | running |
| 156792 | 17840 | 33 | running |
| 156793 | 17841 | 33 | running |
| 156794 | 17841 | 33 | running |
| 156864 | 17842 | 33 | running |
| 156865 | 17842 | 33 | running |
| 156868 | 17843 | 33 | running |
| 156869 | 17843 | 33 | running |
| 156902 | 17846 | 33 | running |
| 156903 | 17847 | 33 | running |
| 156969 | 17849 | 33 | running |
| 156970 | 17849 | 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