| Actor | Fragment | Worker | State |
|---|---|---|---|
| 742988 | 62714 | 51 | running |
| 742989 | 62714 | 51 | running |
| 742996 | 62706 | 51 | running |
| 742997 | 62706 | 51 | running |
| 744233 | 62705 | 51 | running |
| 744234 | 62705 | 51 | running |
| 744235 | 62707 | 51 | running |
| 744236 | 62707 | 51 | running |
| 744237 | 62708 | 51 | running |
| 744238 | 62708 | 51 | running |
| 744239 | 62713 | 51 | running |
| 744240 | 62713 | 51 | 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 FOR SYSTEM_TIME AS OF PROCTIME() 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