sync_local_data_partitioned: Synchronize Monthly Partitioned Local Data

View source: R/core_local.R

sync_local_data_partitionedR Documentation

Synchronize Monthly Partitioned Local Data

Description

Upserts only monthly partitions touched by new_data. On the first partitioned sync, an existing monolithic RDS cache is copied into monthly partitions so callers can opt in without a separate migration step.

Usage

sync_local_data_partitioned(
  new_data,
  local_file_path,
  time_col,
  key_cols,
  order_cols = key_cols,
  source_utime = NULL,
  local_updated_at = Sys.time(),
  tz = "UTC"
)

Arguments

new_data

A data.table-compatible object.

local_file_path

Output .rds file path.

time_col

Name of the timestamp column used for monthly partitioning.

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.

tz

Time zone used to determine month boundaries.

Value

A sync result list. Its data element contains the touched rows, rather than the complete potentially large dataset.


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