class Multiwoven::Integrations::Destination::GoogleSheets::Client

def process_record_chunks(records, sync_config)

Batch has a limit of sending 2MB data. So creating a chunk of records to meet that limit
def process_record_chunks(records, sync_config)
  write_success = 0
  write_failure = 0
  records.each_slice(MAX_CHUNK_SIZE) do |chunk|
    values = prepare_chunk_values(chunk, sync_config.stream)
    update_sheet_values(values, sync_config.stream.name)
    write_success += values.size
  rescue StandardError => e
    handle_exception("GOOGLE_SHEETS:RECORD:WRITE:EXCEPTION", "error", e)
    write_failure += chunk.size
  end
  tracking_message(write_success, write_failure)
end