Sha256: e45b669e2bce7db0a4141c957fa973c4f42c0a568c7ea81c1c58d789f6984839

Contents?: true

Size: 567 Bytes

Versions: 15

Compression:

Stored size: 567 Bytes

Contents

require_relative '../all_jobs_shared'

class TruncateJob
  include AllJobsShared

  define_param :truncate_len, 5
  define_source :source_data, Remi::DataSource::DataFrame,
    fields: {
      :my_field => {}
    }
  define_target :target_data, Remi::DataTarget::DataFrame

  define_transform :main, sources: :source_data, targets: :target_data do
    Remi::SourceToTargetMap.apply(source_data.df, target_data.df) do
      map source(:my_field) .target(:truncated_field)
        .transform(Remi::Transform::Truncate.new(params[:truncate_len].to_i))
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
remi-0.2.42 jobs/transforms/truncate_job.rb
remi-0.2.41 jobs/transforms/truncate_job.rb
remi-0.2.40 jobs/transforms/truncate_job.rb
remi-0.2.39 jobs/transforms/truncate_job.rb
remi-0.2.38 jobs/transforms/truncate_job.rb
remi-0.2.37 jobs/transforms/truncate_job.rb
remi-0.2.36 jobs/transforms/truncate_job.rb
remi-0.2.35 jobs/transforms/truncate_job.rb
remi-0.2.34 jobs/transforms/truncate_job.rb
remi-0.2.33 jobs/transforms/truncate_job.rb
remi-0.2.32 jobs/transforms/truncate_job.rb
remi-0.2.31 jobs/transforms/truncate_job.rb
remi-0.2.30 jobs/transforms/truncate_job.rb
remi-0.2.29 jobs/transforms/truncate_job.rb
remi-0.2.28 jobs/transforms/truncate_job.rb