sync_local_data: Synchronize Local Data

View source: R/core_local.R

sync_local_dataR Documentation

Synchronize Local Data

Description

Merges freshly retrieved source data into a local .rds file and stores a sidecar metadata file containing the local update time and source update time.

Usage

sync_local_data(
  new_data,
  local_file_path,
  key_cols,
  order_cols = key_cols,
  source_utime = NULL,
  local_updated_at = Sys.time()
)

Arguments

new_data

A data.table-compatible object.

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 list describing the sync result.


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