Sha256: 0a6ec1e0da778b3254d3993c5c5b8f6712e3a5b4fdf1b411e17976d9e8055507

Contents?: true

Size: 1.16 KB

Versions: 4

Compression:

Stored size: 1.16 KB

Contents

source :in, {
  :file => "scd/#{ENV['run_number']}.txt",
  :parser => :csv
},
[
  :first_name,
  :last_name,
  :address,
  :city,
  :state,
  :zip_code
]

# NOTE: These are not usually required for a type 1 SCD dimension, but since
# we're sharing this table with the type 2 tests, they're necessary.
transform :effective_date, :default, :default_value => Time.now.to_s(:db)
transform :end_date, :default, :default_value => '9999-12-31 00:00:00'
transform :latest_version, :default, :default_value => true

destination :out, {
  :file => 'output/scd_test_type_1.txt',
  :natural_key => [:first_name, :last_name],
  :scd => {
    :type => 1,
    :dimension_target => :data_warehouse,
    :dimension_table => 'person_dimension'
  },
  :scd_fields => [:address, :city, :state, :zip_code]
}, 
{
  :order => [
    :id, :first_name, :last_name, :address, :city, :state, :zip_code, :effective_date, :end_date, :latest_version
  ],
  :virtual => {
    :id => ETL::Generator::SurrogateKeyGenerator.new(:target => :data_warehouse, :table => 'person_dimension')
  }
}

post_process :bulk_import, {
  :file => 'output/scd_test_type_1.txt',
  :target => :data_warehouse,
  :table => 'person_dimension'
}

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
activewarehouse-etl-1.0.0 test/scd_test_type_1.ctl
activewarehouse-etl-1.0.0.rc1 test/scd_test_type_1.ctl
etl-0.9.5.rc1 spec/fixtures/scd_test_type_1.ctl
activewarehouse-etl-sgonyea-0.9.6 test/scd_test_type_1.ctl