@kitalive/sfdx-plugin 0.1.6 → 0.2.0
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.
- package/README.md +266 -12
- package/lib/bulk.d.ts +22 -0
- package/lib/bulk.js +235 -0
- package/lib/bulk.js.map +1 -0
- package/lib/commands/kit/data/bulk/delete.d.ts +18 -0
- package/lib/commands/kit/data/bulk/delete.js +64 -0
- package/lib/commands/kit/data/bulk/delete.js.map +1 -0
- package/lib/commands/kit/data/bulk/insert.d.ts +2 -0
- package/lib/commands/kit/data/bulk/insert.js +5 -0
- package/lib/commands/kit/data/bulk/insert.js.map +1 -0
- package/lib/commands/kit/data/bulk/query.d.ts +15 -0
- package/lib/commands/kit/data/bulk/query.js +50 -0
- package/lib/commands/kit/data/bulk/query.js.map +1 -0
- package/lib/commands/kit/data/bulk/update.d.ts +2 -0
- package/lib/commands/kit/data/bulk/update.js +5 -0
- package/lib/commands/kit/data/bulk/update.js.map +1 -0
- package/lib/commands/kit/data/bulk/upsert.d.ts +2 -49
- package/lib/commands/kit/data/bulk/upsert.js +2 -209
- package/lib/commands/kit/data/bulk/upsert.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ $ npm install -g @kitalive/sfdx-plugin
|
|
|
18
18
|
$ sfdx COMMAND
|
|
19
19
|
running command...
|
|
20
20
|
$ sfdx (-v|--version|version)
|
|
21
|
-
@kitalive/sfdx-plugin/0.
|
|
21
|
+
@kitalive/sfdx-plugin/0.2.0 darwin-x64 node-v14.15.0
|
|
22
22
|
$ sfdx --help [COMMAND]
|
|
23
23
|
USAGE
|
|
24
24
|
$ sfdx COMMAND
|
|
@@ -29,23 +29,279 @@ USAGE
|
|
|
29
29
|
## Commands
|
|
30
30
|
|
|
31
31
|
<!-- commands -->
|
|
32
|
-
* [`sfdx kit:data:bulk:
|
|
32
|
+
* [`sfdx kit:data:bulk:delete -q <string> [--hard] [--concurrencymode <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkdelete--q-string---hard---concurrencymode-string--s-integer--w-integer--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
33
|
+
* [`sfdx kit:data:bulk:insert -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkinsert--o-string--f-filepath--r-filepath--e-string--d-string--q-string---skiplines-integer---trim--m-filepath--c-filepath---setnull---convertonly---concurrencymode-string---assignmentruleid-string--s-integer--w-integer--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
34
|
+
* [`sfdx kit:data:bulk:query -q <string> [-f <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkquery--q-string--f-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
35
|
+
* [`sfdx kit:data:bulk:update -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkupdate--o-string--f-filepath--r-filepath--e-string--d-string--q-string---skiplines-integer---trim--m-filepath--c-filepath---setnull---convertonly---concurrencymode-string---assignmentruleid-string--s-integer--w-integer--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
36
|
+
* [`sfdx kit:data:bulk:upsert -o <string> -f <filepath> -i <string> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkupsert--o-string--f-filepath--i-string--r-filepath--e-string--d-string--q-string---skiplines-integer---trim--m-filepath--c-filepath---setnull---convertonly---concurrencymode-string---assignmentruleid-string--s-integer--w-integer--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
33
37
|
* [`sfdx kit:data:csv:convert [-f <filepath>] [-o <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatacsvconvert--f-filepath--o-filepath--e-string--d-string--q-string---skiplines-integer---trim--m-filepath--c-filepath---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
34
38
|
* [`sfdx kit:layout:assignments:deploy -f <string> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitlayoutassignmentsdeploy--f-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
35
39
|
* [`sfdx kit:layout:assignments:retrieve -f <string> [-p <string>] [-o <string>] [--merge] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitlayoutassignmentsretrieve--f-string--p-string--o-string---merge--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
36
40
|
* [`sfdx kit:script:execute [-f <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitscriptexecute--f-filepath--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
37
41
|
|
|
38
|
-
## `sfdx kit:data:bulk:
|
|
42
|
+
## `sfdx kit:data:bulk:delete -q <string> [--hard] [--concurrencymode <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
43
|
+
|
|
44
|
+
bulk delete records by SOQL select query
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
bulk delete records by SOQL select query
|
|
48
|
+
|
|
49
|
+
USAGE
|
|
50
|
+
$ sfdx kit:data:bulk:delete -q <string> [--hard] [--concurrencymode <string>] [-s <integer>] [-w <integer>] [-u
|
|
51
|
+
<string>] [--apiversion <string>] [--json] [--loglevel
|
|
52
|
+
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
53
|
+
|
|
54
|
+
OPTIONS
|
|
55
|
+
-q, --query=query (required) SOQL query to delete
|
|
56
|
+
|
|
57
|
+
-s, --batchsize=batchsize [default: 10000] the batch size of
|
|
58
|
+
the job
|
|
59
|
+
|
|
60
|
+
-u, --targetusername=targetusername username or alias for the target
|
|
61
|
+
org; overrides default target org
|
|
62
|
+
|
|
63
|
+
-w, --wait=wait the number of minutes to wait for
|
|
64
|
+
the command to complete before
|
|
65
|
+
displaying the results
|
|
66
|
+
|
|
67
|
+
--apiversion=apiversion override the api version used for
|
|
68
|
+
api requests made by this command
|
|
69
|
+
|
|
70
|
+
--concurrencymode=concurrencymode [default: Parallel] the concurrency
|
|
71
|
+
mode (Parallel or Serial) for the
|
|
72
|
+
job
|
|
73
|
+
|
|
74
|
+
--hard perform a hard delete
|
|
75
|
+
|
|
76
|
+
--json format output as json
|
|
77
|
+
|
|
78
|
+
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
79
|
+
this command invocation
|
|
80
|
+
|
|
81
|
+
EXAMPLE
|
|
82
|
+
$ sfdx kit:data:bulk:delete -q 'SELECT Id FROM Opportunity WHERE CloseDate < LAST_N_YEARS:5'
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
_See code: [src/commands/kit/data/bulk/delete.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.2.0/src/commands/kit/data/bulk/delete.ts)_
|
|
86
|
+
|
|
87
|
+
## `sfdx kit:data:bulk:insert -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
88
|
+
|
|
89
|
+
bulk insert records from a CSV file
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
bulk insert records from a CSV file
|
|
93
|
+
For information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.
|
|
94
|
+
|
|
95
|
+
USAGE
|
|
96
|
+
$ sfdx kit:data:bulk:insert -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>]
|
|
97
|
+
[--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode
|
|
98
|
+
<string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json]
|
|
99
|
+
[--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
100
|
+
|
|
101
|
+
OPTIONS
|
|
102
|
+
-c, --converter=converter the path of the script to convert
|
|
103
|
+
CSV rows
|
|
104
|
+
|
|
105
|
+
-d, --delimiter=delimiter [default: ,] the input CSV file
|
|
106
|
+
delimiter
|
|
107
|
+
|
|
108
|
+
-e, --encoding=encoding [default: utf8] the input CSV file
|
|
109
|
+
encoding
|
|
110
|
+
|
|
111
|
+
-f, --csvfile=csvfile (required) the CSV file path that
|
|
112
|
+
defines the records to insert
|
|
113
|
+
|
|
114
|
+
-m, --mapping=mapping the path of the JSON file that
|
|
115
|
+
defines CSV column mappings
|
|
116
|
+
|
|
117
|
+
-o, --object=object (required) the sObject name to
|
|
118
|
+
insert
|
|
119
|
+
|
|
120
|
+
-q, --quote=quote [default: "] the input CSV file
|
|
121
|
+
quote character
|
|
122
|
+
|
|
123
|
+
-r, --resultfile=resultfile the CSV file path for writing the
|
|
124
|
+
insert results
|
|
125
|
+
|
|
126
|
+
-s, --batchsize=batchsize [default: 10000] the batch size of
|
|
127
|
+
the job
|
|
128
|
+
|
|
129
|
+
-u, --targetusername=targetusername username or alias for the target
|
|
130
|
+
org; overrides default target org
|
|
131
|
+
|
|
132
|
+
-w, --wait=wait the number of minutes to wait for
|
|
133
|
+
the command to complete before
|
|
134
|
+
displaying the results
|
|
135
|
+
|
|
136
|
+
--apiversion=apiversion override the api version used for
|
|
137
|
+
api requests made by this command
|
|
138
|
+
|
|
139
|
+
--assignmentruleid=assignmentruleid the ID of a specific assignment rule
|
|
140
|
+
to run for a case or a lead.
|
|
141
|
+
|
|
142
|
+
--concurrencymode=concurrencymode [default: Parallel] the concurrency
|
|
143
|
+
mode (Parallel or Serial) for the
|
|
144
|
+
job
|
|
145
|
+
|
|
146
|
+
--convertonly output converted.csv file and skip
|
|
147
|
+
insert for debugging
|
|
148
|
+
|
|
149
|
+
--json format output as json
|
|
150
|
+
|
|
151
|
+
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
152
|
+
this command invocation
|
|
153
|
+
|
|
154
|
+
--setnull set blank values as null values
|
|
155
|
+
during insert operations (default:
|
|
156
|
+
empty field values are ignored)
|
|
157
|
+
|
|
158
|
+
--skiplines=skiplines the number of lines to skip
|
|
159
|
+
|
|
160
|
+
--trim trim all white space from columns
|
|
161
|
+
|
|
162
|
+
DESCRIPTION
|
|
163
|
+
For information about CSV file formats, see [Prepare CSV
|
|
164
|
+
Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
|
|
165
|
+
the Bulk API Developer Guide.
|
|
166
|
+
|
|
167
|
+
EXAMPLES
|
|
168
|
+
$ sfdx kit:data:bulk:insert -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json
|
|
169
|
+
$ sfdx kit:data:bulk:insert -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -w 10
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
_See code: [src/commands/kit/data/bulk/insert.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.2.0/src/commands/kit/data/bulk/insert.ts)_
|
|
173
|
+
|
|
174
|
+
## `sfdx kit:data:bulk:query -q <string> [-f <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
175
|
+
|
|
176
|
+
bulk query records
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
bulk query records
|
|
180
|
+
|
|
181
|
+
USAGE
|
|
182
|
+
$ sfdx kit:data:bulk:query -q <string> [-f <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
|
183
|
+
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
184
|
+
|
|
185
|
+
OPTIONS
|
|
186
|
+
-f, --csvfile=csvfile output csv file (default: standard
|
|
187
|
+
output)
|
|
188
|
+
|
|
189
|
+
-q, --query=query (required) SOQL query to export
|
|
190
|
+
|
|
191
|
+
-u, --targetusername=targetusername username or alias for the target
|
|
192
|
+
org; overrides default target org
|
|
193
|
+
|
|
194
|
+
--apiversion=apiversion override the api version used for
|
|
195
|
+
api requests made by this command
|
|
196
|
+
|
|
197
|
+
--json format output as json
|
|
198
|
+
|
|
199
|
+
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
200
|
+
this command invocation
|
|
201
|
+
|
|
202
|
+
EXAMPLE
|
|
203
|
+
$ sfdx kit:data:bulk:query -q 'SELECT Id, Name FROM Account' -f ./path/to/Account.csv
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
_See code: [src/commands/kit/data/bulk/query.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.2.0/src/commands/kit/data/bulk/query.ts)_
|
|
207
|
+
|
|
208
|
+
## `sfdx kit:data:bulk:update -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
209
|
+
|
|
210
|
+
bulk update records from a CSV file
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
bulk update records from a CSV file
|
|
214
|
+
For information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.
|
|
215
|
+
|
|
216
|
+
USAGE
|
|
217
|
+
$ sfdx kit:data:bulk:update -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>]
|
|
218
|
+
[--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode
|
|
219
|
+
<string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json]
|
|
220
|
+
[--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
221
|
+
|
|
222
|
+
OPTIONS
|
|
223
|
+
-c, --converter=converter the path of the script to convert
|
|
224
|
+
CSV rows
|
|
225
|
+
|
|
226
|
+
-d, --delimiter=delimiter [default: ,] the input CSV file
|
|
227
|
+
delimiter
|
|
228
|
+
|
|
229
|
+
-e, --encoding=encoding [default: utf8] the input CSV file
|
|
230
|
+
encoding
|
|
231
|
+
|
|
232
|
+
-f, --csvfile=csvfile (required) the CSV file path that
|
|
233
|
+
defines the records to update
|
|
234
|
+
|
|
235
|
+
-m, --mapping=mapping the path of the JSON file that
|
|
236
|
+
defines CSV column mappings
|
|
237
|
+
|
|
238
|
+
-o, --object=object (required) the sObject name to
|
|
239
|
+
update
|
|
240
|
+
|
|
241
|
+
-q, --quote=quote [default: "] the input CSV file
|
|
242
|
+
quote character
|
|
243
|
+
|
|
244
|
+
-r, --resultfile=resultfile the CSV file path for writing the
|
|
245
|
+
update results
|
|
246
|
+
|
|
247
|
+
-s, --batchsize=batchsize [default: 10000] the batch size of
|
|
248
|
+
the job
|
|
249
|
+
|
|
250
|
+
-u, --targetusername=targetusername username or alias for the target
|
|
251
|
+
org; overrides default target org
|
|
252
|
+
|
|
253
|
+
-w, --wait=wait the number of minutes to wait for
|
|
254
|
+
the command to complete before
|
|
255
|
+
displaying the results
|
|
256
|
+
|
|
257
|
+
--apiversion=apiversion override the api version used for
|
|
258
|
+
api requests made by this command
|
|
259
|
+
|
|
260
|
+
--assignmentruleid=assignmentruleid the ID of a specific assignment rule
|
|
261
|
+
to run for a case or a lead.
|
|
262
|
+
|
|
263
|
+
--concurrencymode=concurrencymode [default: Parallel] the concurrency
|
|
264
|
+
mode (Parallel or Serial) for the
|
|
265
|
+
job
|
|
266
|
+
|
|
267
|
+
--convertonly output converted.csv file and skip
|
|
268
|
+
update for debugging
|
|
269
|
+
|
|
270
|
+
--json format output as json
|
|
271
|
+
|
|
272
|
+
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
273
|
+
this command invocation
|
|
274
|
+
|
|
275
|
+
--setnull set blank values as null values
|
|
276
|
+
during update operations (default:
|
|
277
|
+
empty field values are ignored)
|
|
278
|
+
|
|
279
|
+
--skiplines=skiplines the number of lines to skip
|
|
280
|
+
|
|
281
|
+
--trim trim all white space from columns
|
|
282
|
+
|
|
283
|
+
DESCRIPTION
|
|
284
|
+
For information about CSV file formats, see [Prepare CSV
|
|
285
|
+
Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
|
|
286
|
+
the Bulk API Developer Guide.
|
|
287
|
+
|
|
288
|
+
EXAMPLES
|
|
289
|
+
$ sfdx kit:data:bulk:update -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json
|
|
290
|
+
$ sfdx kit:data:bulk:update -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -w 10
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
_See code: [src/commands/kit/data/bulk/update.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.2.0/src/commands/kit/data/bulk/update.ts)_
|
|
294
|
+
|
|
295
|
+
## `sfdx kit:data:bulk:upsert -o <string> -f <filepath> -i <string> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
39
296
|
|
|
40
297
|
bulk upsert records from a CSV file
|
|
41
298
|
|
|
42
299
|
```
|
|
43
300
|
bulk upsert records from a CSV file
|
|
44
|
-
Upsert records using Bulk API and returns a job ID and a batch ID. Use these IDs to check job status with data:bulk:status.
|
|
45
301
|
For information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.
|
|
46
302
|
|
|
47
303
|
USAGE
|
|
48
|
-
$ sfdx kit:data:bulk:upsert -o <string> -
|
|
304
|
+
$ sfdx kit:data:bulk:upsert -o <string> -f <filepath> -i <string> [-r <filepath>] [-e <string>] [-d <string>] [-q
|
|
49
305
|
<string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly]
|
|
50
306
|
[--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion
|
|
51
307
|
<string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
@@ -115,8 +371,6 @@ OPTIONS
|
|
|
115
371
|
--trim trim all white space from columns
|
|
116
372
|
|
|
117
373
|
DESCRIPTION
|
|
118
|
-
Upsert records using Bulk API and returns a job ID and a batch ID. Use these IDs to check job status with
|
|
119
|
-
data:bulk:status.
|
|
120
374
|
For information about CSV file formats, see [Prepare CSV
|
|
121
375
|
Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
|
|
122
376
|
the Bulk API Developer Guide.
|
|
@@ -127,7 +381,7 @@ EXAMPLES
|
|
|
127
381
|
10
|
|
128
382
|
```
|
|
129
383
|
|
|
130
|
-
_See code: [src/commands/kit/data/bulk/upsert.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.
|
|
384
|
+
_See code: [src/commands/kit/data/bulk/upsert.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.2.0/src/commands/kit/data/bulk/upsert.ts)_
|
|
131
385
|
|
|
132
386
|
## `sfdx kit:data:csv:convert [-f <filepath>] [-o <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
133
387
|
|
|
@@ -177,7 +431,7 @@ EXAMPLES
|
|
|
177
431
|
$ sfdx kit:data:csv:convert -f ./path/to/input.csv -o ./path/to/output.csv -c ./path/to/convert.js -e cp932 -d :
|
|
178
432
|
```
|
|
179
433
|
|
|
180
|
-
_See code: [src/commands/kit/data/csv/convert.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.
|
|
434
|
+
_See code: [src/commands/kit/data/csv/convert.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.2.0/src/commands/kit/data/csv/convert.ts)_
|
|
181
435
|
|
|
182
436
|
## `sfdx kit:layout:assignments:deploy -f <string> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
183
437
|
|
|
@@ -212,7 +466,7 @@ EXAMPLES
|
|
|
212
466
|
$ sfdx kit:layout:assignments:deploy -u me@my.org -f config/layout-assignments.sandbox.json
|
|
213
467
|
```
|
|
214
468
|
|
|
215
|
-
_See code: [src/commands/kit/layout/assignments/deploy.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.
|
|
469
|
+
_See code: [src/commands/kit/layout/assignments/deploy.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.2.0/src/commands/kit/layout/assignments/deploy.ts)_
|
|
216
470
|
|
|
217
471
|
## `sfdx kit:layout:assignments:retrieve -f <string> [-p <string>] [-o <string>] [--merge] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
218
472
|
|
|
@@ -258,7 +512,7 @@ EXAMPLES
|
|
|
258
512
|
$ sfdx kit:layout:assignments:retrieve -u me@my.org -f config/layout-assignments.sandbox.json
|
|
259
513
|
```
|
|
260
514
|
|
|
261
|
-
_See code: [src/commands/kit/layout/assignments/retrieve.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.
|
|
515
|
+
_See code: [src/commands/kit/layout/assignments/retrieve.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.2.0/src/commands/kit/layout/assignments/retrieve.ts)_
|
|
262
516
|
|
|
263
517
|
## `sfdx kit:script:execute [-f <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
264
518
|
|
|
@@ -307,5 +561,5 @@ EXAMPLES
|
|
|
307
561
|
$ NODE_OPTIONS=--experimental-repl-await sfdx kit:script:execute
|
|
308
562
|
```
|
|
309
563
|
|
|
310
|
-
_See code: [src/commands/kit/script/execute.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.
|
|
564
|
+
_See code: [src/commands/kit/script/execute.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.2.0/src/commands/kit/script/execute.ts)_
|
|
311
565
|
<!-- commandsstop -->
|
package/lib/bulk.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { JsonMap } from '@salesforce/ts-types';
|
|
3
|
+
import { BatchInfo, BatchResultInfo, Connection, JobInfo } from 'jsforce';
|
|
4
|
+
declare type BulkOperation = 'insert' | 'update' | 'upsert' | 'delete' | 'hardDelete';
|
|
5
|
+
declare type BulkOptions = {
|
|
6
|
+
extIdField?: string;
|
|
7
|
+
concurrencyMode?: 'Serial' | 'Parallel';
|
|
8
|
+
assignmentRuleId?: string;
|
|
9
|
+
batchSize?: number;
|
|
10
|
+
wait?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare type BulkResult = {
|
|
13
|
+
job?: JobInfo;
|
|
14
|
+
batches?: BatchInfo[];
|
|
15
|
+
records: BatchResultInfo[];
|
|
16
|
+
errors?: JsonMap[];
|
|
17
|
+
};
|
|
18
|
+
export declare function bulkQuery(conn: Connection, query: string): Promise<JsonMap[]>;
|
|
19
|
+
export declare function bulkLoad(conn: Connection, sobject: string, operation: BulkOperation, rows: JsonMap[], options?: BulkOptions): Promise<BulkResult>;
|
|
20
|
+
export declare function normalizeDateString(str: any, format?: any): any;
|
|
21
|
+
export declare const createBulkCommand: (operation: BulkOperation) => new (...args: any[]) => SfdxCommand;
|
|
22
|
+
export {};
|
package/lib/bulk.js
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createBulkCommand = exports.normalizeDateString = exports.bulkLoad = exports.bulkQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const command_1 = require("@salesforce/command");
|
|
6
|
+
const dayjs = require("dayjs");
|
|
7
|
+
const csv = require("fast-csv");
|
|
8
|
+
const fs = require("fs-extra");
|
|
9
|
+
const path = require("path");
|
|
10
|
+
const convert_1 = require("./commands/kit/data/csv/convert");
|
|
11
|
+
const convert_2 = require("./commands/kit/data/csv/convert");
|
|
12
|
+
const utils = require("./utils");
|
|
13
|
+
function bulkQuery(conn, query) {
|
|
14
|
+
return new Promise((resolve, reject) => {
|
|
15
|
+
const records = [];
|
|
16
|
+
conn.bulk.query(query)
|
|
17
|
+
.on('error', reject)
|
|
18
|
+
.on('record', record => records.push(record))
|
|
19
|
+
.on('end', () => resolve(records));
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
exports.bulkQuery = bulkQuery;
|
|
23
|
+
function bulkLoad(conn, sobject, operation, rows, options) {
|
|
24
|
+
const _a = options || {}, { batchSize = 10000, wait } = _a, jobOptions = tslib_1.__rest(_a, ["batchSize", "wait"]);
|
|
25
|
+
const job = conn.bulk.createJob(sobject, operation, jobOptions);
|
|
26
|
+
const fetchResults = async (records) => ({
|
|
27
|
+
job: await job.check(),
|
|
28
|
+
batches: await job.list(),
|
|
29
|
+
records
|
|
30
|
+
});
|
|
31
|
+
const executeBatch = batchRows => new Promise((resolve, reject) => {
|
|
32
|
+
const batch = job.createBatch();
|
|
33
|
+
batch.on('error', e => {
|
|
34
|
+
if (e.message.startsWith('Polling time out'))
|
|
35
|
+
job.emit('error', e);
|
|
36
|
+
reject(e);
|
|
37
|
+
});
|
|
38
|
+
batch.on('queue', batchInfo => {
|
|
39
|
+
batch.check().then(result => {
|
|
40
|
+
if (result.state === 'Failed') {
|
|
41
|
+
reject(result.stateMessage);
|
|
42
|
+
}
|
|
43
|
+
else if (wait) {
|
|
44
|
+
batch.poll(5000, wait * 60000);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
fetchResults([]).then(resolve).catch(reject);
|
|
48
|
+
}
|
|
49
|
+
}).catch(reject);
|
|
50
|
+
});
|
|
51
|
+
batch.on('response', resolve);
|
|
52
|
+
batch.execute(batchRows, error => error && reject(error));
|
|
53
|
+
});
|
|
54
|
+
return new Promise(async (resolve, reject) => {
|
|
55
|
+
job.on('error', reject);
|
|
56
|
+
try {
|
|
57
|
+
const results = await Promise.all(utils.chunk(rows, batchSize).map(executeBatch));
|
|
58
|
+
resolve(await fetchResults(results.flat()));
|
|
59
|
+
}
|
|
60
|
+
catch (e) {
|
|
61
|
+
reject(e);
|
|
62
|
+
}
|
|
63
|
+
finally {
|
|
64
|
+
await job.close();
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
exports.bulkLoad = bulkLoad;
|
|
69
|
+
function normalizeDateString(str, format) {
|
|
70
|
+
if (!str)
|
|
71
|
+
return str;
|
|
72
|
+
const d = dayjs(str);
|
|
73
|
+
return format ? d.format(format) : d.toISOString();
|
|
74
|
+
}
|
|
75
|
+
exports.normalizeDateString = normalizeDateString;
|
|
76
|
+
const converters = {
|
|
77
|
+
date: value => normalizeDateString(value, 'YYYY-MM-DD'),
|
|
78
|
+
datetime: normalizeDateString
|
|
79
|
+
};
|
|
80
|
+
const csvFlags = convert_1.default['flagsConfig'];
|
|
81
|
+
const createBulkCommand = (operation) => {
|
|
82
|
+
var _a;
|
|
83
|
+
const config = {
|
|
84
|
+
object: command_1.flags.string({ char: 'o', required: true, description: `the sObject name to ${operation}` }),
|
|
85
|
+
// csv settings
|
|
86
|
+
csvfile: command_1.flags.filepath({ char: 'f', required: true, description: `the CSV file path that defines the records to ${operation}` }),
|
|
87
|
+
resultfile: command_1.flags.filepath({ char: 'r', description: `the CSV file path for writing the ${operation} results` }),
|
|
88
|
+
encoding: csvFlags.encoding,
|
|
89
|
+
delimiter: csvFlags.delimiter,
|
|
90
|
+
quote: csvFlags.quote,
|
|
91
|
+
skiplines: csvFlags.skiplines,
|
|
92
|
+
trim: csvFlags.trim,
|
|
93
|
+
mapping: csvFlags.mapping,
|
|
94
|
+
converter: csvFlags.converter,
|
|
95
|
+
setnull: command_1.flags.boolean({ description: `set blank values as null values during ${operation} operations (default: empty field values are ignored)` }),
|
|
96
|
+
convertonly: command_1.flags.boolean({ description: `output converted.csv file and skip ${operation} for debugging` }),
|
|
97
|
+
// job settings
|
|
98
|
+
concurrencymode: command_1.flags.string({ default: 'Parallel', description: 'the concurrency mode (Parallel or Serial) for the job' }),
|
|
99
|
+
assignmentruleid: command_1.flags.string({ description: 'the ID of a specific assignment rule to run for a case or a lead.' }),
|
|
100
|
+
batchsize: command_1.flags.integer({ char: 's', min: 1, max: 10000, default: 10000, description: 'the batch size of the job' }),
|
|
101
|
+
wait: command_1.flags.integer({ char: 'w', min: 0, description: 'the number of minutes to wait for the command to complete before displaying the results' })
|
|
102
|
+
};
|
|
103
|
+
const examples = [
|
|
104
|
+
`$ sfdx kit:data:bulk:${operation} -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json`
|
|
105
|
+
];
|
|
106
|
+
if (operation === 'upsert') {
|
|
107
|
+
config['externalid'] = command_1.flags.string({ char: 'i', required: true, default: 'Id', description: 'the column name of the external ID' });
|
|
108
|
+
examples.push('$ sfdx kit:data:bulk:upsert -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -i MyExternalId__c -w 10');
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
examples.push(`$ sfdx kit:data:bulk:${operation} -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -w 10`);
|
|
112
|
+
}
|
|
113
|
+
return _a = class extends command_1.SfdxCommand {
|
|
114
|
+
async run() {
|
|
115
|
+
const { object, csvfile, mapping, converter, encoding, delimiter, quote, skiplines, trim, setnull } = this.flags;
|
|
116
|
+
const mappingJson = (mapping) ? (await fs.readJson(mapping)) : undefined;
|
|
117
|
+
const script = converter ? this.loadScript(converter) : {};
|
|
118
|
+
const fieldTypes = await this.getFieldTypes(object);
|
|
119
|
+
this.ux.startSpinner('Processing csv');
|
|
120
|
+
if (script.start)
|
|
121
|
+
await script.start(this);
|
|
122
|
+
let rows = await this.parseCsv(fs.createReadStream(csvfile), {
|
|
123
|
+
encoding,
|
|
124
|
+
delimiter,
|
|
125
|
+
quote,
|
|
126
|
+
skiplines,
|
|
127
|
+
trim: !!trim,
|
|
128
|
+
setnull,
|
|
129
|
+
mapping: mappingJson,
|
|
130
|
+
convert: script.convert,
|
|
131
|
+
fieldTypes
|
|
132
|
+
});
|
|
133
|
+
if (script.finish) {
|
|
134
|
+
const result = await script.finish(rows, this);
|
|
135
|
+
if (result)
|
|
136
|
+
rows = result;
|
|
137
|
+
}
|
|
138
|
+
this.ux.stopSpinner();
|
|
139
|
+
if (this.flags.convertonly) {
|
|
140
|
+
const base = path.basename(csvfile, path.extname(csvfile));
|
|
141
|
+
this.saveCsv(path.join(path.dirname(csvfile), base + '.converted.csv'), rows);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
this.ux.startSpinner(`Bulk ${operation}`);
|
|
145
|
+
try {
|
|
146
|
+
const result = await this.bulkLoad(this.org.getConnection(), object, operation, rows, {
|
|
147
|
+
extIdField: this.flags.externalid,
|
|
148
|
+
concurrencyMode: this.flags.concurrencymode,
|
|
149
|
+
assignmentRuleId: this.flags.assignmentruleid,
|
|
150
|
+
batchSize: this.flags.batchsize,
|
|
151
|
+
wait: this.flags.wait
|
|
152
|
+
});
|
|
153
|
+
const batchErrors = [];
|
|
154
|
+
if (this.flags.wait) {
|
|
155
|
+
const { numberRecordsProcessed, numberRecordsFailed } = result.job;
|
|
156
|
+
this.ux.stopSpinner(`${numberRecordsProcessed} processed, ${numberRecordsFailed} failed.`);
|
|
157
|
+
rows = rows.map((data, i) => {
|
|
158
|
+
const { id, errors } = result.records[i] || {};
|
|
159
|
+
const message = errors === null || errors === void 0 ? void 0 : errors.join(', ');
|
|
160
|
+
if (message) {
|
|
161
|
+
batchErrors.push({ line: i + 2, message, data });
|
|
162
|
+
}
|
|
163
|
+
return Object.assign(Object.assign({}, data), { Id: id, Errors: message });
|
|
164
|
+
});
|
|
165
|
+
if (batchErrors.length) {
|
|
166
|
+
result.errors = batchErrors;
|
|
167
|
+
this.ux.styledHeader('Error details');
|
|
168
|
+
this.ux.table(batchErrors, ['line', 'message']);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
this.ux.stopSpinner();
|
|
173
|
+
this.ux.log('Check bulk job status with the command: ');
|
|
174
|
+
this.ux.log(`sfdx force:org:open -u ${this.flags.targetusername} -p "lightning/setup/AsyncApiJobStatus/page?address=%2F${result.job.id}"`);
|
|
175
|
+
}
|
|
176
|
+
if (this.flags.resultfile)
|
|
177
|
+
this.saveCsv(this.flags.resultfile, rows);
|
|
178
|
+
return result;
|
|
179
|
+
}
|
|
180
|
+
catch (e) {
|
|
181
|
+
this.ux.stopSpinner('error');
|
|
182
|
+
throw e;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
async parseCsv(input, options) {
|
|
186
|
+
const { encoding, delimiter, quote, skiplines, trim, mapping, convert, setnull, fieldTypes } = options !== null && options !== void 0 ? options : {};
|
|
187
|
+
return await convert_2.parseCsv(input, { encoding, delimiter, quote, skiplines, trim, mapping, convert: row => {
|
|
188
|
+
const result = convert ? convert(row) : row;
|
|
189
|
+
if (!result)
|
|
190
|
+
return;
|
|
191
|
+
if (fieldTypes) {
|
|
192
|
+
for (const key of Object.keys(result)) {
|
|
193
|
+
const converter = converters[fieldTypes[key]];
|
|
194
|
+
if (converter)
|
|
195
|
+
result[key] = converter(result[key]);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (setnull) {
|
|
199
|
+
for (const key of Object.keys(result)) {
|
|
200
|
+
if (key.includes('.'))
|
|
201
|
+
continue; // skip reference
|
|
202
|
+
if (result[key] == null || result[key] === '')
|
|
203
|
+
result[key] = '#N/A';
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return result;
|
|
207
|
+
} });
|
|
208
|
+
}
|
|
209
|
+
bulkLoad(conn, sobject, op, rows, options) {
|
|
210
|
+
return bulkLoad(conn, sobject, op, rows, options);
|
|
211
|
+
}
|
|
212
|
+
saveCsv(file, rows) {
|
|
213
|
+
csv.writeToPath(file, rows, { headers: true, writeBOM: true });
|
|
214
|
+
}
|
|
215
|
+
loadScript(file) {
|
|
216
|
+
return convert_2.loadScript(file);
|
|
217
|
+
}
|
|
218
|
+
async getFieldTypes(sobject) {
|
|
219
|
+
const conn = this.org.getConnection();
|
|
220
|
+
const objectInfo = await conn.describe(sobject);
|
|
221
|
+
return objectInfo.fields.reduce((info, { name, type }) => Object.assign(info, { [name]: type }), {});
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
_a.description = [
|
|
225
|
+
`bulk ${operation} records from a CSV file`,
|
|
226
|
+
'For information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.'
|
|
227
|
+
].join('\n'),
|
|
228
|
+
_a.examples = examples,
|
|
229
|
+
_a.requiresUsername = true,
|
|
230
|
+
_a.requiresProject = false,
|
|
231
|
+
_a.flagsConfig = config,
|
|
232
|
+
_a;
|
|
233
|
+
};
|
|
234
|
+
exports.createBulkCommand = createBulkCommand;
|
|
235
|
+
//# sourceMappingURL=bulk.js.map
|
package/lib/bulk.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk.js","sourceRoot":"","sources":["../src/bulk.ts"],"names":[],"mappings":";;;;AAAA,iDAAyD;AAEzD,+BAA+B;AAC/B,gCAAgC;AAChC,+BAA+B;AAE/B,6BAA6B;AAE7B,6DAAgE;AAChE,6DAAuE;AACvE,iCAAiC;AAqBjC,SAAgB,SAAS,CAAC,IAAgB,EAAE,KAAa;IACvD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;aACnB,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;aACnB,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aAC5C,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC;AARD,8BAQC;AAED,SAAgB,QAAQ,CAAC,IAAgB,EAAE,OAAe,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