etl 0.9.5.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (215) hide show
  1. data/.gitignore +12 -0
  2. data/.yardopts +5 -0
  3. data/0.9-UPGRADE +6 -0
  4. data/CHANGELOG +236 -0
  5. data/Gemfile +4 -0
  6. data/HOW_TO_RELEASE +13 -0
  7. data/LICENSE +7 -0
  8. data/README.textile +111 -0
  9. data/Rakefile +105 -0
  10. data/TODO +28 -0
  11. data/activewarehouse-etl.gemspec +38 -0
  12. data/bin/etl +28 -0
  13. data/bin/etl.cmd +8 -0
  14. data/examples/database.example.yml +16 -0
  15. data/lib/etl.rb +97 -0
  16. data/lib/etl/batch.rb +2 -0
  17. data/lib/etl/batch/batch.rb +111 -0
  18. data/lib/etl/batch/directives.rb +65 -0
  19. data/lib/etl/builder.rb +2 -0
  20. data/lib/etl/builder/date_dimension_builder.rb +96 -0
  21. data/lib/etl/builder/time_dimension_builder.rb +31 -0
  22. data/lib/etl/commands/etl.rb +89 -0
  23. data/lib/etl/control.rb +3 -0
  24. data/lib/etl/control/control.rb +405 -0
  25. data/lib/etl/control/destination.rb +438 -0
  26. data/lib/etl/control/destination/csv_destination.rb +113 -0
  27. data/lib/etl/control/destination/database_destination.rb +97 -0
  28. data/lib/etl/control/destination/excel_destination.rb +91 -0
  29. data/lib/etl/control/destination/file_destination.rb +126 -0
  30. data/lib/etl/control/destination/insert_update_database_destination.rb +136 -0
  31. data/lib/etl/control/destination/update_database_destination.rb +109 -0
  32. data/lib/etl/control/destination/yaml_destination.rb +74 -0
  33. data/lib/etl/control/source.rb +132 -0
  34. data/lib/etl/control/source/database_source.rb +224 -0
  35. data/lib/etl/control/source/enumerable_source.rb +11 -0
  36. data/lib/etl/control/source/file_source.rb +90 -0
  37. data/lib/etl/control/source/model_source.rb +39 -0
  38. data/lib/etl/core_ext.rb +1 -0
  39. data/lib/etl/core_ext/time.rb +5 -0
  40. data/lib/etl/core_ext/time/calculations.rb +42 -0
  41. data/lib/etl/engine.rb +582 -0
  42. data/lib/etl/execution.rb +19 -0
  43. data/lib/etl/execution/base.rb +8 -0
  44. data/lib/etl/execution/batch.rb +10 -0
  45. data/lib/etl/execution/job.rb +8 -0
  46. data/lib/etl/execution/migration.rb +90 -0
  47. data/lib/etl/generator.rb +2 -0
  48. data/lib/etl/generator/generator.rb +20 -0
  49. data/lib/etl/generator/surrogate_key_generator.rb +39 -0
  50. data/lib/etl/http_tools.rb +139 -0
  51. data/lib/etl/parser.rb +11 -0
  52. data/lib/etl/parser/apache_combined_log_parser.rb +49 -0
  53. data/lib/etl/parser/csv_parser.rb +93 -0
  54. data/lib/etl/parser/excel_parser.rb +112 -0
  55. data/lib/etl/parser/fixed_width_parser.rb +65 -0
  56. data/lib/etl/parser/nokogiri_xml_parser.rb +83 -0
  57. data/lib/etl/parser/parser.rb +41 -0
  58. data/lib/etl/parser/sax_parser.rb +218 -0
  59. data/lib/etl/parser/xml_parser.rb +65 -0
  60. data/lib/etl/processor.rb +11 -0
  61. data/lib/etl/processor/block_processor.rb +14 -0
  62. data/lib/etl/processor/bulk_import_processor.rb +94 -0
  63. data/lib/etl/processor/check_exist_processor.rb +80 -0
  64. data/lib/etl/processor/check_unique_processor.rb +39 -0
  65. data/lib/etl/processor/copy_field_processor.rb +26 -0
  66. data/lib/etl/processor/database_join_processor.rb +82 -0
  67. data/lib/etl/processor/encode_processor.rb +55 -0
  68. data/lib/etl/processor/ensure_fields_presence_processor.rb +24 -0
  69. data/lib/etl/processor/escape_csv_processor.rb +77 -0
  70. data/lib/etl/processor/filter_row_processor.rb +51 -0
  71. data/lib/etl/processor/ftp_downloader_processor.rb +68 -0
  72. data/lib/etl/processor/ftp_uploader_processor.rb +65 -0
  73. data/lib/etl/processor/hierarchy_exploder_processor.rb +55 -0
  74. data/lib/etl/processor/imapattachment_downloader_processor.rb +91 -0
  75. data/lib/etl/processor/pop3attachment_downloader_processor.rb +90 -0
  76. data/lib/etl/processor/print_row_processor.rb +12 -0
  77. data/lib/etl/processor/processor.rb +25 -0
  78. data/lib/etl/processor/rename_processor.rb +24 -0
  79. data/lib/etl/processor/require_non_blank_processor.rb +26 -0
  80. data/lib/etl/processor/row_processor.rb +27 -0
  81. data/lib/etl/processor/sequence_processor.rb +23 -0
  82. data/lib/etl/processor/sftp_downloader_processor.rb +63 -0
  83. data/lib/etl/processor/sftp_uploader_processor.rb +63 -0
  84. data/lib/etl/processor/surrogate_key_processor.rb +53 -0
  85. data/lib/etl/processor/truncate_processor.rb +40 -0
  86. data/lib/etl/processor/zip_file_processor.rb +27 -0
  87. data/lib/etl/row.rb +20 -0
  88. data/lib/etl/screen.rb +14 -0
  89. data/lib/etl/screen/row_count_screen.rb +20 -0
  90. data/lib/etl/transform.rb +2 -0
  91. data/lib/etl/transform/block_transform.rb +13 -0
  92. data/lib/etl/transform/calculation_transform.rb +71 -0
  93. data/lib/etl/transform/date_to_string_transform.rb +20 -0
  94. data/lib/etl/transform/decode_transform.rb +51 -0
  95. data/lib/etl/transform/default_transform.rb +20 -0
  96. data/lib/etl/transform/foreign_key_lookup_transform.rb +211 -0
  97. data/lib/etl/transform/hierarchy_lookup_transform.rb +49 -0
  98. data/lib/etl/transform/md5_transform.rb +13 -0
  99. data/lib/etl/transform/ordinalize_transform.rb +14 -0
  100. data/lib/etl/transform/sha1_transform.rb +13 -0
  101. data/lib/etl/transform/split_fields_transform.rb +27 -0
  102. data/lib/etl/transform/string_to_date_time_transform.rb +14 -0
  103. data/lib/etl/transform/string_to_date_transform.rb +16 -0
  104. data/lib/etl/transform/string_to_time_transform.rb +11 -0
  105. data/lib/etl/transform/transform.rb +61 -0
  106. data/lib/etl/transform/trim_transform.rb +26 -0
  107. data/lib/etl/transform/type_transform.rb +35 -0
  108. data/lib/etl/util.rb +59 -0
  109. data/lib/etl/version.rb +3 -0
  110. data/spec/fixtures/all.ebf +6 -0
  111. data/spec/fixtures/apache_combined_log.ctl +11 -0
  112. data/spec/fixtures/batch_with_error.ebf +6 -0
  113. data/spec/fixtures/batched1.ctl +0 -0
  114. data/spec/fixtures/batched2.ctl +0 -0
  115. data/spec/fixtures/block_processor.ctl +6 -0
  116. data/spec/fixtures/block_processor_error.ctl +1 -0
  117. data/spec/fixtures/block_processor_pre_post_process.ctl +4 -0
  118. data/spec/fixtures/block_processor_remove_rows.ctl +5 -0
  119. data/spec/fixtures/data/apache_combined_log.txt +3 -0
  120. data/spec/fixtures/data/bulk_import.txt +3 -0
  121. data/spec/fixtures/data/bulk_import_with_empties.txt +3 -0
  122. data/spec/fixtures/data/decode.txt +3 -0
  123. data/spec/fixtures/data/delimited.txt +3 -0
  124. data/spec/fixtures/data/encode_source_latin1.txt +2 -0
  125. data/spec/fixtures/data/excel.xls +0 -0
  126. data/spec/fixtures/data/excel2.xls +0 -0
  127. data/spec/fixtures/data/fixed_width.txt +3 -0
  128. data/spec/fixtures/data/multiple_delimited_1.txt +3 -0
  129. data/spec/fixtures/data/multiple_delimited_2.txt +3 -0
  130. data/spec/fixtures/data/nokogiri.xml +38 -0
  131. data/spec/fixtures/data/people.txt +3 -0
  132. data/spec/fixtures/data/sax.xml +14 -0
  133. data/spec/fixtures/data/xml.xml +16 -0
  134. data/spec/fixtures/delimited.ctl +30 -0
  135. data/spec/fixtures/delimited_absolute.ctl +31 -0
  136. data/spec/fixtures/delimited_destination_db.ctl +23 -0
  137. data/spec/fixtures/delimited_excel.ctl +31 -0
  138. data/spec/fixtures/delimited_insert_update.ctl +34 -0
  139. data/spec/fixtures/delimited_update.ctl +34 -0
  140. data/spec/fixtures/delimited_with_bulk_load.ctl +34 -0
  141. data/spec/fixtures/errors.ctl +24 -0
  142. data/spec/fixtures/excel.ctl +24 -0
  143. data/spec/fixtures/excel2.ctl +25 -0
  144. data/spec/fixtures/fixed_width.ctl +35 -0
  145. data/spec/fixtures/inline_parser.ctl +17 -0
  146. data/spec/fixtures/model_source.ctl +14 -0
  147. data/spec/fixtures/multiple_delimited.ctl +22 -0
  148. data/spec/fixtures/multiple_source_delimited.ctl +39 -0
  149. data/spec/fixtures/nokogiri_all.ctl +35 -0
  150. data/spec/fixtures/nokogiri_select.ctl +35 -0
  151. data/spec/fixtures/output/.ignore +1 -0
  152. data/spec/fixtures/output/delimited.txt +3 -0
  153. data/spec/fixtures/output/encode_destination_utf-8.txt +2 -0
  154. data/spec/fixtures/output/fixed_width.txt +3 -0
  155. data/spec/fixtures/output/inline_parser.txt +3 -0
  156. data/spec/fixtures/output/multiple_source_delimited.txt +6 -0
  157. data/spec/fixtures/output/test_excel_destination.xls +0 -0
  158. data/spec/fixtures/output/test_file_destination.2.txt +2 -0
  159. data/spec/fixtures/output/test_file_destination.txt +2 -0
  160. data/spec/fixtures/output/test_multiple_unique.txt +1 -0
  161. data/spec/fixtures/output/test_unique.txt +2 -0
  162. data/spec/fixtures/sax.ctl +26 -0
  163. data/spec/fixtures/scd/1.txt +1 -0
  164. data/spec/fixtures/scd/2.txt +1 -0
  165. data/spec/fixtures/scd/3.txt +1 -0
  166. data/spec/fixtures/scd_test_type_1.ctl +43 -0
  167. data/spec/fixtures/scd_test_type_2.ctl +34 -0
  168. data/spec/fixtures/screen_test_error.ctl +3 -0
  169. data/spec/fixtures/screen_test_fatal.ctl +3 -0
  170. data/spec/fixtures/xml.ctl +31 -0
  171. data/spec/quality_spec.rb +11 -0
  172. data/spec/spec_helper.rb +10 -0
  173. data/spec/support/custom_fixtures.rb +54 -0
  174. data/spec/support/custom_matchers.rb +54 -0
  175. data/test-matrix.yml +10 -0
  176. data/test/.gitignore +1 -0
  177. data/test/.ignore +2 -0
  178. data/test/batch_test.rb +41 -0
  179. data/test/block_processor_test.rb +38 -0
  180. data/test/check_exist_processor_test.rb +92 -0
  181. data/test/check_unique_processor_test.rb +40 -0
  182. data/test/config/Gemfile.rails-2.3.x +3 -0
  183. data/test/config/Gemfile.rails-2.3.x.lock +53 -0
  184. data/test/config/Gemfile.rails-3.0.x +3 -0
  185. data/test/config/Gemfile.rails-3.0.x.lock +61 -0
  186. data/test/config/common.rb +29 -0
  187. data/test/connection/mysql/connection.rb +9 -0
  188. data/test/connection/mysql/schema.sql +37 -0
  189. data/test/connection/postgresql/connection.rb +13 -0
  190. data/test/connection/postgresql/schema.sql +40 -0
  191. data/test/control_test.rb +43 -0
  192. data/test/database_join_processor_test.rb +43 -0
  193. data/test/date_dimension_builder_test.rb +96 -0
  194. data/test/destination_test.rb +275 -0
  195. data/test/directive_test.rb +23 -0
  196. data/test/encode_processor_test.rb +32 -0
  197. data/test/engine_test.rb +78 -0
  198. data/test/ensure_fields_presence_processor_test.rb +28 -0
  199. data/test/etl_test.rb +42 -0
  200. data/test/foreign_key_lookup_transform_test.rb +50 -0
  201. data/test/generator_test.rb +14 -0
  202. data/test/mocks/mock_destination.rb +26 -0
  203. data/test/mocks/mock_source.rb +25 -0
  204. data/test/nokogiri_test.rb +35 -0
  205. data/test/parser_test.rb +224 -0
  206. data/test/performance/delimited.ctl +30 -0
  207. data/test/processor_test.rb +44 -0
  208. data/test/row_processor_test.rb +17 -0
  209. data/test/scd_test.rb +257 -0
  210. data/test/screen_test.rb +9 -0
  211. data/test/source_test.rb +154 -0
  212. data/test/test_helper.rb +37 -0
  213. data/test/transform_test.rb +101 -0
  214. data/test/truncate_processor_test.rb +37 -0
  215. metadata +510 -0
