Sha256: 675658b3b7339b8d37175568f402f9c64f33006f91eeaa3c5fcaefd162bb2904

Contents?: true

Size: 835 Bytes

Versions: 4

Compression:

Stored size: 835 Bytes

Contents

require 'flydata-core/table_def/redshift_table_def'

module FlydataCore
module QueryJob

class Redshift
  # returns a list of table names used in the Query Job system.
  def self.target_table_names(flydata_table_names)
    flydata_table_names = [ flydata_table_names ] unless flydata_table_names.kind_of?(Array)

    flydata_table_names.collect {|flydata_table_name|
      redshift_table_name = TableDef::RedshiftTableDef.convert_to_valid_table_name(flydata_table_name)
      table_names = [ redshift_table_name ]
      if redshift_table_name != flydata_table_name
        # for backward compatibility
        # Old implementation used FlyData table names.  To support it, the
        # method adds the flydata_table_name as well.
        table_names << flydata_table_name
      end

      table_names
    }.flatten
  end
end

end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
flydata-0.5.0 flydata-core/lib/flydata-core/query_job/redshift.rb
flydata-0.4.3 flydata-core/lib/flydata-core/query_job/redshift.rb
flydata-0.4.2 flydata-core/lib/flydata-core/query_job/redshift.rb
flydata-0.4.1 flydata-core/lib/flydata-core/query_job/redshift.rb