gd_bam 0.1.3 → 0.1.5

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.
@@ -9,9 +9,13 @@ module GoodData
9
9
 
10
10
  def self.generate(home, params={})
11
11
 
12
- project = GoodData::Bam::Project.build_project(params)
12
+ project = GoodData::Bam::Project.build_project(home, params)
13
13
  fail "There are no flows to generate from" if project[:flows].empty?
14
14
 
15
+ params = params.merge({
16
+ :home => home
17
+ })
18
+
15
19
  v = Compiler::EtlVisitor.new
16
20
  v.visit(project, params)
17
21
 
@@ -132,8 +132,10 @@ function integer transform() {
132
132
  // Transforms input record into output record.
133
133
  function integer transform() {
134
134
  $out.0.* = $in.0.*;
135
-
136
- $out.0.CreatedDate = left($in.0.CreatedDate, 10);
135
+
136
+ if ($in.0.CreatedDate != null) {
137
+ $out.0.CreatedDate = left($in.0.CreatedDate, 10);
138
+ }
137
139
 
138
140
  return ALL;
139
141
  }
@@ -88,7 +88,7 @@ function integer transform() {
88
88
  previous.Duration = 0;
89
89
  }
90
90
 
91
- if (previous.Id == $in.0.Id) {
91
+ if (previous.Id == $in.0.Id && $in.0.Id != null) {
92
92
  previous.Duration = (date2long(str2date($in.0.Snapshot, 'yyyy-MM-dd')) - date2long(str2date(previous.Snapshot, 'yyyy-MM-dd'))) / 3600 / 24 / 1000;
93
93
 
94
94
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gd_bam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-02 00:00:00.000000000 Z
12
+ date: 2013-07-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -324,6 +324,7 @@ extra_rdoc_files:
324
324
  - README.md
325
325
  files:
326
326
  - bin/bam
327
+ - bin/bam.orig
327
328
  - lib/bam/version.rb
328
329
  - lib/bam.rb
329
330
  - lib/base/errors.rb
@@ -354,6 +355,7 @@ files:
354
355
  - lib/compiler/etl_visitor.rb
355
356
  - lib/dsl/dsl.rb
356
357
  - lib/generators/downloaders.rb
358
+ - lib/generators/downloaders.rb.orig
357
359
  - lib/generators/etl.rb
358
360
  - lib/generators/validators.rb
359
361
  - lib/graphs/docentize.grf