embulk-input-marketo 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/embulk-input-marketo.gemspec +1 -1
- data/lib/embulk/input/marketo/activity_log.rb +9 -1
- data/lib/embulk/input/marketo/lead.rb +0 -2
- data/lib/embulk/input/marketo/timeslice.rb +1 -0
- data/lib/embulk/input/marketo_api/soap/activity_log.rb +2 -2
- data/lib/embulk/input/marketo_api/soap/base.rb +4 -4
- data/test/activity_log_fixtures.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f71b3f65dab9d932934f09d2c5e9b47f9702613
|
4
|
+
data.tar.gz: d951b2cd6e46bedbbdf2f7ea4c25803c3f470d20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd33daed69356a087369dee73c6381dea6e61488227f5aaff52f705168241a97011bb77ed5c6b35ede7dbb3352dfcb03e7c206612f9b9b75dfb5d6ca81727c40
|
7
|
+
data.tar.gz: 02c17f9f3d72b8586a9479bed842b24fa2f2205a82b5a05b535ed291df84bf3b385a0e2d9638da3a924061e97b72db9533a47dd304466b9ebff65ac805772af7
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 0.2.1 - 2015-09-01
|
2
|
+
|
3
|
+
* [fixed] activity_log: Avoid to cast values unexpectedly [#29](https://github.com/treasure-data/embulk-input-marketo/pull/29)
|
4
|
+
* [maintenance] Add a minor comment [#28](https://github.com/treasure-data/embulk-input-marketo/pull/28) [Requested by @muga. Thanks!!]
|
5
|
+
* [maintenance] Fix minor issues [#27](https://github.com/treasure-data/embulk-input-marketo/pull/27) [[Reviewed by @muga.](https://github.com/treasure-data/embulk-input-marketo/pull/25#issuecomment-135570967) Thanks!!]
|
6
|
+
|
1
7
|
## 0.2.0 - 2015-08-27
|
2
8
|
|
3
9
|
This version breaks backword compatibility of marketo/lead. Please check README.md to modify your config.
|
data/README.md
CHANGED
@@ -36,7 +36,7 @@ Below parameters are shown in "Admin" > "Web Services" page in Marketo.
|
|
36
36
|
|
37
37
|
### market/lead
|
38
38
|
|
39
|
-
**NOTE: If you use feature of scheduled execution (resume) with marketo/
|
39
|
+
**NOTE: If you use feature of scheduled execution (resume) with marketo/lead, you should not specify `to_datetime` because this plugin can't place next to_datetime (can't know the date to run with new config).**
|
40
40
|
|
41
41
|
- **endpoint** SOAP endpoint URL for your account (string, required)
|
42
42
|
- **wsdl** SOAP endpoint URL for your account (string, default: endpoint + "?WSDL")
|
@@ -36,7 +36,15 @@ module Embulk
|
|
36
36
|
last_updated_at = @soap.each(@last_updated_at, batch_size: batch_size) do |activity_log|
|
37
37
|
values = @columns.map do |column|
|
38
38
|
name = column["name"].to_s
|
39
|
-
activity_log[name]
|
39
|
+
value = activity_log[name]
|
40
|
+
next unless value
|
41
|
+
|
42
|
+
case column["type"]
|
43
|
+
when "timestamp"
|
44
|
+
Time.parse(value)
|
45
|
+
else
|
46
|
+
value
|
47
|
+
end
|
40
48
|
end
|
41
49
|
|
42
50
|
page_builder.add(values)
|
@@ -64,13 +64,13 @@ module Embulk
|
|
64
64
|
return {remaining_count: 0, offset: nil, last_updated_at: nil}
|
65
65
|
end
|
66
66
|
|
67
|
-
activities = activities_list[:lead_change_record].
|
67
|
+
activities = activities_list[:lead_change_record].sort_by { |activity| Time.parse(activity[:activity_date_time]) }
|
68
68
|
|
69
69
|
activities.each do |activity|
|
70
70
|
record = {
|
71
71
|
"id" => activity[:id],
|
72
72
|
# embulk can't treat DateTime
|
73
|
-
"activity_date_time" => activity[:activity_date_time]
|
73
|
+
"activity_date_time" => Time.parse(activity[:activity_date_time]),
|
74
74
|
"activity_type" => activity[:activity_type],
|
75
75
|
"mktg_asset_name" => activity[:mktg_asset_name],
|
76
76
|
"mkt_person_id" => activity[:mkt_person_id],
|
@@ -32,16 +32,16 @@ module Embulk
|
|
32
32
|
soap_header: headers,
|
33
33
|
endpoint: endpoint,
|
34
34
|
open_timeout: 90,
|
35
|
-
read_timeout:
|
35
|
+
read_timeout: 90,
|
36
36
|
raise_errors: true,
|
37
37
|
namespace_identifier: :ns1,
|
38
|
-
env_namespace: 'SOAP-ENV'
|
38
|
+
env_namespace: 'SOAP-ENV',
|
39
39
|
)
|
40
40
|
end
|
41
41
|
|
42
|
-
def savon_call(
|
42
|
+
def savon_call(operation, locals={})
|
43
43
|
catch_unretryable_error do
|
44
|
-
savon.call(
|
44
|
+
savon.call(operation, locals.merge(advanced_typecasting: false))
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -31,7 +31,7 @@ module ActivityLogFixtures
|
|
31
31
|
remaining_count: "1",
|
32
32
|
new_start_position: {
|
33
33
|
latest_created_at: true,
|
34
|
-
oldest_created_at:
|
34
|
+
oldest_created_at: "2015-07-14T00:13:13+00:00",
|
35
35
|
activity_created_at: true,
|
36
36
|
offset: offset,
|
37
37
|
},
|
@@ -39,7 +39,7 @@ module ActivityLogFixtures
|
|
39
39
|
lead_change_record: [
|
40
40
|
{
|
41
41
|
id: "1",
|
42
|
-
activity_date_time:
|
42
|
+
activity_date_time: "2015-07-14T00:00:09+00:00",
|
43
43
|
activity_type: "at1",
|
44
44
|
mktg_asset_name: "score1",
|
45
45
|
activity_attributes: {
|
@@ -60,7 +60,7 @@ module ActivityLogFixtures
|
|
60
60
|
},
|
61
61
|
{
|
62
62
|
id: "2",
|
63
|
-
activity_date_time:
|
63
|
+
activity_date_time: "2015-07-14T00:00:10+00:00",
|
64
64
|
activity_type: "at2",
|
65
65
|
mktg_asset_name: "score2",
|
66
66
|
activity_attributes: {
|
@@ -98,7 +98,7 @@ module ActivityLogFixtures
|
|
98
98
|
lead_change_record: [
|
99
99
|
{
|
100
100
|
id: "3",
|
101
|
-
activity_date_time:
|
101
|
+
activity_date_time: "2015-07-14T00:00:11+00:00",
|
102
102
|
activity_type: "at3",
|
103
103
|
mktg_asset_name: "score3",
|
104
104
|
activity_attributes: {
|
@@ -126,7 +126,7 @@ module ActivityLogFixtures
|
|
126
126
|
records = (1..15).map do |i|
|
127
127
|
{
|
128
128
|
id: i,
|
129
|
-
activity_date_time:
|
129
|
+
activity_date_time: "2015-07-14T00:00:11+00:00",
|
130
130
|
activity_type: "at#{i}",
|
131
131
|
mktg_asset_name: "score#{i}",
|
132
132
|
activity_attributes: {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-marketo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- uu59
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-09-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|