Sha256: 03f9c2c322f81e1e945e111e2c0438a60d3f06af1c82b35efdbad6cca775c7f8
Contents?: true
Size: 493 Bytes
Versions: 1
Compression:
Stored size: 493 Bytes
Contents
# frozen_string_literal: true module Chronicle module ETL class MultiplyTransformer < Chronicle::ETL::Transformer register_connector do |r| r.identifier = :multiply r.description = 'by taking a sample' end setting :n, default: 2, type: :numeric # return the result, sample_size percentage of the time. otherwise nil def transform(record) @config.n.to_i.times do yield record.data end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chronicle-etl-0.6.1 | lib/chronicle/etl/transformers/multiply_transformer.rb |