Sha256: 0b820e4f62ec8e56828c3f0e968dfd6af6438da7023a4a14e4a9a2f59f0d4ba0

Contents?: true

Size: 630 Bytes

Versions: 7

Compression:

Stored size: 630 Bytes

Contents

require_relative '../all_jobs_shared'

class ParseDateJob
  include AllJobsShared

  define_param :format, '%Y-%m-%d'
  define_param :if_blank, nil
  define_source :source_data, Remi::DataSource::DataFrame,
    fields: {
      :date_string => {}
    }
  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(:date_string) .target(:parsed_date)
        .transform(Remi::Transform[:parse_date].(format: params[:format], if_blank: params[:if_blank]))
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
remi-0.2.13 jobs/transforms/parse_date_job.rb
remi-0.2.12 jobs/transforms/parse_date_job.rb
remi-0.2.11 jobs/transforms/parse_date_job.rb
remi-0.2.10 jobs/transforms/parse_date_job.rb
remi-0.2.9 jobs/transforms/parse_date_job.rb
remi-0.2.8 lib/remi/project/jobs/transforms/parse_date_job.rb
remi-0.2.7 lib/remi/project/jobs/transforms/parse_date_job.rb