Skip to contents

Downloads the full roller totalbestand (~131 MB), parses it via read_roles_json() + flatten_roles_bulk_fast(), and computes a field-level diff against stored state using diff_roller_state(). Roller CDC events are bare notifications (rolle.oppdatert with only org_nr) — they carry no field-level changes, so the bulk diff is the only way to determine what actually changed.

Usage

apply_roller_events(state, updates, verbose = TRUE)

Arguments

state

Current roller state tibble (from previous sync).

updates

Tibble of CDC events with org_nr, timestamp, update_id. Used for cursor advancement and per-org timestamp enrichment on the changelog.

verbose

Logical. Print progress messages.

Value

List with state (updated tibble) and changelog (field-level diff tibble matching brreg_changes() schema).