lib/etl/control/source/database_source.rb
# Returns each row from the source. If read_locally is specified then
# this method will attempt to read from the last stored local file. 
# If no locally stored file exists or if the trigger file for the last
# locally stored file does not exist then this method will raise an
# error.
Returns each row from the source. If read_locally is specified then
this method will attempt to read from the last stored local file.
If no locally stored file exists or if the trigger file for the last
locally stored file does not exist then this method will raise an
error.
Returns each row from the source . If read_locally is specified then this method will attempt to read from the last stored local file . If no locally stored file exists or if the trigger file for the last locally stored file does not exist then this method will raise an error .
def each(&block)
        if read_locally 
          ETL::Engine.logger.debug "Reading from local cache"
          read_rows(last_local_file, &block)
        else 
          if store_locally
            file = local_file
            write_local(file)
            read_rows(file, &block)
          else
            query_rows.each do |row|
              row = ETL::Row.new(row.symbolize_keys)
              row.source = self
              yield row
            end
          end
        end
      end
def each ( & block ) if read_locally ETL :: Engine . logger . debug "Reading from local cache" read_rows ( last_local_file , & block ) else if store_locally file = local_file write_local ( file ) read_rows ( file , & block ) else query_rows . each do | row | row = ETL :: Row . new ( row . symbolize_keys ) row . source = self yield row end end end end
Returns each row from the source.
Returns each row from the source .
# Read from the last stored source # Read from the original source
block
<not_specific>