Sha256: 9648b73ac3e1b25af41b4344a63b002126d0e8492535374f6f1dd353bc89b011

Contents?: true

Size: 584 Bytes

Versions: 5

Compression:

Stored size: 584 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
  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

5 entries across 5 versions & 1 rubygems

Version Path
remi-0.2.6 lib/remi/project/jobs/transforms/parse_date_job.rb
remi-0.2.5 lib/remi/project/jobs/transforms/parse_date_job.rb
remi-0.2.4 lib/remi/project/jobs/transforms/parse_date_job.rb
remi-0.2.3 lib/remi/project/jobs/transforms/parse_date_job.rb
remi-0.2.2 lib/remi/project/jobs/transforms/parse_date_job.rb