embulk-input-mixpanel 0.5.7 → 0.5.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da76e44b6dedb0753c503b715003e6c26a530321
4
- data.tar.gz: bd708d46d831ddb872c501623675627754d988db
3
+ metadata.gz: 918d88c52e1dd983b7d78dfa673ce5f946ef0629
4
+ data.tar.gz: 9d17d52d3c3daf84f3b11d6b068ff2b873627ab7
5
5
  SHA512:
6
- metadata.gz: b63e44eb7a0f39f2b72f20b44e2075a943ed770073fd9740e2a097397d1d0417c11558ab7b36eb66ced530500295ec15d5846d1f487554398722c4995036fd4a
7
- data.tar.gz: 6310dd9990715a6ab9aacf3bfcc6e377b24ed03b3841e1aaae44a709c7b2c66483fb4ea1bdffee936e09f07b164eb1aecc5def51233baa7a9f0f9ceffc641e02
6
+ metadata.gz: 235b268d682ff9a4a964d37455ea873cd331b78bd9a2d44e7053b584e7910d5da4f5a2087c9ce9497d30fc06672e1956ce94f8a64885bdbbbd38c0bf7cfbca97
7
+ data.tar.gz: bb8c5c8808e95b636c41ae5f72f0f8135390face7765b3fbb6d7f3940da95dbaf6e6f034541597b926abfc2f63efa56eef7c14069d36015dbc90ec490a646e34
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.5.8 - 2017-09-26
2
+
3
+ * [bug] Fix issue when back_fill data get processed by Mixpanel when plugin is running [#56](https://github.com/treasure-data/embulk-input-mixpanel/pull/56)
4
+ * [bug] Revert PR #54 [#56](https://github.com/treasure-data/embulk-input-mixpanel/pull/56)
5
+
1
6
  ## 0.5.6 - 2017-09-20
2
7
  * [bug] Fix issue when back_fill data get processed by Mixpanel when plugin is running [#54](https://github.com/treasure-data/embulk-input-mixpanel/pull/54)
3
8
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "embulk-input-mixpanel"
3
- spec.version = "0.5.7"
3
+ spec.version = "0.5.8"
4
4
  spec.authors = ["yoshihara", "uu59"]
5
5
  spec.summary = "Mixpanel input plugin for Embulk"
6
6
  spec.description = "Loads records from Mixpanel."
@@ -160,13 +160,13 @@ module Embulk
160
160
  prev_latest_fetched_time = task[:latest_fetched_time] || 0
161
161
  prev_latest_fetched_time_format = Time.at(prev_latest_fetched_time).strftime("%F %T %z")
162
162
  current_latest_fetched_time = prev_latest_fetched_time
163
- @dates.each_slice(task[:slice_range]) do |dates|
163
+ @dates.each_slice(task[:slice_range]) do |slice_dates|
164
164
  ignored_record_count = 0
165
165
  unless preview?
166
- Embulk.logger.info "Fetching data from #{dates.first} to #{dates.last} ..."
166
+ Embulk.logger.info "Fetching data from #{slice_dates.first} to #{slice_dates.last} ..."
167
167
  end
168
168
  record_time_column=@incremental_column || DEFAULT_TIME_COLUMN
169
- fetch(dates, prev_latest_fetched_time).each do |record|
169
+ fetch(slice_dates, prev_latest_fetched_time).each do |record|
170
170
  if @incremental
171
171
  if !record["properties"].include?(record_time_column)
172
172
  raise Embulk::ConfigError.new("Incremental column not exists in fetched data #{record_time_column}")
@@ -265,9 +265,9 @@ module Embulk
265
265
  "from_date" => from_date,
266
266
  "to_date" => to_date
267
267
  )
268
- if !@incremental_column.nil? && !last_fetch_time.nil? && last_fetch_time!=0 # can't do filter on time column, time column need to be filter manually.
268
+ if !@incremental_column.nil? # can't do filter on time column, time column need to be filter manually.
269
269
  params = params.merge(
270
- "where" => "#{params['where'].nil? ? '' : "(#{params['where']}) and " }properties[\"#{@incremental_column}\"] > #{last_fetch_time} and properties[\"#{@incremental_column}\"] < #{task[:job_start_time]}"
270
+ "where" => "#{params['where'].nil? ? '' : "(#{params['where']}) and " }properties[\"#{@incremental_column}\"] > #{last_fetch_time || 0} and properties[\"#{@incremental_column}\"] < #{task[:job_start_time]}"
271
271
  )
272
272
  end
273
273
  Embulk.logger.info "Where params is #{params["where"]}"
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.5.7
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshihara