Sha256: 36a96e825649541fa0093ac2ad0c094796e9e49ffc5ad7d2e3a07d2c5efd8fdc
Contents?: true
Size: 520 Bytes
Versions: 13
Compression:
Stored size: 520 Bytes
Contents
class Cranium::Extract::Strategy::Incremental < Cranium::Extract::Strategy::Base protected def write_dataset_into_file(target_file, dataset, extract_definition) incremental_field, max_value = extract_definition.incrementally_by, nil dataset.each do |row| max_value = row[incremental_field] if max_value.nil? or row[incremental_field] > max_value target_file << row.values end extract_definition.storage.save_last_value_of incremental_field, max_value unless max_value.nil? end end
Version data entries
13 entries across 13 versions & 1 rubygems