sync_local_data_batches: Synchronize Local Data From In-Memory Batches

View source: R/core_local.R

sync_local_data_batchesR Documentation

Synchronize Local Data From In-Memory Batches

Description

Combines multiple freshly retrieved data batches in memory, de-duplicates them by key_cols, then calls sync_local_data() once. This is useful for gap repair workflows where calling sync_local_data() once per small page would repeatedly rewrite the same local .rds file.

Usage

sync_local_data_batches(
  batches,
  local_file_path,
  key_cols,
  order_cols = key_cols,
  source_utime = NULL,
  local_updated_at = Sys.time()
)

Arguments

batches

A list of data.table-compatible batches.

local_file_path

Output .rds file path.

key_cols

Character vector of key columns used for de-duplication.

order_cols

Character vector used to sort the merged data.

source_utime

Optional upstream update time recorded in metadata.

local_updated_at

Optional local update time override.

Value

A sync result list.


investdatar documentation built on Aug. 21, 2026, 5:17 p.m.