balinterdi-activewarehouse-etl 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/0.9-UPGRADE +6 -0
- data/CHANGELOG +198 -0
- data/HOW_TO_RELEASE +4 -0
- data/LICENSE +7 -0
- data/README +85 -0
- data/Rakefile +169 -0
- data/TODO +28 -0
- data/VERSION +1 -0
- data/active_support_logger.patch +78 -0
- data/balinterdi-activewarehouse-etl.gemspec +221 -0
- data/bin/etl +28 -0
- data/bin/etl.cmd +8 -0
- data/examples/database.example.yml +16 -0
- data/lib/etl.rb +78 -0
- data/lib/etl/batch.rb +2 -0
- data/lib/etl/batch/batch.rb +111 -0
- data/lib/etl/batch/directives.rb +55 -0
- data/lib/etl/builder.rb +2 -0
- data/lib/etl/builder/date_dimension_builder.rb +96 -0
- data/lib/etl/builder/time_dimension_builder.rb +31 -0
- data/lib/etl/commands/etl.rb +89 -0
- data/lib/etl/control.rb +3 -0
- data/lib/etl/control/control.rb +405 -0
- data/lib/etl/control/destination.rb +420 -0
- data/lib/etl/control/destination/database_destination.rb +95 -0
- data/lib/etl/control/destination/file_destination.rb +124 -0
- data/lib/etl/control/source.rb +109 -0
- data/lib/etl/control/source/database_source.rb +220 -0
- data/lib/etl/control/source/enumerable_source.rb +11 -0
- data/lib/etl/control/source/file_source.rb +90 -0
- data/lib/etl/control/source/model_source.rb +39 -0
- data/lib/etl/core_ext.rb +1 -0
- data/lib/etl/core_ext/time.rb +5 -0
- data/lib/etl/core_ext/time/calculations.rb +42 -0
- data/lib/etl/engine.rb +556 -0
- data/lib/etl/execution.rb +20 -0
- data/lib/etl/execution/base.rb +9 -0
- data/lib/etl/execution/batch.rb +8 -0
- data/lib/etl/execution/job.rb +8 -0
- data/lib/etl/execution/migration.rb +85 -0
- data/lib/etl/generator.rb +2 -0
- data/lib/etl/generator/generator.rb +20 -0
- data/lib/etl/generator/surrogate_key_generator.rb +39 -0
- data/lib/etl/http_tools.rb +139 -0
- data/lib/etl/parser.rb +11 -0
- data/lib/etl/parser/apache_combined_log_parser.rb +49 -0
- data/lib/etl/parser/delimited_parser.rb +75 -0
- data/lib/etl/parser/fixed_width_parser.rb +65 -0
- data/lib/etl/parser/parser.rb +41 -0
- data/lib/etl/parser/sax_parser.rb +218 -0
- data/lib/etl/parser/xml_parser.rb +65 -0
- data/lib/etl/processor.rb +11 -0
- data/lib/etl/processor/block_processor.rb +14 -0
- data/lib/etl/processor/bulk_import_processor.rb +81 -0
- data/lib/etl/processor/check_exist_processor.rb +80 -0
- data/lib/etl/processor/check_unique_processor.rb +35 -0
- data/lib/etl/processor/copy_field_processor.rb +26 -0
- data/lib/etl/processor/encode_processor.rb +55 -0
- data/lib/etl/processor/hierarchy_exploder_processor.rb +55 -0
- data/lib/etl/processor/print_row_processor.rb +12 -0
- data/lib/etl/processor/processor.rb +25 -0
- data/lib/etl/processor/rename_processor.rb +24 -0
- data/lib/etl/processor/require_non_blank_processor.rb +26 -0
- data/lib/etl/processor/row_processor.rb +17 -0
- data/lib/etl/processor/sequence_processor.rb +23 -0
- data/lib/etl/processor/surrogate_key_processor.rb +53 -0
- data/lib/etl/processor/truncate_processor.rb +35 -0
- data/lib/etl/row.rb +20 -0
- data/lib/etl/screen.rb +14 -0
- data/lib/etl/screen/row_count_screen.rb +20 -0
- data/lib/etl/transform.rb +2 -0
- data/lib/etl/transform/block_transform.rb +13 -0
- data/lib/etl/transform/date_to_string_transform.rb +20 -0
- data/lib/etl/transform/decode_transform.rb +51 -0
- data/lib/etl/transform/default_transform.rb +20 -0
- data/lib/etl/transform/foreign_key_lookup_transform.rb +151 -0
- data/lib/etl/transform/hierarchy_lookup_transform.rb +49 -0
- data/lib/etl/transform/ordinalize_transform.rb +12 -0
- data/lib/etl/transform/sha1_transform.rb +13 -0
- data/lib/etl/transform/string_to_date_transform.rb +16 -0
- data/lib/etl/transform/string_to_datetime_transform.rb +14 -0
- data/lib/etl/transform/string_to_time_transform.rb +11 -0
- data/lib/etl/transform/transform.rb +61 -0
- data/lib/etl/transform/trim_transform.rb +26 -0
- data/lib/etl/transform/type_transform.rb +35 -0
- data/lib/etl/util.rb +59 -0
- data/lib/etl/version.rb +9 -0
- data/test/.ignore +2 -0
- data/test/all.ebf +6 -0
- data/test/apache_combined_log.ctl +11 -0
- data/test/batch_test.rb +41 -0
- data/test/batch_with_error.ebf +6 -0
- data/test/batched1.ctl +0 -0
- data/test/batched2.ctl +0 -0
- data/test/block_processor.ctl +6 -0
- data/test/block_processor_error.ctl +1 -0
- data/test/block_processor_pre_post_process.ctl +4 -0
- data/test/block_processor_remove_rows.ctl +5 -0
- data/test/block_processor_test.rb +38 -0
- data/test/connection/native_mysql/connection.rb +9 -0
- data/test/connection/native_mysql/schema.sql +36 -0
- data/test/connection/postgresql/connection.rb +13 -0
- data/test/connection/postgresql/schema.sql +43 -0
- data/test/control_test.rb +43 -0
- data/test/data/apache_combined_log.txt +3 -0
- data/test/data/bulk_import.txt +3 -0
- data/test/data/bulk_import_with_empties.txt +3 -0
- data/test/data/decode.txt +3 -0
- data/test/data/delimited.txt +3 -0
- data/test/data/encode_source_latin1.txt +2 -0
- data/test/data/fixed_width.txt +3 -0
- data/test/data/multiple_delimited_1.txt +3 -0
- data/test/data/multiple_delimited_2.txt +3 -0
- data/test/data/people.txt +3 -0
- data/test/data/sax.xml +14 -0
- data/test/data/xml.xml +16 -0
- data/test/database.example.yml +18 -0
- data/test/database.mysql.yml +18 -0
- data/test/database.postgres.yml +18 -0
- data/test/database.yml +18 -0
- data/test/date_dimension_builder_test.rb +96 -0
- data/test/delimited.ctl +30 -0
- data/test/delimited_absolute.ctl +33 -0
- data/test/delimited_destination_db.ctl +25 -0
- data/test/delimited_with_bulk_load.ctl +34 -0
- data/test/destination_test.rb +171 -0
- data/test/directive_test.rb +23 -0
- data/test/encode_processor_test.rb +31 -0
- data/test/engine_test.rb +32 -0
- data/test/errors.ctl +24 -0
- data/test/etl_test.rb +42 -0
- data/test/fixed_width.ctl +35 -0
- data/test/generator_test.rb +14 -0
- data/test/inline_parser.ctl +17 -0
- data/test/mocks/mock_destination.rb +26 -0
- data/test/mocks/mock_source.rb +25 -0
- data/test/model_source.ctl +14 -0
- data/test/multiple_delimited.ctl +22 -0
- data/test/multiple_source_delimited.ctl +39 -0
- data/test/parser_test.rb +200 -0
- data/test/performance/delimited.ctl +30 -0
- data/test/processor_test.rb +38 -0
- data/test/row_processor_test.rb +17 -0
- data/test/sax.ctl +26 -0
- data/test/scd/1.txt +1 -0
- data/test/scd/2.txt +1 -0
- data/test/scd/3.txt +1 -0
- data/test/scd_test.rb +263 -0
- data/test/scd_test_type_1.ctl +43 -0
- data/test/scd_test_type_2.ctl +42 -0
- data/test/screen_test.rb +9 -0
- data/test/screen_test_error.ctl +3 -0
- data/test/screen_test_fatal.ctl +3 -0
- data/test/source_test.rb +139 -0
- data/test/test_helper.rb +33 -0
- data/test/transform_test.rb +101 -0
- data/test/xml.ctl +31 -0
- metadata +237 -0
data/TODO
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
TODO
|
2
|
+
|
3
|
+
* Add build-in support for audit_dimension
|
4
|
+
* Do not rerun the processing if it isn't needed, i.e. the source and control files have not been modified (allow forced override)
|
5
|
+
* Provide greater control in error handling
|
6
|
+
** Allow a error threshold
|
7
|
+
** Don't die completely if a parse error, just stop processing that specific file if error threshold is reached
|
8
|
+
** Allow mismatch row length error in delimited parser to be ignored
|
9
|
+
* Improve error messages throughout, but especially in problems with the control files
|
10
|
+
* Add support for paritioned views during the insert process. Use specifiable columns as the trigger columns for determining the data output destination.
|
11
|
+
* Check if a temp table exists and the last job run was successful, in which case skip during the current run
|
12
|
+
* Create models for each of the tables in each of the databases defined in ETL::Engine.connections
|
13
|
+
|
14
|
+
Audit Record
|
15
|
+
|
16
|
+
Process-Level
|
17
|
+
* Start Time
|
18
|
+
* End Time
|
19
|
+
* (Duration)
|
20
|
+
* Rows Read
|
21
|
+
* Rows Written
|
22
|
+
* Rows Rejected
|
23
|
+
* Errors
|
24
|
+
* Destination
|
25
|
+
Record-Level
|
26
|
+
* Source
|
27
|
+
* Timestamp
|
28
|
+
* Transformation Log
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.9.2
|
@@ -0,0 +1,78 @@
|
|
1
|
+
Index: lib/active_support/clean_logger.rb
|
2
|
+
===================================================================
|
3
|
+
--- lib/active_support/clean_logger.rb (revision 5963)
|
4
|
+
+++ lib/active_support/clean_logger.rb (working copy)
|
5
|
+
@@ -1,10 +1,21 @@
|
6
|
+
require 'logger'
|
7
|
+
require File.dirname(__FILE__) + '/core_ext/class/attribute_accessors'
|
8
|
+
|
9
|
+
-class Logger #:nodoc:
|
10
|
+
+# Extensions to the built in Ruby logger.
|
11
|
+
+#
|
12
|
+
+# If you want to use the default log formatter as defined in the Ruby core, then you
|
13
|
+
+# will need to set the formatter for the logger as in:
|
14
|
+
+#
|
15
|
+
+# logger.formatter = Formatter.new
|
16
|
+
+#
|
17
|
+
+# You can then specify the datetime format, for example:
|
18
|
+
+#
|
19
|
+
+# logger.datetime_format = "%Y-%m-%d"
|
20
|
+
+class Logger
|
21
|
+
+ # Set to false to disable the silencer
|
22
|
+
cattr_accessor :silencer
|
23
|
+
self.silencer = true
|
24
|
+
-
|
25
|
+
+
|
26
|
+
# Silences the logger for the duration of the block.
|
27
|
+
def silence(temporary_level = Logger::ERROR)
|
28
|
+
if silencer
|
29
|
+
@@ -18,6 +29,35 @@
|
30
|
+
yield self
|
31
|
+
end
|
32
|
+
end
|
33
|
+
+
|
34
|
+
+ alias :old_datetime_format= :datetime_format=
|
35
|
+
+ # Logging date-time format (string passed to +strftime+). Ignored if the formatter
|
36
|
+
+ # does not respond to datetime_format=.
|
37
|
+
+ def datetime_format=(datetime_format)
|
38
|
+
+ formatter.datetime_format = datetime_format if formatter.respond_to?(:datetime_format=)
|
39
|
+
+ end
|
40
|
+
+
|
41
|
+
+ alias :old_datetime_format :datetime_format
|
42
|
+
+ # Get the logging datetime format. Returns nil if the formatter does not support
|
43
|
+
+ # datetime formatting.
|
44
|
+
+ def datetime_format
|
45
|
+
+ formatter.datetime_format if formatter.respond_to?(:datetime_format)
|
46
|
+
+ end
|
47
|
+
+
|
48
|
+
+ alias :old_formatter :formatter
|
49
|
+
+ # Get the current formatter. The default formatter is a SimpleFormatter which only
|
50
|
+
+ # displays the log message
|
51
|
+
+ def formatter
|
52
|
+
+ @formatter ||= SimpleFormatter.new
|
53
|
+
+ end
|
54
|
+
+
|
55
|
+
+ # Simple formatter which only displays the message.
|
56
|
+
+ class SimpleFormatter < Logger::Formatter
|
57
|
+
+ # This method is invoked when a log event occurs
|
58
|
+
+ def call(severity, timestamp, progname, msg)
|
59
|
+
+ "#{msg}\n"
|
60
|
+
+ end
|
61
|
+
+ end
|
62
|
+
|
63
|
+
private
|
64
|
+
alias old_format_message format_message
|
65
|
+
@@ -28,11 +68,11 @@
|
66
|
+
# with Logger from 1.8.3 and vice versa.
|
67
|
+
if method_defined?(:formatter=)
|
68
|
+
def format_message(severity, timestamp, progname, msg)
|
69
|
+
- "#{msg}\n"
|
70
|
+
+ formatter.call(severity, timestamp, progname, msg)
|
71
|
+
end
|
72
|
+
else
|
73
|
+
def format_message(severity, timestamp, msg, progname)
|
74
|
+
- "#{msg}\n"
|
75
|
+
+ formatter.call(severity, timestamp, progname, msg)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,221 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{balinterdi-activewarehouse-etl}
|
8
|
+
s.version = "0.9.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Anthony Eden", "Balint Erdi"]
|
12
|
+
s.date = %q{2009-10-14}
|
13
|
+
s.description = %q{ ActiveWarehouse ETL is a pure Ruby Extract-Transform-Load application for loading data into a database.
|
14
|
+
}
|
15
|
+
s.email = %q{balint.erdi@gmail.com}
|
16
|
+
s.executables = ["etl", "etl.cmd"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE",
|
19
|
+
"README"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".gitignore",
|
23
|
+
"0.9-UPGRADE",
|
24
|
+
"CHANGELOG",
|
25
|
+
"HOW_TO_RELEASE",
|
26
|
+
"LICENSE",
|
27
|
+
"README",
|
28
|
+
"Rakefile",
|
29
|
+
"TODO",
|
30
|
+
"VERSION",
|
31
|
+
"active_support_logger.patch",
|
32
|
+
"balinterdi-activewarehouse-etl.gemspec",
|
33
|
+
"bin/etl",
|
34
|
+
"bin/etl.cmd",
|
35
|
+
"examples/database.example.yml",
|
36
|
+
"lib/etl.rb",
|
37
|
+
"lib/etl/batch.rb",
|
38
|
+
"lib/etl/batch/batch.rb",
|
39
|
+
"lib/etl/batch/directives.rb",
|
40
|
+
"lib/etl/builder.rb",
|
41
|
+
"lib/etl/builder/date_dimension_builder.rb",
|
42
|
+
"lib/etl/builder/time_dimension_builder.rb",
|
43
|
+
"lib/etl/commands/etl.rb",
|
44
|
+
"lib/etl/control.rb",
|
45
|
+
"lib/etl/control/control.rb",
|
46
|
+
"lib/etl/control/destination.rb",
|
47
|
+
"lib/etl/control/destination/database_destination.rb",
|
48
|
+
"lib/etl/control/destination/file_destination.rb",
|
49
|
+
"lib/etl/control/source.rb",
|
50
|
+
"lib/etl/control/source/database_source.rb",
|
51
|
+
"lib/etl/control/source/enumerable_source.rb",
|
52
|
+
"lib/etl/control/source/file_source.rb",
|
53
|
+
"lib/etl/control/source/model_source.rb",
|
54
|
+
"lib/etl/core_ext.rb",
|
55
|
+
"lib/etl/core_ext/time.rb",
|
56
|
+
"lib/etl/core_ext/time/calculations.rb",
|
57
|
+
"lib/etl/engine.rb",
|
58
|
+
"lib/etl/execution.rb",
|
59
|
+
"lib/etl/execution/base.rb",
|
60
|
+
"lib/etl/execution/batch.rb",
|
61
|
+
"lib/etl/execution/job.rb",
|
62
|
+
"lib/etl/execution/migration.rb",
|
63
|
+
"lib/etl/generator.rb",
|
64
|
+
"lib/etl/generator/generator.rb",
|
65
|
+
"lib/etl/generator/surrogate_key_generator.rb",
|
66
|
+
"lib/etl/http_tools.rb",
|
67
|
+
"lib/etl/parser.rb",
|
68
|
+
"lib/etl/parser/apache_combined_log_parser.rb",
|
69
|
+
"lib/etl/parser/delimited_parser.rb",
|
70
|
+
"lib/etl/parser/fixed_width_parser.rb",
|
71
|
+
"lib/etl/parser/parser.rb",
|
72
|
+
"lib/etl/parser/sax_parser.rb",
|
73
|
+
"lib/etl/parser/xml_parser.rb",
|
74
|
+
"lib/etl/processor.rb",
|
75
|
+
"lib/etl/processor/block_processor.rb",
|
76
|
+
"lib/etl/processor/bulk_import_processor.rb",
|
77
|
+
"lib/etl/processor/check_exist_processor.rb",
|
78
|
+
"lib/etl/processor/check_unique_processor.rb",
|
79
|
+
"lib/etl/processor/copy_field_processor.rb",
|
80
|
+
"lib/etl/processor/encode_processor.rb",
|
81
|
+
"lib/etl/processor/hierarchy_exploder_processor.rb",
|
82
|
+
"lib/etl/processor/print_row_processor.rb",
|
83
|
+
"lib/etl/processor/processor.rb",
|
84
|
+
"lib/etl/processor/rename_processor.rb",
|
85
|
+
"lib/etl/processor/require_non_blank_processor.rb",
|
86
|
+
"lib/etl/processor/row_processor.rb",
|
87
|
+
"lib/etl/processor/sequence_processor.rb",
|
88
|
+
"lib/etl/processor/surrogate_key_processor.rb",
|
89
|
+
"lib/etl/processor/truncate_processor.rb",
|
90
|
+
"lib/etl/row.rb",
|
91
|
+
"lib/etl/screen.rb",
|
92
|
+
"lib/etl/screen/row_count_screen.rb",
|
93
|
+
"lib/etl/transform.rb",
|
94
|
+
"lib/etl/transform/block_transform.rb",
|
95
|
+
"lib/etl/transform/date_to_string_transform.rb",
|
96
|
+
"lib/etl/transform/decode_transform.rb",
|
97
|
+
"lib/etl/transform/default_transform.rb",
|
98
|
+
"lib/etl/transform/foreign_key_lookup_transform.rb",
|
99
|
+
"lib/etl/transform/hierarchy_lookup_transform.rb",
|
100
|
+
"lib/etl/transform/ordinalize_transform.rb",
|
101
|
+
"lib/etl/transform/sha1_transform.rb",
|
102
|
+
"lib/etl/transform/string_to_date_transform.rb",
|
103
|
+
"lib/etl/transform/string_to_datetime_transform.rb",
|
104
|
+
"lib/etl/transform/string_to_time_transform.rb",
|
105
|
+
"lib/etl/transform/transform.rb",
|
106
|
+
"lib/etl/transform/trim_transform.rb",
|
107
|
+
"lib/etl/transform/type_transform.rb",
|
108
|
+
"lib/etl/util.rb",
|
109
|
+
"lib/etl/version.rb",
|
110
|
+
"test/.ignore",
|
111
|
+
"test/all.ebf",
|
112
|
+
"test/apache_combined_log.ctl",
|
113
|
+
"test/batch_test.rb",
|
114
|
+
"test/batch_with_error.ebf",
|
115
|
+
"test/batched1.ctl",
|
116
|
+
"test/batched2.ctl",
|
117
|
+
"test/block_processor.ctl",
|
118
|
+
"test/block_processor_error.ctl",
|
119
|
+
"test/block_processor_pre_post_process.ctl",
|
120
|
+
"test/block_processor_remove_rows.ctl",
|
121
|
+
"test/block_processor_test.rb",
|
122
|
+
"test/connection/native_mysql/connection.rb",
|
123
|
+
"test/connection/native_mysql/schema.sql",
|
124
|
+
"test/connection/postgresql/connection.rb",
|
125
|
+
"test/connection/postgresql/schema.sql",
|
126
|
+
"test/control_test.rb",
|
127
|
+
"test/data/apache_combined_log.txt",
|
128
|
+
"test/data/bulk_import.txt",
|
129
|
+
"test/data/bulk_import_with_empties.txt",
|
130
|
+
"test/data/decode.txt",
|
131
|
+
"test/data/delimited.txt",
|
132
|
+
"test/data/encode_source_latin1.txt",
|
133
|
+
"test/data/fixed_width.txt",
|
134
|
+
"test/data/multiple_delimited_1.txt",
|
135
|
+
"test/data/multiple_delimited_2.txt",
|
136
|
+
"test/data/people.txt",
|
137
|
+
"test/data/sax.xml",
|
138
|
+
"test/data/xml.xml",
|
139
|
+
"test/database.example.yml",
|
140
|
+
"test/database.mysql.yml",
|
141
|
+
"test/database.postgres.yml",
|
142
|
+
"test/database.yml",
|
143
|
+
"test/date_dimension_builder_test.rb",
|
144
|
+
"test/delimited.ctl",
|
145
|
+
"test/delimited_absolute.ctl",
|
146
|
+
"test/delimited_destination_db.ctl",
|
147
|
+
"test/delimited_with_bulk_load.ctl",
|
148
|
+
"test/destination_test.rb",
|
149
|
+
"test/directive_test.rb",
|
150
|
+
"test/encode_processor_test.rb",
|
151
|
+
"test/engine_test.rb",
|
152
|
+
"test/errors.ctl",
|
153
|
+
"test/etl_test.rb",
|
154
|
+
"test/fixed_width.ctl",
|
155
|
+
"test/generator_test.rb",
|
156
|
+
"test/inline_parser.ctl",
|
157
|
+
"test/mocks/mock_destination.rb",
|
158
|
+
"test/mocks/mock_source.rb",
|
159
|
+
"test/model_source.ctl",
|
160
|
+
"test/multiple_delimited.ctl",
|
161
|
+
"test/multiple_source_delimited.ctl",
|
162
|
+
"test/output/.ignore",
|
163
|
+
"test/parser_test.rb",
|
164
|
+
"test/performance/delimited.ctl",
|
165
|
+
"test/processor_test.rb",
|
166
|
+
"test/row_processor_test.rb",
|
167
|
+
"test/sax.ctl",
|
168
|
+
"test/scd/1.txt",
|
169
|
+
"test/scd/2.txt",
|
170
|
+
"test/scd/3.txt",
|
171
|
+
"test/scd_test.rb",
|
172
|
+
"test/scd_test_type_1.ctl",
|
173
|
+
"test/scd_test_type_2.ctl",
|
174
|
+
"test/screen_test.rb",
|
175
|
+
"test/screen_test_error.ctl",
|
176
|
+
"test/screen_test_fatal.ctl",
|
177
|
+
"test/source_test.rb",
|
178
|
+
"test/test_helper.rb",
|
179
|
+
"test/transform_test.rb",
|
180
|
+
"test/xml.ctl"
|
181
|
+
]
|
182
|
+
s.homepage = %q{http://github.com/balinterdi/activewarehouse-etl}
|
183
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
184
|
+
s.require_paths = ["lib"]
|
185
|
+
s.rubygems_version = %q{1.3.5}
|
186
|
+
s.summary = %q{ActiveWarehouse ETL}
|
187
|
+
s.test_files = [
|
188
|
+
"test/batch_test.rb",
|
189
|
+
"test/block_processor_test.rb",
|
190
|
+
"test/connection/native_mysql/connection.rb",
|
191
|
+
"test/connection/postgresql/connection.rb",
|
192
|
+
"test/control_test.rb",
|
193
|
+
"test/date_dimension_builder_test.rb",
|
194
|
+
"test/destination_test.rb",
|
195
|
+
"test/directive_test.rb",
|
196
|
+
"test/encode_processor_test.rb",
|
197
|
+
"test/engine_test.rb",
|
198
|
+
"test/etl_test.rb",
|
199
|
+
"test/generator_test.rb",
|
200
|
+
"test/mocks/mock_destination.rb",
|
201
|
+
"test/mocks/mock_source.rb",
|
202
|
+
"test/parser_test.rb",
|
203
|
+
"test/processor_test.rb",
|
204
|
+
"test/row_processor_test.rb",
|
205
|
+
"test/scd_test.rb",
|
206
|
+
"test/screen_test.rb",
|
207
|
+
"test/source_test.rb",
|
208
|
+
"test/test_helper.rb",
|
209
|
+
"test/transform_test.rb"
|
210
|
+
]
|
211
|
+
|
212
|
+
if s.respond_to? :specification_version then
|
213
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
214
|
+
s.specification_version = 3
|
215
|
+
|
216
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
217
|
+
else
|
218
|
+
end
|
219
|
+
else
|
220
|
+
end
|
221
|
+
end
|
data/bin/etl
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
#--
|
4
|
+
# Copyright (c) 2006 Anthony Eden
|
5
|
+
#
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
7
|
+
# a copy of this software and associated documentation files (the
|
8
|
+
# "Software"), to deal in the Software without restriction, including
|
9
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
10
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
11
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
12
|
+
# the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be
|
15
|
+
# included in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
19
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
21
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
22
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
23
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
#++
|
25
|
+
|
26
|
+
$:.unshift(File.dirname(__FILE__) + '/../lib/')
|
27
|
+
require 'etl'
|
28
|
+
require 'etl/commands/etl'
|
data/bin/etl.cmd
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
@echo off
|
2
|
+
|
3
|
+
rem The purpose of this Windows script is to let you use the etl command line with a non-gem version of AW-ETL (eg: unpacked gem, pistoned trunk).
|
4
|
+
rem Just add the current folder on top of your PATH variable to use it instead of the etl command provided with the gem release.
|
5
|
+
|
6
|
+
rem %~dp0 returns the absolute path where the current script is. We just append 'etl' to it, and forward all the arguments with %*
|
7
|
+
|
8
|
+
ruby "%~dp0etl" %*
|
@@ -0,0 +1,16 @@
|
|
1
|
+
etl_execution:
|
2
|
+
adapter: mysql
|
3
|
+
username: root
|
4
|
+
host: localhost
|
5
|
+
database: etl_execution
|
6
|
+
encoding: utf8
|
7
|
+
datawarehouse:
|
8
|
+
adapter: mysql
|
9
|
+
username: root
|
10
|
+
host: localhost
|
11
|
+
database: datawarehouse_development
|
12
|
+
operational:
|
13
|
+
adapter: mysql
|
14
|
+
username: root
|
15
|
+
host: localhost
|
16
|
+
database: operational_production
|
data/lib/etl.rb
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
# This source file requires all of the necessary gems and source files for ActiveWarehouse ETL. If you
|
2
|
+
# load this source file all of the other required files and gems will also be brought into the
|
3
|
+
# runtime.
|
4
|
+
|
5
|
+
#--
|
6
|
+
# Copyright (c) 2006-2007 Anthony Eden
|
7
|
+
#
|
8
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
9
|
+
# a copy of this software and associated documentation files (the
|
10
|
+
# "Software"), to deal in the Software without restriction, including
|
11
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
12
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
13
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
14
|
+
# the following conditions:
|
15
|
+
#
|
16
|
+
# The above copyright notice and this permission notice shall be
|
17
|
+
# included in all copies or substantial portions of the Software.
|
18
|
+
#
|
19
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
20
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
21
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
22
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
23
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
24
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
25
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
26
|
+
#++
|
27
|
+
|
28
|
+
require 'logger'
|
29
|
+
require 'yaml'
|
30
|
+
require 'erb'
|
31
|
+
|
32
|
+
require 'rubygems'
|
33
|
+
|
34
|
+
unless defined?(REXML::VERSION)
|
35
|
+
require 'rexml/rexml'
|
36
|
+
REXML::VERSION = REXML::Version
|
37
|
+
end
|
38
|
+
|
39
|
+
require 'active_support'
|
40
|
+
require 'active_record'
|
41
|
+
require 'adapter_extensions'
|
42
|
+
require 'faster_csv'
|
43
|
+
|
44
|
+
$:.unshift(File.dirname(__FILE__))
|
45
|
+
|
46
|
+
require 'etl/core_ext'
|
47
|
+
require 'etl/util'
|
48
|
+
require 'etl/http_tools'
|
49
|
+
require 'etl/builder'
|
50
|
+
require 'etl/version'
|
51
|
+
require 'etl/engine'
|
52
|
+
require 'etl/control'
|
53
|
+
require 'etl/batch'
|
54
|
+
require 'etl/row'
|
55
|
+
require 'etl/parser'
|
56
|
+
require 'etl/transform'
|
57
|
+
require 'etl/processor'
|
58
|
+
require 'etl/generator'
|
59
|
+
require 'etl/screen'
|
60
|
+
|
61
|
+
module ETL #:nodoc:
|
62
|
+
class ETLError < StandardError #:nodoc:
|
63
|
+
end
|
64
|
+
class ControlError < ETLError #:nodoc:
|
65
|
+
end
|
66
|
+
class DefinitionError < ControlError #:nodoc:
|
67
|
+
end
|
68
|
+
class ConfigurationError < ControlError #:nodoc:
|
69
|
+
end
|
70
|
+
class MismatchError < ETLError #:nodoc:
|
71
|
+
end
|
72
|
+
class ResolverError < ETLError #:nodoc:
|
73
|
+
end
|
74
|
+
class ScreenError < ETLError #:nodoc:
|
75
|
+
end
|
76
|
+
class FatalScreenError < ScreenError #:nodoc:
|
77
|
+
end
|
78
|
+
end
|