kiba 3.0.0 → 3.5.0

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
2
  SHA256:
3
- metadata.gz: a5cf22f1013b65b59d9c91b9f629749b47b5474b3f500d5ca54118b6b6a46c4f
4
- data.tar.gz: cae5e05fabc7c8d169d47d6aa6a7da8befd6711ad2d2471c2c0f5f1d3e604841
3
+ metadata.gz: c427b6eaebd658eb6551035d077bfd91cc1728ac2d6437c30d9a839d86a5a86b
4
+ data.tar.gz: 37f9e337463544b524a212d772207ba35b14f35a7f4a2cd8cfaf804b2212da85
5
5
  SHA512:
6
- metadata.gz: 2ed99641ab799ee57f213525f6ca3ab4b9a9d5e0b7680115bef8e139d32dcfb350fb0117065b5be0ded6a886c21988413b2963e2cbea546a7a1d5691ed078f27
7
- data.tar.gz: 24434d65dcf9bb81ce0f575860edbdf92598a1e990663347a599eb42155211c02b9c9eb0304c869cf85c8cd15df8c262afcf9cdf11bb7568323ea98b393b9518
6
+ metadata.gz: 68b66016fd7311691ec6fcd7e7b601520331ae64031d48f18076c2889e8af639411f959e2b519900f164c16e7808ae5939c7e6c6c5e7156e2d7c7b1f2ee59a2c
7
+ data.tar.gz: db08b2a02cce64269f40b3aa05229395398c3dbb8fad2f5fa6e23476845620891980f86ddf222e96c6697bc7af3d4a83ef33cb4ee6fb7886c8172d1e363aaa33
@@ -0,0 +1 @@
1
+ github: thbar
@@ -177,7 +177,7 @@ The Licensee is responsible for making and keeping adequate backup copies of dat
177
177
 
178
178
  An active Agreement gives access to “Priority Support”.
179
179
 
180
- Priority Support covers one (1) email request per quarter. LoGeek will use reasonable endeavours to answer within two (2) French working days. Scope is limited to Kiba and Kiba Pro features and APIs, not the application or infrastructure. For support, email thibaut.barrere+kiba@gmail.com. Please email using the same domain as the original license email or explain your connection to the licensed company.
180
+ Priority Support covers one (1) email request per quarter. LoGeek will use reasonable endeavours to answer within two (2) French working days. Scope is limited to Kiba and Kiba Pro features and APIs, not the application or infrastructure. For support, email support@logeek.fr. Please email using the same domain as the original license email or explain your connection to the licensed company.
181
181
 
182
182
  ## ARTICLE 5 - CUSTOM SUPPORT AND MAINTENANCE
183
183
 
@@ -245,7 +245,7 @@ LoGeek is responsible for processing personal data regarding managing contractua
245
245
 
246
246
  Personal data collected by LoGeek is needed for its processing and is intended for LoGeek’s relevant departments and, where appropriate, its subcontractors and co-contractors, for the requirements of executing the Agreement.
247
247
 
248
- Pursuant to the legal provisions regarding protecting personal data, and under the conditions and to the extent provided by the applicable regulation, each Licensee’s employee concerned shall have a right to query, access, rectify, oppose, obtain erasure or restriction of processing regarding its personal data – rights which may be exercised by mail sent to the attention of thibaut.barrere+kiba@gmail.com, accompanied, if deemed appropriate by Logeek, by a copy of the relevant person’s identification papers.
248
+ Pursuant to the legal provisions regarding protecting personal data, and under the conditions and to the extent provided by the applicable regulation, each Licensee’s employee concerned shall have a right to query, access, rectify, oppose, obtain erasure or restriction of processing regarding its personal data – rights which may be exercised by mail sent to the attention of support@logeek.fr, accompanied, if deemed appropriate by Logeek, by a copy of the relevant person’s identification papers.
249
249
 
250
250
  ## ARTICLE 10 - AUDIT
251
251
 
