activewarehouse-etl 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -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, :table
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
- @file = File.join(File.dirname(control.file), configuration[:file])
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
@@ -2,7 +2,7 @@ module ETL#:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 5
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
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.0
7
- date: 2007-02-17 00:00:00 -05:00
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