salesforce_bulk_query 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/README.md +5 -3
- data/lib/salesforce_bulk_query/query.rb +1 -0
- data/lib/salesforce_bulk_query/version.rb +1 -1
- metadata +18 -17
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OGU3ZjE1MWI1MzE4NjAxMGU2Yzg1NDM4YTM3OGQ0ZmZlMjE1Mjg2MA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NGM4Y2ZmZTM3ODUwYjk4OGVmZjgwNmY0OTQzNjc5MTk0YWFiYTIyMA==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MDcwODI4Njk4ZmMwNjdjMTRlMDVjNWExMjMxZjA1MzQwNTk0Y2QwZjEyODcw
|
10
|
+
ZGZiYjBmMmVmYTU2OWFkZGEwODIzOWRlN2I0MTYyNGFiODQwZWU3MTNiOTI3
|
11
|
+
ZmUxMWVkMmZmZWUwMTJhMzUzZWU1ODViZmY3YTUxY2M0MjBhZDE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZTViZTk4M2Y5MTg0ZTI2M2ViYmIxYzQ5ZDg1NzJjZGI4ZmRiMjJhNzczZTRk
|
14
|
+
OGI0YmYzY2I4OWVhNzA5ZWJjOWQwOThkYTYwMGFmZDlkMjVmYmFiZjQ5MTU1
|
15
|
+
YTQ0ZWFlYzA5NWY1OTJmODA4Y2FmMjQ2YjBkNzIyZmIxYTg0ZDE=
|
data/README.md
CHANGED
@@ -15,7 +15,9 @@ or add
|
|
15
15
|
|
16
16
|
to your Gemfile.
|
17
17
|
|
18
|
-
Before using the library, make sure you have the right account in your Salesforce organization that has access to API and that you won't run out of the [API limits](http://www.salesforce.com/us/developer/docs/api_asynchpre/Content/asynch_api_concepts_limits.htm#batch_proc_time_title)
|
18
|
+
Before using the library, make sure you have the right account in your Salesforce organization that has access to API and that you won't run out of the [API limits](http://www.salesforce.com/us/developer/docs/api_asynchpre/Content/asynch_api_concepts_limits.htm#batch_proc_time_title).
|
19
|
+
|
20
|
+
You will also need a Salesforce connected app for the `client_id` and `client_sercret` params, see [the guide](https://help.salesforce.com/HTViewHelpDoc?id=connected_app_create.htm&language=en_US). The app needs to have OAuth settings enabled (even if you plan to use just username-password-token authentication). The required permissions are _Access and manage your data (api)_, _Perform requests on your behalf at any time (refresh token, offline access)_. The other parameters such as redirect url don't need to be set.
|
19
21
|
|
20
22
|
For doing most of the API calls, the library uses [Restforce](https://github.com/ejholmes/restforce) Code example:
|
21
23
|
|
@@ -42,7 +44,7 @@ For doing most of the API calls, the library uses [Restforce](https://github.com
|
|
42
44
|
bulk_api = SalesforceBulkQuery::Api.new(restforce)
|
43
45
|
|
44
46
|
# query the api
|
45
|
-
result =
|
47
|
+
result = bulk_api.query("Task", "SELECT Id, Name FROM Task")
|
46
48
|
|
47
49
|
# the result is files
|
48
50
|
puts "All the downloaded stuff is in csvs: #{result[:filenames]}"
|
@@ -80,7 +82,7 @@ There are a few optional settings you can pass to the `Api` methods:
|
|
80
82
|
* `check_interval`: how often the results should be checked in secs.
|
81
83
|
* `time_limit`: maximum time the query can take. If this time limit is exceeded, available results are downloaded and the list of subqueries that didn't finished is returned. In seconds. The limti should be understood as limit for waiting. When the limit is reached the function downloads data that is ready which can take some additonal time.
|
82
84
|
* `created_from`, `created_to`: limits for the CreatedDate field. Note that queries can't contain any WHERE statements as we're doing some manipulations to create subqueries and we don't want things to get too difficult. So this is the way to limit the query yourself. The format is like `"1999-01-01T00:00:00.000Z"`
|
83
|
-
* `single_batch`: If true, the queries are not divided into subqueries as described above. Instead one batch job is created with the given query.
|
85
|
+
* `single_batch`: If true, the queries are not divided into subqueries as described above. Instead one batch job is created with the given query. This is faster for small amount of data, but will fail with a timeout if you have a lot of data.
|
84
86
|
|
85
87
|
See specs for exact usage.
|
86
88
|
|
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: salesforce_bulk_query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Petr Cvengros
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.8'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: xml-simple
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: multi_json
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.9'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.9'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: restforce
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.4'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.4'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '2.14'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '2.14'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: pry
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0.9'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0.9'
|
97
97
|
description: A library for downloading data from Salesforce Bulk API. We only focus
|
@@ -103,7 +103,7 @@ executables: []
|
|
103
103
|
extensions: []
|
104
104
|
extra_rdoc_files: []
|
105
105
|
files:
|
106
|
-
-
|
106
|
+
- .gitignore
|
107
107
|
- Gemfile
|
108
108
|
- LICENSE
|
109
109
|
- README.md
|
@@ -128,12 +128,12 @@ require_paths:
|
|
128
128
|
- lib
|
129
129
|
required_ruby_version: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
|
-
- -
|
131
|
+
- - ! '>='
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: '1.9'
|
134
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ! '>='
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
@@ -143,3 +143,4 @@ signing_key:
|
|
143
143
|
specification_version: 4
|
144
144
|
summary: Downloading data from Salesforce Bulk API made easy and scalable.
|
145
145
|
test_files: []
|
146
|
+
has_rdoc:
|