data/Changes.md CHANGED
@@ -1,3 +1,8 @@
1
+ HEAD
2
+ ----
3
+
4
+ - Support for Ruby 2.7+ [#93](https://github.com/thbar/kiba/pull/93). Special thanks to @eregon and @mame for their input.
5
+
1
6
  3.0.0
2
7
  -----
3
8
 
@@ -1,7 +1,18 @@
1
1
  Kiba Pro Changelog
2
2
  ==================
3
3
 
4
- Kiba Pro is the commercial extension for Kiba. Documentation is available on the [Wiki](https://github.com/thbar/kiba/wiki).
4
+ Kiba Pro provides vendor-supported ETL extensions for Kiba. Your subscription funds the Open-Source development, thanks for considering it!
5
+
6
+ Learn more on the [Kiba website](https://www.kiba-etl.org/kiba-pro).
7
+
8
+ Documentation is available on the [Wiki](https://github.com/thbar/kiba/wiki#kiba-pro).
9
+
10
+ 2.0.0
11
+ -----
12
+
13
+ - New: `SQLBulkLookup` transform allows to efficiently lookup values in SQL tables. This is particularly useful in datawarehouse scenarios (to replace unique business keys by surrogate keys), or when writing migrations of SQL databases. Instead of looking-up each row individually, it avoids a "N+1" like effect, by working on large batches of rows.
14
+ - New: `ParallelTransform` provides an easy way to process a group of ETL rows at the same time using a pool of threads. It can be used to accelerate ETL transforms doing IO operations such as HTTP queries, by going multithreaded.
15
+ - New: `FileLock` adds an easy way to avoid overlapping runs in ETL Jobs using a local file lock.
5
16
 
6
17
  1.5.0
7
18
  -----
data/README.md CHANGED
@@ -1,67 +1,31 @@
1
- **If you need help**, please [ask your question with tag kiba-etl on StackOverflow](http://stackoverflow.com/questions/ask?tags=kiba-etl) so that other can benefit from your contribution! I monitor this specific tag and will reply to you.
2
-
3
- Writing reliable, concise, well-tested & maintainable data-processing code is tricky.
4
-
5
- Kiba lets you define and run such high-quality ETL ([Extract-Transform-Load](http://en.wikipedia.org/wiki/Extract,_transform,_load)) jobs using Ruby.
6
-
7
- Learn more on the [Wiki](https://github.com/thbar/kiba/wiki), on my [blog](http://thibautbarrere.com) and on [StackOverflow](http://stackoverflow.com/questions/tagged/kiba-etl).
8
-
9
- A new [kiba-blueprints](https://github.com/thbar/kiba-blueprints) repo has been also created to showcase the use of Kiba OSS and Kiba Pro. More examples are planned!
1
+ # Kiba ETL
10
2
 
11
3
  [![Gem Version](https://badge.fury.io/rb/kiba.svg)](http://badge.fury.io/rb/kiba)
12
4
  [![Build Status](https://travis-ci.org/thbar/kiba.svg?branch=master)](https://travis-ci.org/thbar/kiba) [![Build status](https://ci.appveyor.com/api/projects/status/v05jcyhpp1mueq9i?svg=true)](https://ci.appveyor.com/project/thbar/kiba) [![Code Climate](https://codeclimate.com/github/thbar/kiba/badges/gpa.svg)](https://codeclimate.com/github/thbar/kiba)
13
5
 
14
- ## Kiba 2.0.0
15
-
16
- Kiba 2.0.0 has been recently released with one major improvement for ETL components developers.
17
-
18
- Please check out the [release notes](https://github.com/thbar/kiba/releases/tag/v2.0.0).
6
+ Writing reliable, concise, well-tested & maintainable data-processing code is tricky.
19
7
 
20
- [Subscribe to my newsletter](https://tinyletter.com/kiba-etl) to get the upcoming detailed article on Kiba 2 benefits.
8
+ Kiba lets you define and run such high-quality ETL ([Extract-Transform-Load](http://en.wikipedia.org/wiki/Extract,_transform,_load)) jobs using Ruby.
21
9
 
22
- ## Installation
10
+ ## Getting Started
23
11
 
24
- Add the gem to your `Gemfile` and run the bundle command:
12
+ Head over to the [Wiki](https://github.com/thbar/kiba/wiki) for up-to-date documentation.
25
13
 
26
- ```ruby
27
- gem 'kiba'
28
- ```
14
+ **If you need help**, please [ask your question with tag kiba-etl on StackOverflow](http://stackoverflow.com/questions/ask?tags=kiba-etl) so that other can benefit from your contribution! I monitor this specific tag and will reply to you.
29
15
 
30
- ## Getting Started
16
+ [Kiba Pro](https://www.kiba-etl.org/kiba-pro) customers get priority private email support.
31
17
 
32
- * [How do you define ETL jobs with Kiba?](https://github.com/thbar/kiba/wiki/How-do-you-define-ETL-jobs-with-Kiba%3F)
33
- * [Running Kiba jobs from the command line](https://github.com/thbar/kiba/wiki/Running-Kiba-jobs-from-the-command-line)
34
- * [Considerations for running Kiba jobs programmatically (from Sidekiq, Faktory, Rake, ...)](https://github.com/thbar/kiba/wiki/Considerations-for-running-Kiba-jobs-programmatically-(from-Sidekiq,-Faktory,-Rake,-...))
35
- * [Implementing ETL sources](https://github.com/thbar/kiba/wiki/Implementing-ETL-sources).
36
- * [Implementing ETL transforms](https://github.com/thbar/kiba/wiki/Implementing-ETL-transforms).
37
- * [Implementing ETL destinations](https://github.com/thbar/kiba/wiki/Implementing-ETL-destinations).
38
- * [Implementing pre and post-processors](https://github.com/thbar/kiba/wiki/Implementing-pre-and-post-processors).
39
-
40
- ## Useful links
41
-
42
- * [Ruby Kaigi 2018 conference - Kiba 2 - Past, present & future of data processing with Ruby](https://www.youtube.com/watch?v=fxVtbog7pIQ) ([slides](https://speakerdeck.com/thbar/kiba-etl-v2-rubykaigi-2018))
43
- * [Live Coding Session - Processing data with Kiba ETL](http://thibautbarrere.com/2015/11/09/video-processing-data-with-kiba-etl/)
44
- * [Rubyists - are you doing ETL unknowningly?](http://thibautbarrere.com/2015/03/25/rubyists-are-you-doing-etl-unknowingly/)
45
- * [How to write solid data processing code](http://thibautbarrere.com/2015/04/05/how-to-write-solid-data-processing-code/)
46
- * [How to reformat CSV files with Kiba](http://thibautbarrere.com/2015/06/04/how-to-reformat-csv-files-with-kiba/) (in-depth, hands-on tutorial)
47
- * [How to explode multivalued attributes with Kiba ETL?](http://thibautbarrere.com/2015/06/25/how-to-explode-multivalued-attributes-with-kiba/)
48
- * [Common techniques to compute aggregates with Kiba](https://stackoverflow.com/questions/31145715/how-to-do-a-aggregation-transformation-in-a-kiba-etl-script-kiba-gem)
49
- * [How to run Kiba in a Rails environment?](http://thibautbarrere.com/2015/09/26/how-to-run-kiba-in-a-rails-environment/)
50
- * [How to pass parameters to the Kiba command line?](http://stackoverflow.com/questions/32959692/how-to-pass-parameters-into-your-etl-job)
18
+ You can also check out the [author blog](https://thibautbarrere.com) and [StackOverflow answers](http://stackoverflow.com/questions/tagged/kiba-etl).
51
19
 
52
20
  ## Supported Ruby versions
53
21
 
54
- Kiba currently supports Ruby 2.3+, JRuby 9.1+ and TruffleRuby. See [test matrix](https://travis-ci.org/thbar/kiba).
55
-
56
- ## Kiba Common
57
-
58
- I'm starting to add commonly used reusable helpers in a separate gem called [kiba-common](https://github.com/thbar/kiba-common), check it out (work-in-progress).
22
+ Kiba currently supports Ruby 2.4+, JRuby 9.2+ and TruffleRuby. See [test matrix](https://travis-ci.org/thbar/kiba).
59
23
 
60
24
  ## ETL consulting & commercial version
61
25
 
62
- **Consulting services**: if your organization needs help to implement a data pipeline or to build a data-intensive application, I provide consulting services. [More information](http://thibautbarrere.com/hire-me/).
26
+ **Consulting services**: if your organization needs guidance on Kiba / ETL implementations, we provide consulting services. Contact at [https://www.logeek.fr](https://www.logeek.fr).
63
27
 
64
- **Kiba Pro**: for more features & goodies, check out [Kiba Pro](https://github.com/thbar/kiba/wiki#kiba-pro).
28
+ **Kiba Pro**: for vendor-backed ETL extensions, check out [Kiba Pro](https://www.kiba-etl.org/kiba-pro).
65
29
 
66
30
  ## License
67
31
 
@@ -23,5 +23,9 @@ module Kiba
23
23
  def post_process(&block)
24
24
  @control.post_processes << { block: block }
25
25
  end
26
+
27
+ [:source, :transform, :destination].each do |m|
28
+ ruby2_keywords(m) if respond_to?(:ruby2_keywords, true)
29
+ end
26
30
  end
27
31
  end
@@ -1,3 +1,3 @@
1
1
  module Kiba
2
- VERSION = '3.0.0'
2
+ VERSION = '3.5.0'
3
3
  end
@@ -155,4 +155,74 @@ module SharedRunnerTests
155
155
  end
156
156
  assert_raises(RuntimeError, 'Nil parameters not allowed here') { kiba_run(control) }
157
157
  end
158
+
159
+ def test_ruby_3_source_kwargs
160
+ # NOTE: before Ruby 3 kwargs support, a Ruby warning would
161
+ # be captured here with Ruby 2.7 & ensure we fail,
162
+ # and an error would be raised with Ruby 2.8.0-dev
163
+ # NOTE: only the first warning will be captured, though, but
164
+ # having 3 different tests is still better
165
+ storage = nil
166
+ assert_silent do
167
+ Kiba.run(Kiba.parse do
168
+ source TestKeywordArgumentsComponent,
169
+ mandatory: "first",
170
+ on_init: -> (values) { storage = values }
171
+ end)
172
+ end
173
+ assert_equal({
174
+ mandatory: "first",
175
+ optional: nil
176
+ }, storage)
177
+ end
178
+
179
+ def test_ruby_3_transform_kwargs
180
+ storage = nil
181
+ assert_silent do
182
+ Kiba.run(Kiba.parse do
183
+ transform TestKeywordArgumentsComponent,
184
+ mandatory: "first",
185
+ on_init: -> (values) { storage = values }
186
+ end)
187
+ end
188
+ assert_equal({
189
+ mandatory: "first",
190
+ optional: nil
191
+ }, storage)
192
+ end
193
+
194
+ def test_ruby_3_destination_kwargs
195
+ storage = nil
196
+ assert_silent do
197
+ Kiba.run(Kiba.parse do
198
+ destination TestKeywordArgumentsComponent,
199
+ mandatory: "first",
200
+ on_init: -> (values) { storage = values }
201
+ end)
202
+ end
203
+ assert_equal({
204
+ mandatory: "first",
205
+ optional: nil
206
+ }, storage)
207
+ end
208
+
209
+ def test_positional_plus_keyword_arguments
210
+ storage = nil
211
+ assert_silent do
212
+ Kiba.run(Kiba.parse do
213
+ source TestMixedArgumentsComponent,
214
+ "some positional argument",
215
+ mandatory: "first",
216
+ on_init: -> (values) {
217
+ storage = values
218
+ }
219
+ end)
220
+ end
221
+
222
+ assert_equal({
223
+ some_value: "some positional argument",
224
+ mandatory: "first",
225
+ optional: nil
226
+ }, storage)
227
+ end
158
228
  end
@@ -0,0 +1,14 @@
1
+ # a mock component to test Ruby 3 keyword argument support
2
+ class TestKeywordArgumentsComponent
3
+ def initialize(mandatory:, optional: nil, on_init: nil)
4
+ values = {
5
+ mandatory: mandatory,
6
+ optional: optional
7
+ }
8
+ on_init&.call(values)
9
+ end
10
+
11
+ def each
12
+ # no-op
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # a mock component to test Ruby 3 keyword argument support
2
+ class TestMixedArgumentsComponent
3
+ def initialize(some_value, mandatory:, optional: nil, on_init:)
4
+ @values = {}
5
+ @values[:some_value] = some_value
6
+ @values[:mandatory] = mandatory
7
+ @values[:optional] = optional
8
+ on_init&.call(@values)
9
+ end
10
+
11
+ def each
12
+ # no-op
13
+ end
14
+ end
@@ -6,6 +6,8 @@ require_relative 'support/test_duplicate_row_transform'
6
6
  require_relative 'support/test_close_yielding_transform'
7
7
  require_relative 'support/test_non_closing_transform'
8
8
  require_relative 'shared_runner_tests'
9
+ require_relative 'support/test_keyword_arguments_component'
10
+ require_relative 'support/test_mixed_arguments_component'
9
11
 
10
12
  class TestStreamingRunner < Kiba::Test
11
13
  def kiba_run(job)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kiba
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaut Barrère
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-10 00:00:00.000000000 Z
11
+ date: 2020-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -74,6 +74,7 @@ executables:
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
+ - ".github/FUNDING.yml"
77
78
  - ".gitignore"
78
79
  - ".travis.yml"
79
80
  - COMM-LICENSE.md
@@ -106,6 +107,8 @@ files:
106
107
  - test/support/test_destination_returning_nil.rb
107
108
  - test/support/test_duplicate_row_transform.rb
108
109
  - test/support/test_enumerable_source.rb
110
+ - test/support/test_keyword_arguments_component.rb
111
+ - test/support/test_mixed_arguments_component.rb
109
112
  - test/support/test_non_closing_transform.rb
110
113
  - test/support/test_rename_field_transform.rb
111
114
  - test/support/test_source_that_reads_at_instantiation_time.rb
@@ -122,7 +125,7 @@ licenses:
122
125
  metadata:
123
126
  source_code_uri: https://github.com/thbar/kiba
124
127
  documentation_uri: https://github.com/thbar/kiba/wiki
125
- post_install_message:
128
+ post_install_message:
126
129
  rdoc_options: []
127
130
  require_paths:
128
131
  - lib
@@ -137,8 +140,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
140
  - !ruby/object:Gem::Version
138
141
  version: '0'
139
142
  requirements: []
140
- rubygems_version: 3.0.3
141
- signing_key:
143
+ rubygems_version: 3.1.2
144
+ signing_key:
142
145
  specification_version: 4
143
146
  summary: Lightweight ETL for Ruby
144
147
  test_files:
@@ -153,6 +156,8 @@ test_files:
153
156
  - test/support/test_destination_returning_nil.rb
154
157
  - test/support/test_duplicate_row_transform.rb
155
158
  - test/support/test_enumerable_source.rb
159
+ - test/support/test_keyword_arguments_component.rb
160
+ - test/support/test_mixed_arguments_component.rb
156
161
  - test/support/test_non_closing_transform.rb
157
162
  - test/support/test_rename_field_transform.rb
158
163
  - test/support/test_source_that_reads_at_instantiation_time.rb