activewarehouse-etl 0.2.0 → 0.3.0
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 +11 -1
- data/lib/etl/control/destination.rb +0 -1
- data/lib/etl/control/destination/file_destination.rb +4 -0
- data/lib/etl/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,2 +1,12 @@
|
|
1
1
|
0.1.0 - Dec 6, 2006
|
2
|
-
* Initial release
|
2
|
+
* Initial release
|
3
|
+
|
4
|
+
0.2.0 - Dec 7, 2006
|
5
|
+
* Added an XML parser for source parsing
|
6
|
+
* Added support for compound key constraints in destinations via the :unique => [] option
|
7
|
+
* Added ability to declare explicit columns in bulk import
|
8
|
+
* Added support for generators in destinations
|
9
|
+
* Added a SurrogateKeyGenerator for cases where the database doesn't support auto generated surrogate keys
|
10
|
+
|
11
|
+
0.3.0
|
12
|
+
* Added support for calculated values in virtual fields with Proc
|
@@ -30,6 +30,7 @@ module ETL #:nodoc:
|
|
30
30
|
|
31
31
|
# Flush the destination buffer
|
32
32
|
def flush
|
33
|
+
# Engine.logger.debug "Flushing buffer #{buffer}"
|
33
34
|
buffer.each do |row|
|
34
35
|
# check to see if this row's compound key constraint already exists
|
35
36
|
# note that the compound key constraint may not utilize virtual fields
|
@@ -84,10 +85,13 @@ module ETL #:nodoc:
|
|
84
85
|
def add_virtuals!(row)
|
85
86
|
if mapping[:virtual]
|
86
87
|
mapping[:virtual].each do |key,value|
|
88
|
+
# Engine.logger.debug "Mapping virtual #{key}/#{value} for row #{row}"
|
87
89
|
case value
|
88
90
|
when Symbol
|
89
91
|
generators[key] ||= ETL::Generator::Generator.class_for_name(value).new
|
90
92
|
row[key] = generators[key].next
|
93
|
+
when Proc
|
94
|
+
row[key] = value.call(row)
|
91
95
|
else
|
92
96
|
row[key] = value
|
93
97
|
end
|
data/lib/etl/version.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: activewarehouse-etl
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2006-12-
|
6
|
+
version: 0.3.0
|
7
|
+
date: 2006-12-08 00:00:00 -05:00
|
8
8
|
summary: Pure Ruby ETL package.
|
9
9
|
require_paths:
|
10
10
|
- lib
|