embulk-input-mixpanel 0.3.3 → 0.3.4

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
  SHA1:
3
- metadata.gz: 48c99d14bae13fa0257e070bc5b99d444679392a
4
- data.tar.gz: 8327dd45de51b2dab42754f212e5c6861621de7f
3
+ metadata.gz: 4f7e9eb914b30c6a19d3afe35b5b5314497c0c83
4
+ data.tar.gz: 1b3d12b83c9c06d66657b6e370ad2c28446b1754
5
5
  SHA512:
6
- metadata.gz: ecb93dd7bade9b667d94a5f5cea247d6f46b1e1ad87d6046f6377f9495456e40f91b97a44a1440cbd04b8d4bbb15a2a223fbed7612469e08e427e32bc4e94db9
7
- data.tar.gz: 94e3728eed0ce17d7178557556077f1d37049881567715523955c9888560d4886d774440206570cbf463822f2f82f19b2d216aa293bd8be1d1f0b27d3ea566a1
6
+ metadata.gz: 20a77df82f23049667d97de1a245a46844733983c5fece681dd53857507ec7eae6b1ee5a6ccefe325c48038c215584bf5590c93f710af44a64bfa1c206c4712b
7
+ data.tar.gz: d9536d638c52cac6af9936bea589b408a8f1106509ed6a60d929c3cec06d2bb96d29444a7666194b50ed581d210df599914f8d979d37a23a7ac0e8cf30b2bfe7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.4 - 2015-11-02
2
+
3
+ * [enhancement] Create `unknown_columns` only when option is true [#32](https://github.com/treasure-data/embulk-input-mixpanel/pull/32)
4
+
1
5
  ## 0.3.3 - 2015-10-29
2
6
 
3
7
  * [enhancement] Exponential backoff retry [#31](https://github.com/treasure-data/embulk-input-mixpanel/pull/31)
@@ -1,7 +1,7 @@
1
1
 
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "embulk-input-mixpanel"
4
- spec.version = "0.3.3"
4
+ spec.version = "0.3.4"
5
5
  spec.authors = ["yoshihara", "uu59"]
6
6
  spec.summary = "Mixpanel input plugin for Embulk"
7
7
  spec.description = "Loads records from Mixpanel."
@@ -25,6 +25,8 @@ module Embulk
25
25
  range = RangeGenerator.new(from_date, fetch_days).generate_range
26
26
  Embulk.logger.info "Try to fetch data from #{range.first} to #{range.last}"
27
27
 
28
+ fetch_unknown_columns = config.param(:fetch_unknown_columns, :bool, default: true)
29
+
28
30
  task = {
29
31
  params: export_params(config),
30
32
  dates: range,
@@ -32,7 +34,7 @@ module Embulk
32
34
  api_key: config.param(:api_key, :string),
33
35
  api_secret: config.param(:api_secret, :string),
34
36
  schema: config.param(:columns, :array),
35
- fetch_unknown_columns: config.param(:fetch_unknown_columns, :bool, default: true),
37
+ fetch_unknown_columns: fetch_unknown_columns,
36
38
  retry_initial_wait_sec: config.param(:retry_initial_wait_sec, :integer, default: 1),
37
39
  retry_limit: config.param(:retry_limit, :integer, default: 5),
38
40
  }
@@ -44,8 +46,9 @@ module Embulk
44
46
  Column.new(nil, name, type, column["format"])
45
47
  end
46
48
 
47
- # for unknown columns
48
- columns << Column.new(nil, "unknown_columns", :string)
49
+ if fetch_unknown_columns
50
+ columns << Column.new(nil, "unknown_columns", :string)
51
+ end
49
52
 
50
53
  resume(task, columns, 1, &control)
51
54
  end
@@ -333,12 +333,9 @@ module Embulk
333
333
  end
334
334
 
335
335
  def columns
336
- unknown_columns = [Column.new(nil, "unknown_columns", :string)]
337
- configured_columns = schema.map do |col|
336
+ schema.map do |col|
338
337
  Column.new(nil, col["name"], col["type"].to_sym)
339
338
  end
340
-
341
- configured_columns + unknown_columns
342
339
  end
343
340
  end
344
341
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-input-mixpanel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshihara
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-29 00:00:00.000000000 Z
12
+ date: 2015-11-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement