Sha256: f195d2ce2bcca2fcfc364d44882982578151a592b8e9af7ca156bc2b86614af7

Contents?: true

Size: 565 Bytes

Versions: 10

Compression:

Stored size: 565 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].(params[:truncate_len].to_i))
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
remi-0.2.27 jobs/transforms/truncate_job.rb
remi-0.2.26 jobs/transforms/truncate_job.rb
remi-0.2.25 jobs/transforms/truncate_job.rb
remi-0.2.24 jobs/transforms/truncate_job.rb
remi-0.2.23 jobs/transforms/truncate_job.rb
remi-0.2.22 jobs/transforms/truncate_job.rb
remi-0.2.21 jobs/transforms/truncate_job.rb
remi-0.2.20 jobs/transforms/truncate_job.rb
remi-0.2.19 jobs/transforms/truncate_job.rb
remi-0.2.18 jobs/transforms/truncate_job.rb