@@ -0,0 +1,37 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
4
+ $:.unshift(File.dirname(__FILE__) + '/../lib')
5
+ $:.unshift(File.dirname(__FILE__))
6
+
7
+ require 'test/unit'
8
+ require 'pp'
9
+ require 'etl'
10
+ require 'shoulda'
11
+ require 'flexmock/test_unit'
12
+
13
+ database_yml = File.dirname(__FILE__) + '/config/database.yml'
14
+ ETL::Engine.init(:config => database_yml)
15
+ ETL::Engine.logger = Logger.new(STDOUT)
16
+ # ETL::Engine.logger.level = Logger::DEBUG
17
+ ETL::Engine.logger.level = Logger::FATAL
18
+
19
+ db = YAML::load(IO.read(database_yml))['operational_database']['adapter']
20
+ # allow both mysql2 and mysql adapters
21
+ db = db.gsub('mysql2', 'mysql')
22
+ raise "Unsupported test db '#{db}'" unless ['mysql', 'postgresql'].include?(db)
23
+
24
+ require "connection/#{db}/connection"
25
+ ActiveRecord::Base.establish_connection :operational_database
26
+ ETL::Execution::Job.delete_all
27
+
28
+ require 'mocks/mock_source'
29
+ require 'mocks/mock_destination'
30
+
31
+ # shortcut to launch a ctl file
32
+ def process(file)
33
+ Engine.process(File.join(File.dirname(__FILE__), file))
34
+ end
35
+
36
+ puts "ActiveRecord::VERSION = #{ActiveRecord::VERSION::STRING}"
37
+
@@ -0,0 +1,101 @@
1
+ require File.dirname(__FILE__) + '/test_helper'
2
+
3
+ class MyResolver
4
+ def resolve(value)
5
+ 4
6
+ end
7
+ end
8
+
9
+ class TransformTest < Test::Unit::TestCase
10
+ def test_sha1_transform
11
+ control = ETL::Control::Control.parse(File.dirname(__FILE__) + '/delimited.ctl')
12
+ digest_value = 'a9993e364706816aba3e25717850c26c9cd0d89d'
13
+ assert_equal digest_value, ETL::Transform::Sha1Transform.new(
14
+ control, nil
15
+ ).transform('test', 'abc', [])
16
+ end
17
+ def test_block_transform
18
+ #transforms = [Proc.new(){|name, value, row| value[0,2]}]
19
+ #assert_equal '11', ETL::Transform::Transform.transform(:ssn, '1111223333', [], transforms)
20
+ end
21
+ def test_decode_transform
22
+ control = ETL::Control::Control.parse(File.dirname(__FILE__) + '/delimited.ctl')
23
+ configuration = {:decode_table_path => 'data/decode.txt'}
24
+
25
+ t = ETL::Transform::DecodeTransform.new(control, nil, configuration)
26
+
27
+ assert_equal 'Male', t.transform(nil, 'M', [])
28
+ assert_equal 'Female', t.transform(nil, 'F', [])
29
+ assert_equal 'Unknown', t.transform(nil, '', [])
30
+ assert_equal 'Unknown', t.transform(nil, 'blah', [])
31
+ end
32
+ def test_string_to_date_transform
33
+ control = ETL::Control::Control.parse(File.dirname(__FILE__) + '/delimited.ctl')
34
+ t = ETL::Transform::StringToDateTransform.new(control, nil)
35
+
36
+ assert_equal Date.parse('2005-01-01'), t.transform(nil, '2005-01-01', [])
37
+ assert_equal Date.parse('2004-10-20 20:30:00'), t.transform(nil, '2004-10-20', [])
38
+ end
39
+ def test_date_to_string_transform
40
+ control = ETL::Control::Control.parse(File.dirname(__FILE__) + '/delimited.ctl')
41
+ t = ETL::Transform::DateToStringTransform.new(control, nil)
42
+
43
+ d1 = Date.parse('2005-01-01')
44
+ t1 = Time.parse('2004-10-20 23:03:23')
45
+ assert_equal '2005-01-01', t.transform(nil, d1, [])
46
+ assert_equal '2004-10-20', t.transform(nil, t1, [])
47
+
48
+ t = ETL::Transform::DateToStringTransform.new(control, nil, {:format => '%m/%d/%Y'})
49
+
50
+ assert_equal '01/01/2005', t.transform(nil, d1, [])
51
+ assert_equal '10/20/2004', t.transform(nil, t1, [])
52
+ end
53
+ def test_string_to_datetime_transform
54
+ v = '1/1/1900 04:34:30'
55
+ t = ETL::Transform::StringToDateTimeTransform.new(flexmock(:control), nil)
56
+ assert_equal DateTime.parse(v), t.transform(nil, v, nil)
57
+ end
58
+ def test_foreign_key_lookup_transform
59
+ control = ETL::Control::Control.parse(File.dirname(__FILE__) + '/delimited.ctl')
60
+ configuration = {:collection => {'foo' => 1, 'bar' => 2, 'baz' => 3}}
61
+ t = ETL::Transform::ForeignKeyLookupTransform.new(control, nil, configuration)
62
+
63
+ assert_equal 1, t.transform(nil, 'foo', nil)
64
+ assert_equal 2, t.transform(nil, 'bar', nil)
65
+ assert_equal 3, t.transform(nil, 'baz', nil)
66
+ assert_raises(ETL::ResolverError, 'Foreign key for bing not found and no resolver specified') do
67
+ assert_equal 4, t.transform(nil, 'bing', nil)
68
+ end
69
+
70
+ configuration = {:collection => {'foo' => 1, 'bar' => 2, 'baz' => 3}, :resolver => MyResolver}
71
+ t = ETL::Transform::ForeignKeyLookupTransform.new(control, nil, configuration)
72
+ assert_equal 1, t.transform(nil, 'foo', nil)
73
+ assert_equal 2, t.transform(nil, 'bar', nil)
74
+ assert_equal 3, t.transform(nil, 'baz', nil)
75
+ assert_equal 4, t.transform(nil, 'bing', nil)
76
+ end
77
+ def test_type_transform
78
+ control = ETL::Control::Control.parse(File.dirname(__FILE__) + '/delimited.ctl')
79
+ assert_equal 10, ETL::Transform::TypeTransform.new(control, nil, {:type => :number}).transform(nil, '10', nil)
80
+
81
+ assert_equal BigDecimal::ROUND_HALF_UP, BigDecimal.mode(BigDecimal::ROUND_MODE)
82
+ decimal_transformed = ETL::Transform::TypeTransform.new(
83
+ control, nil, {:type => :decimal, :scale => 4}
84
+ ).transform(nil, '10.0000000000000000000000000000000001', nil)
85
+ assert_equal '10.0000000000000000000000000000000001', decimal_transformed.to_s('F')
86
+ end
87
+ def test_non_existent_transformer
88
+
89
+ end
90
+ def test_default_transform
91
+ t = ETL::Transform::DefaultTransform.new(flexmock('control'), nil, {:default_value => 'foo'})
92
+ assert_equal 'foo', t.transform(nil, '', nil)
93
+ assert_equal 'foo', t.transform(nil, nil, nil)
94
+ assert_equal 'bar', t.transform(nil, 'bar', nil)
95
+ end
96
+ def test_ordinalize_transform
97
+ t = ETL::Transform::OrdinalizeTransform.new(flexmock('control'), nil, {})
98
+ assert_equal '1st', t.transform(nil, 1, nil)
99
+ assert_equal '10th', t.transform(nil, 10, nil)
100
+ end
101
+ end
@@ -0,0 +1,37 @@
1
+ require File.dirname(__FILE__) + '/test_helper'
2
+
3
+ include ETL::Processor
4
+
5
+ class TruncateTest < ActiveRecord::Base
6
+ set_table_name 'truncate_test'
7
+ end
8
+
9
+ class TruncateProcessorTest < Test::Unit::TestCase
10
+
11
+ def create_item!
12
+ TruncateTest.create!(:x => 'ABC')
13
+ end
14
+
15
+ def truncate!(options=nil)
16
+ TruncateProcessor.new(nil,
17
+ :target => :data_warehouse,
18
+ :table => TruncateTest.table_name,
19
+ :options => options
20
+ ).process
21
+ end
22
+
23
+ should 'reset ids by default' do
24
+ create_item!
25
+ truncate!
26
+ assert_equal 1, create_item!.id
27
+ end
28
+
29
+ if ETL::Engine.connection(:data_warehouse).class.name =~ /postgres/i
30
+ should 'allow disabling id reset for postgres' do
31
+ truncate!
32
+ create_item!
33
+ truncate!('CONTINUE IDENTITY')
34
+ assert_equal 2, create_item!.id
35
+ end
36
+ end
37
+ end
metadata ADDED
@@ -0,0 +1,510 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: etl
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.5.rc1
5
+ prerelease: 6
6
+ platform: ruby
7
+ authors:
8
+ - Anthony Eden
9
+ - Thibaut Barrère
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2011-10-02 00:00:00.000000000Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activesupport
17
+ requirement: &70324741767800 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 2.1.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *70324741767800
26
+ - !ruby/object:Gem::Dependency
27
+ name: activerecord
28
+ requirement: &70324741767060 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: 2.1.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: *70324741767060
37
+ - !ruby/object:Gem::Dependency
38
+ name: fastercsv
39
+ requirement: &70324741766180 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: 1.2.0
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: *70324741766180
48
+ - !ruby/object:Gem::Dependency
49
+ name: adapter_extensions
50
+ requirement: &70324741765540 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: 0.9.5.rc1
56
+ type: :runtime
57
+ prerelease: false
58
+ version_requirements: *70324741765540
59
+ - !ruby/object:Gem::Dependency
60
+ name: rake
61
+ requirement: &70324741764920 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ type: :development
68
+ prerelease: false
69
+ version_requirements: *70324741764920
70
+ - !ruby/object:Gem::Dependency
71
+ name: rspec
72
+ requirement: &70324733669580 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 2.6.0
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: *70324733669580
81
+ - !ruby/object:Gem::Dependency
82
+ name: shoulda
83
+ requirement: &70324733668220 !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ~>
87
+ - !ruby/object:Gem::Version
88
+ version: 2.11.3
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: *70324733668220
92
+ - !ruby/object:Gem::Dependency
93
+ name: flexmock
94
+ requirement: &70324733665220 !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ~>
98
+ - !ruby/object:Gem::Version
99
+ version: 0.9.0
100
+ type: :development
101
+ prerelease: false
102
+ version_requirements: *70324733665220
103
+ - !ruby/object:Gem::Dependency
104
+ name: mysql
105
+ requirement: &70324733664460 !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: 2.8.1
111
+ type: :development
112
+ prerelease: false
113
+ version_requirements: *70324733664460
114
+ - !ruby/object:Gem::Dependency
115
+ name: mysql2
116
+ requirement: &70324733663700 !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ~>
120
+ - !ruby/object:Gem::Version
121
+ version: 0.3.7
122
+ type: :development
123
+ prerelease: false
124
+ version_requirements: *70324733663700
125
+ - !ruby/object:Gem::Dependency
126
+ name: spreadsheet
127
+ requirement: &70324733662680 !ruby/object:Gem::Requirement
128
+ none: false
129
+ requirements:
130
+ - - ~>
131
+ - !ruby/object:Gem::Version
132
+ version: 0.6.5.4
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: *70324733662680
136
+ - !ruby/object:Gem::Dependency
137
+ name: yard
138
+ requirement: &70324733661840 !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - ! '>='
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: *70324733661840
147
+ - !ruby/object:Gem::Dependency
148
+ name: RedCloth
149
+ requirement: &70324733655580 !ruby/object:Gem::Requirement
150
+ none: false
151
+ requirements:
152
+ - - ! '>='
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ type: :development
156
+ prerelease: false
157
+ version_requirements: *70324733655580
158
+ description: ActiveWarehouse ETL is a pure Ruby Extract-Transform-Load application
159
+ for loading data into a database.
160
+ email:
161
+ - thibaut.barrere@gmail.com
162
+ executables:
163
+ - etl
164
+ - etl.cmd
165
+ extensions: []
166
+ extra_rdoc_files: []
167
+ files:
168
+ - .gitignore
169
+ - .yardopts
170
+ - 0.9-UPGRADE
171
+ - CHANGELOG
172
+ - Gemfile
173
+ - HOW_TO_RELEASE
174
+ - LICENSE
175
+ - README.textile
176
+ - Rakefile
177
+ - TODO
178
+ - activewarehouse-etl.gemspec
179
+ - bin/etl
180
+ - bin/etl.cmd
181
+ - examples/database.example.yml
182
+ - lib/etl.rb
183
+ - lib/etl/batch.rb
184
+ - lib/etl/batch/batch.rb
185
+ - lib/etl/batch/directives.rb
186
+ - lib/etl/builder.rb
187
+ - lib/etl/builder/date_dimension_builder.rb
188
+ - lib/etl/builder/time_dimension_builder.rb
189
+ - lib/etl/commands/etl.rb
190
+ - lib/etl/control.rb
191
+ - lib/etl/control/control.rb
192
+ - lib/etl/control/destination.rb
193
+ - lib/etl/control/destination/csv_destination.rb
194
+ - lib/etl/control/destination/database_destination.rb
195
+ - lib/etl/control/destination/excel_destination.rb
196
+ - lib/etl/control/destination/file_destination.rb
197
+ - lib/etl/control/destination/insert_update_database_destination.rb
198
+ - lib/etl/control/destination/update_database_destination.rb
199
+ - lib/etl/control/destination/yaml_destination.rb
200
+ - lib/etl/control/source.rb
201
+ - lib/etl/control/source/database_source.rb
202
+ - lib/etl/control/source/enumerable_source.rb
203
+ - lib/etl/control/source/file_source.rb
204
+ - lib/etl/control/source/model_source.rb
205
+ - lib/etl/core_ext.rb
206
+ - lib/etl/core_ext/time.rb
207
+ - lib/etl/core_ext/time/calculations.rb
208
+ - lib/etl/engine.rb
209
+ - lib/etl/execution.rb
210
+ - lib/etl/execution/base.rb
211
+ - lib/etl/execution/batch.rb
212
+ - lib/etl/execution/job.rb
213
+ - lib/etl/execution/migration.rb
214
+ - lib/etl/generator.rb
215
+ - lib/etl/generator/generator.rb
216
+ - lib/etl/generator/surrogate_key_generator.rb
217
+ - lib/etl/http_tools.rb
218
+ - lib/etl/parser.rb
219
+ - lib/etl/parser/apache_combined_log_parser.rb
220
+ - lib/etl/parser/csv_parser.rb
221
+ - lib/etl/parser/excel_parser.rb
222
+ - lib/etl/parser/fixed_width_parser.rb
223
+ - lib/etl/parser/nokogiri_xml_parser.rb
224
+ - lib/etl/parser/parser.rb
225
+ - lib/etl/parser/sax_parser.rb
226
+ - lib/etl/parser/xml_parser.rb
227
+ - lib/etl/processor.rb
228
+ - lib/etl/processor/block_processor.rb
229
+ - lib/etl/processor/bulk_import_processor.rb
230
+ - lib/etl/processor/check_exist_processor.rb
231
+ - lib/etl/processor/check_unique_processor.rb
232
+ - lib/etl/processor/copy_field_processor.rb
233
+ - lib/etl/processor/database_join_processor.rb
234
+ - lib/etl/processor/encode_processor.rb
235
+ - lib/etl/processor/ensure_fields_presence_processor.rb
236
+ - lib/etl/processor/escape_csv_processor.rb
237
+ - lib/etl/processor/filter_row_processor.rb
238
+ - lib/etl/processor/ftp_downloader_processor.rb
239
+ - lib/etl/processor/ftp_uploader_processor.rb
240
+ - lib/etl/processor/hierarchy_exploder_processor.rb
241
+ - lib/etl/processor/imapattachment_downloader_processor.rb
242
+ - lib/etl/processor/pop3attachment_downloader_processor.rb
243
+ - lib/etl/processor/print_row_processor.rb
244
+ - lib/etl/processor/processor.rb
245
+ - lib/etl/processor/rename_processor.rb
246
+ - lib/etl/processor/require_non_blank_processor.rb
247
+ - lib/etl/processor/row_processor.rb
248
+ - lib/etl/processor/sequence_processor.rb
249
+ - lib/etl/processor/sftp_downloader_processor.rb
250
+ - lib/etl/processor/sftp_uploader_processor.rb
251
+ - lib/etl/processor/surrogate_key_processor.rb
252
+ - lib/etl/processor/truncate_processor.rb
253
+ - lib/etl/processor/zip_file_processor.rb
254
+ - lib/etl/row.rb
255
+ - lib/etl/screen.rb
256
+ - lib/etl/screen/row_count_screen.rb
257
+ - lib/etl/transform.rb
258
+ - lib/etl/transform/block_transform.rb
259
+ - lib/etl/transform/calculation_transform.rb
260
+ - lib/etl/transform/date_to_string_transform.rb
261
+ - lib/etl/transform/decode_transform.rb
262
+ - lib/etl/transform/default_transform.rb
263
+ - lib/etl/transform/foreign_key_lookup_transform.rb
264
+ - lib/etl/transform/hierarchy_lookup_transform.rb
265
+ - lib/etl/transform/md5_transform.rb
266
+ - lib/etl/transform/ordinalize_transform.rb
267
+ - lib/etl/transform/sha1_transform.rb
268
+ - lib/etl/transform/split_fields_transform.rb
269
+ - lib/etl/transform/string_to_date_time_transform.rb
270
+ - lib/etl/transform/string_to_date_transform.rb
271
+ - lib/etl/transform/string_to_time_transform.rb
272
+ - lib/etl/transform/transform.rb
273
+ - lib/etl/transform/trim_transform.rb
274
+ - lib/etl/transform/type_transform.rb
275
+ - lib/etl/util.rb
276
+ - lib/etl/version.rb
277
+ - spec/fixtures/all.ebf
278
+ - spec/fixtures/apache_combined_log.ctl
279
+ - spec/fixtures/batch_with_error.ebf
280
+ - spec/fixtures/batched1.ctl
281
+ - spec/fixtures/batched2.ctl
282
+ - spec/fixtures/block_processor.ctl
283
+ - spec/fixtures/block_processor_error.ctl
284
+ - spec/fixtures/block_processor_pre_post_process.ctl
285
+ - spec/fixtures/block_processor_remove_rows.ctl
286
+ - spec/fixtures/data/apache_combined_log.txt
287
+ - spec/fixtures/data/bulk_import.txt
288
+ - spec/fixtures/data/bulk_import_with_empties.txt
289
+ - spec/fixtures/data/decode.txt
290
+ - spec/fixtures/data/delimited.txt
291
+ - spec/fixtures/data/encode_source_latin1.txt
292
+ - spec/fixtures/data/excel.xls
293
+ - spec/fixtures/data/excel2.xls
294
+ - spec/fixtures/data/fixed_width.txt
295
+ - spec/fixtures/data/multiple_delimited_1.txt
296
+ - spec/fixtures/data/multiple_delimited_2.txt
297
+ - spec/fixtures/data/nokogiri.xml
298
+ - spec/fixtures/data/people.txt
299
+ - spec/fixtures/data/sax.xml
300
+ - spec/fixtures/data/xml.xml
301
+ - spec/fixtures/delimited.ctl
302
+ - spec/fixtures/delimited_absolute.ctl
303
+ - spec/fixtures/delimited_destination_db.ctl
304
+ - spec/fixtures/delimited_excel.ctl
305
+ - spec/fixtures/delimited_insert_update.ctl
306
+ - spec/fixtures/delimited_update.ctl
307
+ - spec/fixtures/delimited_with_bulk_load.ctl
308
+ - spec/fixtures/errors.ctl
309
+ - spec/fixtures/excel.ctl
310
+ - spec/fixtures/excel2.ctl
311
+ - spec/fixtures/fixed_width.ctl
312
+ - spec/fixtures/inline_parser.ctl
313
+ - spec/fixtures/model_source.ctl
314
+ - spec/fixtures/multiple_delimited.ctl
315
+ - spec/fixtures/multiple_source_delimited.ctl
316
+ - spec/fixtures/nokogiri_all.ctl
317
+ - spec/fixtures/nokogiri_select.ctl
318
+ - spec/fixtures/output/.ignore
319
+ - spec/fixtures/output/delimited.txt
320
+ - spec/fixtures/output/encode_destination_utf-8.txt
321
+ - spec/fixtures/output/fixed_width.txt
322
+ - spec/fixtures/output/inline_parser.txt
323
+ - spec/fixtures/output/multiple_source_delimited.txt
324
+ - spec/fixtures/output/test_excel_destination.xls
325
+ - spec/fixtures/output/test_file_destination.2.txt
326
+ - spec/fixtures/output/test_file_destination.txt
327
+ - spec/fixtures/output/test_multiple_unique.txt
328
+ - spec/fixtures/output/test_unique.txt
329
+ - spec/fixtures/sax.ctl
330
+ - spec/fixtures/scd/1.txt
331
+ - spec/fixtures/scd/2.txt
332
+ - spec/fixtures/scd/3.txt
333
+ - spec/fixtures/scd_test_type_1.ctl
334
+ - spec/fixtures/scd_test_type_2.ctl
335
+ - spec/fixtures/screen_test_error.ctl
336
+ - spec/fixtures/screen_test_fatal.ctl
337
+ - spec/fixtures/xml.ctl
338
+ - spec/quality_spec.rb
339
+ - spec/spec_helper.rb
340
+ - spec/support/custom_fixtures.rb
341
+ - spec/support/custom_matchers.rb
342
+ - test-matrix.yml
343
+ - test/.gitignore
344
+ - test/.ignore
345
+ - test/batch_test.rb
346
+ - test/block_processor_test.rb
347
+ - test/check_exist_processor_test.rb
348
+ - test/check_unique_processor_test.rb
349
+ - test/config/Gemfile.rails-2.3.x
350
+ - test/config/Gemfile.rails-2.3.x.lock
351
+ - test/config/Gemfile.rails-3.0.x
352
+ - test/config/Gemfile.rails-3.0.x.lock
353
+ - test/config/common.rb
354
+ - test/config/database.example.yml
355
+ - test/connection/mysql/connection.rb
356
+ - test/connection/mysql/schema.sql
357
+ - test/connection/postgresql/connection.rb
358
+ - test/connection/postgresql/schema.sql
359
+ - test/control_test.rb
360
+ - test/database_join_processor_test.rb
361
+ - test/date_dimension_builder_test.rb
362
+ - test/destination_test.rb
363
+ - test/directive_test.rb
364
+ - test/encode_processor_test.rb
365
+ - test/engine_test.rb
366
+ - test/ensure_fields_presence_processor_test.rb
367
+ - test/etl_test.rb
368
+ - test/foreign_key_lookup_transform_test.rb
369
+ - test/generator_test.rb
370
+ - test/mocks/mock_destination.rb
371
+ - test/mocks/mock_source.rb
372
+ - test/nokogiri_test.rb
373
+ - test/parser_test.rb
374
+ - test/performance/delimited.ctl
375
+ - test/processor_test.rb
376
+ - test/row_processor_test.rb
377
+ - test/scd_test.rb
378
+ - test/screen_test.rb
379
+ - test/source_test.rb
380
+ - test/test_helper.rb
381
+ - test/transform_test.rb
382
+ - test/truncate_processor_test.rb
383
+ homepage: https://github.com/activewarehouse/activewarehouse-etl
384
+ licenses: []
385
+ post_install_message:
386
+ rdoc_options: []
387
+ require_paths:
388
+ - lib
389
+ required_ruby_version: !ruby/object:Gem::Requirement
390
+ none: false
391
+ requirements:
392
+ - - ! '>='
393
+ - !ruby/object:Gem::Version
394
+ version: '0'
395
+ required_rubygems_version: !ruby/object:Gem::Requirement
396
+ none: false
397
+ requirements:
398
+ - - ! '>='
399
+ - !ruby/object:Gem::Version
400
+ version: 1.3.6
401
+ requirements: []
402
+ rubyforge_project:
403
+ rubygems_version: 1.8.6
404
+ signing_key:
405
+ specification_version: 3
406
+ summary: Pure Ruby ETL package.
407
+ test_files:
408
+ - spec/fixtures/all.ebf
409
+ - spec/fixtures/apache_combined_log.ctl
410
+ - spec/fixtures/batch_with_error.ebf
411
+ - spec/fixtures/batched1.ctl
412
+ - spec/fixtures/batched2.ctl
413
+ - spec/fixtures/block_processor.ctl
414
+ - spec/fixtures/block_processor_error.ctl
415
+ - spec/fixtures/block_processor_pre_post_process.ctl
416
+ - spec/fixtures/block_processor_remove_rows.ctl
417
+ - spec/fixtures/data/apache_combined_log.txt
418
+ - spec/fixtures/data/bulk_import.txt
419
+ - spec/fixtures/data/bulk_import_with_empties.txt
420
+ - spec/fixtures/data/decode.txt
421
+ - spec/fixtures/data/delimited.txt
422
+ - spec/fixtures/data/encode_source_latin1.txt
423
+ - spec/fixtures/data/excel.xls
424
+ - spec/fixtures/data/excel2.xls
425
+ - spec/fixtures/data/fixed_width.txt
426
+ - spec/fixtures/data/multiple_delimited_1.txt
427
+ - spec/fixtures/data/multiple_delimited_2.txt
428
+ - spec/fixtures/data/nokogiri.xml
429
+ - spec/fixtures/data/people.txt
430
+ - spec/fixtures/data/sax.xml
431
+ - spec/fixtures/data/xml.xml
432
+ - spec/fixtures/delimited.ctl
433
+ - spec/fixtures/delimited_absolute.ctl
434
+ - spec/fixtures/delimited_destination_db.ctl
435
+ - spec/fixtures/delimited_excel.ctl
436
+ - spec/fixtures/delimited_insert_update.ctl
437
+ - spec/fixtures/delimited_update.ctl
438
+ - spec/fixtures/delimited_with_bulk_load.ctl
439
+ - spec/fixtures/errors.ctl
440
+ - spec/fixtures/excel.ctl
441
+ - spec/fixtures/excel2.ctl
442
+ - spec/fixtures/fixed_width.ctl
443
+ - spec/fixtures/inline_parser.ctl
444
+ - spec/fixtures/model_source.ctl
445
+ - spec/fixtures/multiple_delimited.ctl
446
+ - spec/fixtures/multiple_source_delimited.ctl
447
+ - spec/fixtures/nokogiri_all.ctl
448
+ - spec/fixtures/nokogiri_select.ctl
449
+ - spec/fixtures/output/.ignore
450
+ - spec/fixtures/output/delimited.txt
451
+ - spec/fixtures/output/encode_destination_utf-8.txt
452
+ - spec/fixtures/output/fixed_width.txt
453
+ - spec/fixtures/output/inline_parser.txt
454
+ - spec/fixtures/output/multiple_source_delimited.txt
455
+ - spec/fixtures/output/test_excel_destination.xls
456
+ - spec/fixtures/output/test_file_destination.2.txt
457
+ - spec/fixtures/output/test_file_destination.txt
458
+ - spec/fixtures/output/test_multiple_unique.txt
459
+ - spec/fixtures/output/test_unique.txt
460
+ - spec/fixtures/sax.ctl
461
+ - spec/fixtures/scd/1.txt
462
+ - spec/fixtures/scd/2.txt
463
+ - spec/fixtures/scd/3.txt
464
+ - spec/fixtures/scd_test_type_1.ctl
465
+ - spec/fixtures/scd_test_type_2.ctl
466
+ - spec/fixtures/screen_test_error.ctl
467
+ - spec/fixtures/screen_test_fatal.ctl
468
+ - spec/fixtures/xml.ctl
469
+ - spec/quality_spec.rb
470
+ - spec/spec_helper.rb
471
+ - spec/support/custom_fixtures.rb
472
+ - spec/support/custom_matchers.rb
473
+ - test/batch_test.rb
474
+ - test/block_processor_test.rb
475
+ - test/check_exist_processor_test.rb
476
+ - test/check_unique_processor_test.rb
477
+ - test/config/Gemfile.rails-2.3.x
478
+ - test/config/Gemfile.rails-2.3.x.lock
479
+ - test/config/Gemfile.rails-3.0.x
480
+ - test/config/Gemfile.rails-3.0.x.lock
481
+ - test/config/common.rb
482
+ - test/config/database.example.yml
483
+ - test/connection/mysql/connection.rb
484
+ - test/connection/mysql/schema.sql
485
+ - test/connection/postgresql/connection.rb
486
+ - test/connection/postgresql/schema.sql
487
+ - test/control_test.rb
488
+ - test/database_join_processor_test.rb
489
+ - test/date_dimension_builder_test.rb
490
+ - test/destination_test.rb
491
+ - test/directive_test.rb
492
+ - test/encode_processor_test.rb
493
+ - test/engine_test.rb
494
+ - test/ensure_fields_presence_processor_test.rb
495
+ - test/etl_test.rb
496
+ - test/foreign_key_lookup_transform_test.rb
497
+ - test/generator_test.rb
498
+ - test/mocks/mock_destination.rb
499
+ - test/mocks/mock_source.rb
500
+ - test/nokogiri_test.rb
501
+ - test/parser_test.rb
502
+ - test/performance/delimited.ctl
503
+ - test/processor_test.rb
504
+ - test/row_processor_test.rb
505
+ - test/scd_test.rb
506
+ - test/screen_test.rb
507
+ - test/source_test.rb
508
+ - test/test_helper.rb
509
+ - test/transform_test.rb
510
+ - test/truncate_processor_test.rb