activewarehouse-etl 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +6 -2
- data/lib/etl/control/control.rb +2 -2
- data/lib/etl/processor/truncate_processor.rb +10 -3
- data/lib/etl/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
* Added :truncate option for database destination. Set to true to truncate before importing data.
|
18
18
|
* Added support for :unique => [] option and virtual fields for the database destination
|
19
19
|
|
20
|
-
0.5.0 -
|
20
|
+
0.5.0 - Feb 17, 2007
|
21
21
|
* Changed require_gem to gem and added alias to allow for older versions of rubygems
|
22
22
|
* Added support for Hash in the source configuration where :name => :parser_name defines the parser to use and
|
23
23
|
:options => {} defines options to pass to the parser
|
@@ -27,4 +27,8 @@
|
|
27
27
|
* Implemented foreign_key_lookup transform including an ActiveRecordResolver
|
28
28
|
* Added real time activity logging which is called when the etl bin script is invoked
|
29
29
|
* Improved error handling
|
30
|
-
* Default logger level is now WARN
|
30
|
+
* Default logger level is now WARN
|
31
|
+
|
32
|
+
0.5.1 - Feb 18, 2007
|
33
|
+
* Fixed up truncate processor
|
34
|
+
* Updated HOW_TO_RELEASE doc
|
data/lib/etl/control/control.rb
CHANGED
@@ -74,8 +74,8 @@ module ETL #:nodoc:
|
|
74
74
|
begin
|
75
75
|
processor_class = ETL::Processor.const_get(class_name)
|
76
76
|
pre_processors << processor_class.new(self, configuration)
|
77
|
-
rescue NameError
|
78
|
-
raise ControlError, "Unable to find preprocessor #{class_name}"
|
77
|
+
rescue NameError => e
|
78
|
+
raise ControlError, "Unable to find preprocessor #{class_name}: #{e}"
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
@@ -3,16 +3,23 @@ module ETL #:nodoc:
|
|
3
3
|
# A processor which will truncate a table. Use as a pre-processor for cleaning out a table
|
4
4
|
# prior to loading
|
5
5
|
class TruncateProcessor < ETL::Processor::Processor
|
6
|
-
attr_reader :file
|
6
|
+
#attr_reader :file
|
7
|
+
|
8
|
+
# Defines the table to truncate
|
9
|
+
attr_reader :table
|
10
|
+
|
11
|
+
# Defines the database connection information
|
12
|
+
attr_reader :target
|
7
13
|
def initialize(control, configuration)
|
8
14
|
super
|
9
|
-
|
15
|
+
#@file = File.join(File.dirname(control.file), configuration[:file])
|
16
|
+
@target = configuration[:target] || {}
|
10
17
|
@table = configuration[:table]
|
11
18
|
connect
|
12
19
|
end
|
13
20
|
def process
|
14
21
|
conn = ETL::ActiveRecord::Base.connection
|
15
|
-
conn.truncate
|
22
|
+
conn.truncate(table)
|
16
23
|
end
|
17
24
|
|
18
25
|
# Connect to the database
|
data/lib/etl/version.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0.10
|
|
3
3
|
specification_version: 1
|
4
4
|
name: activewarehouse-etl
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.5.
|
7
|
-
date: 2007-02-
|
6
|
+
version: 0.5.1
|
7
|
+
date: 2007-02-18 00:00:00 -05:00
|
8
8
|
summary: Pure Ruby ETL package.
|
9
9
|
require_paths:
|
10
10
|
- lib
|