gooddata_datawarehouse 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4df42b6be9975a0f86aa383914db372e5ca91361
4
- data.tar.gz: e13dd331a4a0c9dd0e817def626b70fa0959d4d5
2
+ SHA256:
3
+ metadata.gz: bbb47425e959803a032aadd5eafa8b1b40c0ba1695648a49c8c3bed737be40b2
4
+ data.tar.gz: c81839b299f2c9cab6a5cced6fa403e7edd9f287fa05d02aa5d23c52139dd9ae
5
5
  SHA512:
6
- metadata.gz: e1bc334616cb41069cbc6cbd9aac87dd7ec48e55b3c9ae25e38cd9941ef60924d523bee6b816cecd78fde0951295571659821fe627f9a4ace273264b275c88f4
7
- data.tar.gz: f8dffb2a551d20e4a577de3fa7780b1f69898a33889b3128e54623b16a9aabed5964ab04a76c3ab9a264933e6984f837b22a2b205af78faf8ac967197419d22a
6
+ metadata.gz: 5225c46a79009619c6eaab6651d3d8f3d5f636572daa1db6ab9a27240a78e85bb77d7312957b89733da5df1a784c48fe7acb81f5ee5d2fdb1e625c43c4b3945d
7
+ data.tar.gz: 9eaf09fb89d312a544f33d357505ce95b44c3f5a1068ecce6a4dbbe80e06a99b2442050678976d866f6ea4023f452cd66d0fb19bc9cb725751ab55b47ec49f76
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # automatic ruby preselection
4
- #ruby=jruby-1.7.15
4
+ #ruby=jruby-9.1.14
5
5
 
6
6
  # Specify your gem's dependencies in gooddata_datawarehouse.gemspec
7
7
  gemspec
