importeur 0.1.1 → 0.2.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: 2e2da53fbdf2d6b7e54b7bf864a0ef4585088e854225cb50b3360cc603719ca5
4
- data.tar.gz: ab5645b728d4f8f083406d754076c00f3d5f8890e02e47e9324a30e0e55dfb53
3
+ metadata.gz: 8e30163e2c4d5252557c6c3214b7099452bf3f125d539f335257bc0a075ed439
4
+ data.tar.gz: dd3eba1b60e367e16e797c3a09027102d2999fd9af946380bc35dd1905db6061
5
5
  SHA512:
6
- metadata.gz: a81238cc10368f58201b6ed26a4234a83f3037b99baac14d4563af05a4032d8ba6e8684d13b51535d79d16969107ad14b975078d4b4cfedbcf85ea076c367f0e
7
- data.tar.gz: d29de110bd13b0665b3ac1f62c9c08d0d443c9d45b853b281e1aa8b95f57ecc8230174ef7ad63d8a0bde4ddb865becb00bdcb00478ce93c1bd9af9e4433f03d4
6
+ metadata.gz: fd4c9ef77a9f4f75a4cf20e0f0b3066fe696d955cd80d5843d2138d1e579c22992c80b1b13762096715f424cdd76eb630c2bd3128597039cf11098919b9b60fa
7
+ data.tar.gz: f6e7ce995b3fae48db41f9d6f7862dd6aeaa2a68eb1f02d7025d720295a9404a5bf28c2089f11826fd29ccc1e40251d43177e621e0b478caf1dac7ae9fdb8f5c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
- ## 0.1.0 (2017-10-26)
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
2
3
 
3
- - Initial release
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.2.0]
10
+ ### Added
11
+ - Allow transformer to skip entries by returning `nil` or `false`.
12
+
13
+ ## [0.1.1] - 2018-01-31
14
+ ### Changed
15
+ - Better performance on fetching existing records for ActiveRecordPostgresLoader.
16
+
17
+ ## [0.1.0] - 2017-10-26
18
+ ### Added
19
+ - Generic extractor (Importeur::Extractor).
20
+ - Appnexus, Rocketfuel and Combined data sources.
21
+ - ActiveRecord PostgreSQL loader.
22
+ - Main ETL class (API).
23
+
24
+ [Unreleased]: https://github.com/ad2games/importeur/compare/v0.2.0...HEAD
25
+ [0.2.0]: https://github.com/ad2games/importeur/compare/v0.1.1...v0.2.0
26
+ [0.1.1]: https://github.com/ad2games/importeur/compare/v0.1.0...v0.1.1
data/README.md CHANGED
@@ -38,7 +38,10 @@ Importeur::ETL.new(
38
38
  All three only need to have a `call` method and, hence, can be simple Procs.
39
39
  The extractor should return something enumerable, which is then iterated over
40
40
  and each item passed into the transformer. The loader receives the enumerable
41
- result of that.
41
+ result of that. If the transformer returns `nil` or `false` that element is
42
+ skipped and not received by the loader. The transformer can also return an
43
+ array of elements, so a single element from extractor can be received as
44
+ multiple elements by the loader.
42
45
 
43
46
  So far a more or less generic `Extractor` exists.
44
47
 
data/lib/importeur/etl.rb CHANGED
@@ -12,7 +12,7 @@ module Importeur
12
12
  extracted = extractor.call
13
13
  return if extracted.nil?
14
14
  transformed = extracted.lazy.flat_map do |entity|
15
- transformer.call(entity)
15
+ transformer.call(entity) || []
16
16
  end
17
17
  loader.call(transformed.lazy)
18
18
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Importeur
4
- VERSION = '0.1.1'
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: importeur
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Helge Rausch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-31 00:00:00.000000000 Z
11
+ date: 2018-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -240,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
240
  version: '0'
241
241
  requirements: []
242
242
  rubyforge_project:
243
- rubygems_version: 2.7.3
243
+ rubygems_version: 2.7.6
244
244
  signing_key:
245
245
  specification_version: 4
246
246
  summary: Universal data importer