Sha256: af99031657db6aef911e2be1f19a1ac9397ba2965c0e91453ed7aefa989441d6

Contents?: true

Size: 857 Bytes

Versions: 1

Compression:

Stored size: 857 Bytes

Contents

module Chronicle
  module ETL
    # Abstract class representing a Loader for an ETL job
    class Loader
      extend Chronicle::ETL::Registry::SelfRegistering
      include Chronicle::ETL::Configurable

      setting :output

      # Construct a new instance of this loader. Options are passed in from a Runner
      # == Parameters:
      # options::
      #   Options for configuring this Loader
      def initialize(options = {})
        apply_options(options)
      end

      # Called once before processing records
      def start; end

      # Load a single record
      def load
        raise NotImplementedError
      end

      # Called once there are no more records to process
      def finish; end
    end
  end
end

require_relative 'csv_loader'
require_relative 'rest_loader'
require_relative 'stdout_loader'
require_relative 'table_loader'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chronicle-etl-0.4.0 lib/chronicle/etl/loaders/loader.rb