data/README.md CHANGED
@@ -48,7 +48,7 @@ dwh = GoodData::Datawarehouse.new('you@gooddata.com', 'yourpass', 'your ADS inst
48
48
  # E.g. for datawarehouse https://secure.gooddata.com/gdc/datawarehouse/instances/d4979ac54df8afb7b5192b0086de6270
49
49
  # the instance id is d4979ac54df8afb7b5192b0086de6270
50
50
  # for custom jdbc url do:
51
- # dwh = GoodData::Datawarehouse.new('you@gooddata.com', 'yourpass', nil, 'jdbc:dss://whatever.com/something')
51
+ # dwh = GoodData::Datawarehouse.new('you@gooddata.com', 'yourpass', nil, :jdbc_url => 'jdbc:dss://whatever.com/something')
52
52
 
53
53
  # import a csv
54
54
  dwh.csv_to_new_table('my_table', 'path/to/my.csv')
@@ -24,11 +24,11 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 1.7"
26
26
  spec.add_development_dependency "rake", "~> 10.3"
27
- spec.add_development_dependency 'rspec', '~>2.14'
27
+ spec.add_development_dependency 'rspec', '~>3.8'
28
28
  spec.add_development_dependency 'pry', '~> 0.9'
29
29
  spec.add_development_dependency 'coveralls', '~> 0.7', '>= 0.7.0'
30
30
 
31
31
  spec.add_dependency "sequel", "~> 4.17"
32
- spec.add_dependency "gooddata-dss-jdbc", "~> 0.1"
32
+ spec.add_dependency "gooddata-dss-jdbc", "~> 0.2.4"
33
33
  spec.add_dependency "pmap", "~> 1.0"
34
34
  end
@@ -14,7 +14,7 @@ module GoodData
14
14
  @logger = Logger.new(STDOUT)
15
15
  @username = username
16
16
  @password = password
17
- @jdbc_url = opts[:jdbc_url] || "jdbc:dss://secure.gooddata.com/gdc/dss/instances/#{instance_id}"
17
+ @jdbc_url = opts[:jdbc_url] || "jdbc:gdc:datawarehouse://secure.gooddata.com/gdc/datawarehouse/instances/#{instance_id}"
18
18
  if @username.nil? || @password.nil?
19
19
  fail ArgumentError, "username and/or password are nil. All of them are mandatory."
20
20
  end
@@ -81,28 +81,30 @@ module GoodData
81
81
 
82
82
  # load each csv from the list
83
83
  single_file = (csv_list.size == 1)
84
- csv_list.peach(thread_count) do |csv_path|
85
- if opts[:ignore_parse_errors] && opts[:exceptions_file].nil? && opts[:rejections_file].nil?
86
- exc = nil
87
- rej = nil
88
- opts_file = opts
89
- else
90
- opts_file = opts.clone
91
- # priradit do opts i do exc -
92
- # temporary files to get the excepted records (if not given)
93
- exc = opts_file[:exceptions_file] = init_file(opts_file[:exceptions_file], 'exceptions', csv_path, single_file)
94
- rej = opts_file[:rejections_file] = init_file(opts_file[:rejections_file], 'rejections', csv_path, single_file)
95
- end
96
-
97
- # execute the load
98
- execute(GoodData::SQLGenerator.load_data(table_name, csv_path, columns, opts_file))
84
+ csv_list.each do |csv_path|
85
+ begin
86
+ if opts[:ignore_parse_errors] && opts[:exceptions_file].nil? && opts[:rejections_file].nil?
87
+ exc = nil
88
+ rej = nil
89
+ opts_file = opts
90
+ else
91
+ opts_file = opts.clone
92
+ # priradit do opts i do exc -
93
+ # temporary files to get the excepted records (if not given)
94
+ exc = opts_file[:exceptions_file] = init_file(opts_file[:exceptions_file], 'exceptions', csv_path, single_file)
95
+ rej = opts_file[:rejections_file] = init_file(opts_file[:rejections_file], 'rejections', csv_path, single_file)
96
+ end
99
97
 
100
- exc.close if exc
101
- rej.close if rej
98
+ # execute the load
99
+ execute(GoodData::SQLGenerator.load_data(table_name, csv_path, columns, opts_file))
102
100
 
103
- # if there was something rejected and it shouldn't be ignored, raise an error
104
- if ((exc && File.size?(exc)) || (rej && File.size?(rej))) && (! opts[:ignore_parse_errors])
105
- fail ArgumentError, "Some lines in the CSV didn't go through. Exceptions: #{IO.read(exc)}\nRejected records: #{IO.read(rej)}"
101
+ # if there was something rejected and it shouldn't be ignored, raise an error
102
+ if ((exc && File.size?(exc)) || (rej && File.size?(rej))) && (! opts[:ignore_parse_errors])
103
+ fail ArgumentError, "Some lines in the CSV didn't go through. Exceptions: #{IO.read(exc)}\nRejected records: #{IO.read(rej)}"
104
+ end
105
+ ensure
106
+ exc.close if exc
107
+ rej.close if rej
106
108
  end
107
109
  end
108
110
  end
@@ -1,5 +1,5 @@
1
1
  module GoodData
2
2
  class Datawarehouse
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gooddata_datawarehouse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Cvengros
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-15 00:00:00.000000000 Z
11
+ date: 2018-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - ~>
16
+ - - "~>"
17
17
  - !ruby/object:Gem::Version
18
18
  version: '1.7'
19
19
  name: bundler
@@ -21,13 +21,13 @@ dependencies:
21
21
  type: :development
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - ~>
30
+ - - "~>"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '10.3'
33
33
  name: rake
@@ -35,27 +35,27 @@ dependencies:
35
35
  type: :development
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ~>
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '2.14'
46
+ version: '3.8'
47
47
  name: rspec
48
48
  prerelease: false
49
49
  type: :development
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.14'
54
+ version: '3.8'
55
55
  - !ruby/object:Gem::Dependency
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0.9'
61
61
  name: pry
@@ -63,16 +63,16 @@ dependencies:
63
63
  type: :development
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0.9'
69
69
  - !ruby/object:Gem::Dependency
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ~>
72
+ - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0.7'
75
- - - '>='
75
+ - - ">="
76
76
  - !ruby/object:Gem::Version
77
77
  version: 0.7.0
78
78
  name: coveralls
@@ -80,16 +80,16 @@ dependencies:
80
80
  type: :development
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - ~>
83
+ - - "~>"
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0.7'
86
- - - '>='
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: 0.7.0
89
89
  - !ruby/object:Gem::Dependency
90
90
  requirement: !ruby/object:Gem::Requirement
91
91
  requirements:
92
- - - ~>
92
+ - - "~>"
93
93
  - !ruby/object:Gem::Version
94
94
  version: '4.17'
95
95
  name: sequel
@@ -97,27 +97,27 @@ dependencies:
97
97
  type: :runtime
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ~>
100
+ - - "~>"
101
101
  - !ruby/object:Gem::Version
102
102
  version: '4.17'
103
103
  - !ruby/object:Gem::Dependency
104
104
  requirement: !ruby/object:Gem::Requirement
105
105
  requirements:
106
- - - ~>
106
+ - - "~>"
107
107
  - !ruby/object:Gem::Version
108
- version: '0.1'
108
+ version: 0.2.4
109
109
  name: gooddata-dss-jdbc
110
110
  prerelease: false
111
111
  type: :runtime
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - ~>
114
+ - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '0.1'
116
+ version: 0.2.4
117
117
  - !ruby/object:Gem::Dependency
118
118
  requirement: !ruby/object:Gem::Requirement
119
119
  requirements:
120
- - - ~>
120
+ - - "~>"
121
121
  - !ruby/object:Gem::Version
122
122
  version: '1.0'
123
123
  name: pmap
@@ -125,7 +125,7 @@ dependencies:
125
125
  type: :runtime
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
- - - ~>
128
+ - - "~>"
129
129
  - !ruby/object:Gem::Version
130
130
  version: '1.0'
131
131
  description: ''
@@ -135,10 +135,10 @@ executables: []
135
135
  extensions: []
136
136
  extra_rdoc_files: []
137
137
  files:
138
- - .coveralls.yml
139
- - .gitignore
140
- - .rspec
141
- - .travis.yml
138
+ - ".coveralls.yml"
139
+ - ".gitignore"
140
+ - ".rspec"
141
+ - ".travis.yml"
142
142
  - Gemfile
143
143
  - LICENSE.txt
144
144
  - README.md
@@ -166,17 +166,17 @@ require_paths:
166
166
  - lib
167
167
  required_ruby_version: !ruby/object:Gem::Requirement
168
168
  requirements:
169
- - - '>='
169
+ - - ">="
170
170
  - !ruby/object:Gem::Version
171
171
  version: '0'
172
172
  required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  requirements:
174
- - - '>='
174
+ - - ">="
175
175
  - !ruby/object:Gem::Version
176
176
  version: '0'
177
177
  requirements: []
178
178
  rubyforge_project:
179
- rubygems_version: 2.1.9
179
+ rubygems_version: 2.6.13
180
180
  signing_key:
181
181
  specification_version: 4
182
182
  summary: Convenient work with GoodData's Datawarehouse (ADS)