@salesforce/plugin-data 2.6.2 → 2.6.4-test.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 +113 -113
- package/lib/BulkBaseCommand.js +26 -26
- package/lib/BulkBaseCommand.js.map +1 -1
- package/lib/api/data/tree/exportApi.js +31 -30
- package/lib/api/data/tree/exportApi.js.map +1 -1
- package/lib/api/data/tree/importApi.js +46 -43
- package/lib/api/data/tree/importApi.js.map +1 -1
- package/lib/batcher.js +24 -17
- package/lib/batcher.js.map +1 -1
- package/lib/bulkDataRequestCache.js +21 -26
- package/lib/bulkDataRequestCache.js.map +1 -1
- package/lib/bulkOperationCommand.js +55 -57
- package/lib/bulkOperationCommand.js.map +1 -1
- package/lib/bulkUtils.js +20 -20
- package/lib/bulkUtils.js.map +1 -1
- package/lib/commands/data/create/record.js +38 -39
- package/lib/commands/data/create/record.js.map +1 -1
- package/lib/commands/data/delete/bulk.js +14 -15
- package/lib/commands/data/delete/bulk.js.map +1 -1
- package/lib/commands/data/delete/record.js +48 -49
- package/lib/commands/data/delete/record.js.map +1 -1
- package/lib/commands/data/delete/resume.js +16 -17
- package/lib/commands/data/delete/resume.js.map +1 -1
- package/lib/commands/data/export/tree.js +38 -39
- package/lib/commands/data/export/tree.js.map +1 -1
- package/lib/commands/data/get/record.js +50 -51
- package/lib/commands/data/get/record.js.map +1 -1
- package/lib/commands/data/import/tree.js +45 -46
- package/lib/commands/data/import/tree.js.map +1 -1
- package/lib/commands/data/query/resume.js +40 -42
- package/lib/commands/data/query/resume.js.map +1 -1
- package/lib/commands/data/query.js +91 -93
- package/lib/commands/data/query.js.map +1 -1
- package/lib/commands/data/resume.js +45 -40
- package/lib/commands/data/resume.js.map +1 -1
- package/lib/commands/data/update/record.js +61 -62
- package/lib/commands/data/update/record.js.map +1 -1
- package/lib/commands/data/upsert/bulk.js +24 -25
- package/lib/commands/data/upsert/bulk.js.map +1 -1
- package/lib/commands/data/upsert/resume.js +15 -16
- package/lib/commands/data/upsert/resume.js.map +1 -1
- package/lib/commands/force/data/bulk/delete.js +42 -43
- package/lib/commands/force/data/bulk/delete.js.map +1 -1
- package/lib/commands/force/data/bulk/status.js +40 -35
- package/lib/commands/force/data/bulk/status.js.map +1 -1
- package/lib/commands/force/data/bulk/upsert.js +54 -55
- package/lib/commands/force/data/bulk/upsert.js.map +1 -1
- package/lib/dataCommand.js +16 -21
- package/lib/dataCommand.js.map +1 -1
- package/lib/dataSoqlQueryTypes.js +4 -9
- package/lib/dataSoqlQueryTypes.js.map +1 -1
- package/lib/flags.js +12 -13
- package/lib/flags.js.map +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/queryUtils.js +8 -13
- package/lib/queryUtils.js.map +1 -1
- package/lib/reporters.js +52 -59
- package/lib/reporters.js.map +1 -1
- package/lib/resumeBulkCommand.js +37 -39
- package/lib/resumeBulkCommand.js.map +1 -1
- package/lib/types.js +1 -2
- package/oclif.lock +8086 -0
- package/oclif.manifest.json +1614 -854
- package/package.json +36 -53
package/README.md
CHANGED
|
@@ -76,30 +76,30 @@ sf plugins
|
|
|
76
76
|
|
|
77
77
|
<!-- commands -->
|
|
78
78
|
|
|
79
|
-
- [`sf data
|
|
80
|
-
- [`sf data
|
|
81
|
-
- [`sf data
|
|
82
|
-
- [`sf data
|
|
83
|
-
- [`sf data
|
|
84
|
-
- [`sf data
|
|
85
|
-
- [`sf data
|
|
86
|
-
- [`sf data
|
|
87
|
-
- [`sf data
|
|
88
|
-
- [`sf data
|
|
89
|
-
- [`sf data
|
|
90
|
-
- [`sf data
|
|
91
|
-
- [`sf data
|
|
92
|
-
- [`sf force
|
|
93
|
-
- [`sf force
|
|
94
|
-
- [`sf force
|
|
95
|
-
|
|
96
|
-
## `sf data
|
|
79
|
+
- [`sf data create record`](#sf-data-create-record)
|
|
80
|
+
- [`sf data delete bulk`](#sf-data-delete-bulk)
|
|
81
|
+
- [`sf data delete record`](#sf-data-delete-record)
|
|
82
|
+
- [`sf data delete resume`](#sf-data-delete-resume)
|
|
83
|
+
- [`sf data export tree`](#sf-data-export-tree)
|
|
84
|
+
- [`sf data get record`](#sf-data-get-record)
|
|
85
|
+
- [`sf data import tree`](#sf-data-import-tree)
|
|
86
|
+
- [`sf data query`](#sf-data-query)
|
|
87
|
+
- [`sf data query resume`](#sf-data-query-resume)
|
|
88
|
+
- [`sf data resume`](#sf-data-resume)
|
|
89
|
+
- [`sf data update record`](#sf-data-update-record)
|
|
90
|
+
- [`sf data upsert bulk`](#sf-data-upsert-bulk)
|
|
91
|
+
- [`sf data upsert resume`](#sf-data-upsert-resume)
|
|
92
|
+
- [`sf force data bulk delete`](#sf-force-data-bulk-delete)
|
|
93
|
+
- [`sf force data bulk status`](#sf-force-data-bulk-status)
|
|
94
|
+
- [`sf force data bulk upsert`](#sf-force-data-bulk-upsert)
|
|
95
|
+
|
|
96
|
+
## `sf data create record`
|
|
97
97
|
|
|
98
98
|
Create and insert a record into a Salesforce or Tooling API object.
|
|
99
99
|
|
|
100
100
|
```
|
|
101
101
|
USAGE
|
|
102
|
-
$ sf data
|
|
102
|
+
$ sf data create record -o <value> -s <value> -v <value> [--json] [--api-version <value>] [-t]
|
|
103
103
|
|
|
104
104
|
FLAGS
|
|
105
105
|
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
@@ -125,35 +125,35 @@ DESCRIPTION
|
|
|
125
125
|
Tooling API object.
|
|
126
126
|
|
|
127
127
|
ALIASES
|
|
128
|
-
$ sf force
|
|
128
|
+
$ sf force data record create
|
|
129
129
|
|
|
130
130
|
EXAMPLES
|
|
131
131
|
Insert a record into the Account object of your default org; only the required Name field has a value:
|
|
132
132
|
|
|
133
|
-
$ sf data
|
|
133
|
+
$ sf data create record --sobject Account --values "Name=Acme"
|
|
134
134
|
|
|
135
135
|
Insert an Account record with values for two fields, one value contains a space; the command uses the org with alias
|
|
136
136
|
"my-scratch":
|
|
137
137
|
|
|
138
|
-
$ sf data
|
|
138
|
+
$ sf data create record --sobject Account --values "Name='Universal Containers' Website=www.example.com" \
|
|
139
139
|
--target-org my-scratch
|
|
140
140
|
|
|
141
141
|
Insert a record into the Tooling API object TraceFlag:
|
|
142
142
|
|
|
143
|
-
$ sf data
|
|
143
|
+
$ sf data create record --use-tooling-api --sobject TraceFlag --values "DebugLevelId=7dl170000008U36AAE \
|
|
144
144
|
StartDate=2022-12-15T00:26:04.000+0000 ExpirationDate=2022-12-15T00:56:04.000+0000 LogType=CLASS_TRACING \
|
|
145
145
|
TracedEntityId=01p17000000R6bLAAS"
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
_See code: [src/commands/data/create/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
148
|
+
_See code: [src/commands/data/create/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/data/create/record.ts)_
|
|
149
149
|
|
|
150
|
-
## `sf data
|
|
150
|
+
## `sf data delete bulk`
|
|
151
151
|
|
|
152
152
|
Bulk delete records from an org using a CSV file. Uses Bulk API 2.0.
|
|
153
153
|
|
|
154
154
|
```
|
|
155
155
|
USAGE
|
|
156
|
-
$ sf data
|
|
156
|
+
$ sf data delete bulk -o <value> -f <value> -s <value> [--json] [--api-version <value>] [-w <value> | -a] [--verbose]
|
|
157
157
|
|
|
158
158
|
FLAGS
|
|
159
159
|
-a, --async Run the command asynchronously.
|
|
@@ -181,23 +181,23 @@ DESCRIPTION
|
|
|
181
181
|
EXAMPLES
|
|
182
182
|
Bulk delete Account records from your default org using the list of IDs in the "files/delete.csv" file:
|
|
183
183
|
|
|
184
|
-
$ sf data
|
|
184
|
+
$ sf data delete bulk --sobject Account --file files/delete.csv
|
|
185
185
|
|
|
186
186
|
Bulk delete records from a custom object in an org with alias my-scratch and wait 5 minutes for the command to
|
|
187
187
|
complete:
|
|
188
188
|
|
|
189
|
-
$ sf data
|
|
189
|
+
$ sf data delete bulk --sobject MyObject__c --file files/delete.csv --wait 5 --target-org my-scratch
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
_See code: [src/commands/data/delete/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
192
|
+
_See code: [src/commands/data/delete/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/data/delete/bulk.ts)_
|
|
193
193
|
|
|
194
|
-
## `sf data
|
|
194
|
+
## `sf data delete record`
|
|
195
195
|
|
|
196
196
|
Deletes a single record from a Salesforce or Tooling API object.
|
|
197
197
|
|
|
198
198
|
```
|
|
199
199
|
USAGE
|
|
200
|
-
$ sf data
|
|
200
|
+
$ sf data delete record -o <value> -s <value> [--json] [--api-version <value>] [-i <value>] [-w <value>] [-t]
|
|
201
201
|
|
|
202
202
|
FLAGS
|
|
203
203
|
-i, --record-id=<value> ID of the record you’re deleting.
|
|
@@ -225,37 +225,37 @@ DESCRIPTION
|
|
|
225
225
|
Tooling API object.
|
|
226
226
|
|
|
227
227
|
ALIASES
|
|
228
|
-
$ sf force
|
|
228
|
+
$ sf force data record delete
|
|
229
229
|
|
|
230
230
|
EXAMPLES
|
|
231
231
|
Delete a record from Account with the specified (truncated) ID:
|
|
232
232
|
|
|
233
|
-
$ sf data
|
|
233
|
+
$ sf data delete record --sobject Account --record-id 00180XX
|
|
234
234
|
|
|
235
235
|
Delete a record from Account whose name equals "Acme":
|
|
236
236
|
|
|
237
|
-
$ sf data
|
|
237
|
+
$ sf data delete record --sobject Account --where "Name=Acme"
|
|
238
238
|
|
|
239
239
|
Delete a record from Account identified with two field values, one that contains a space; the command uses the org
|
|
240
240
|
with alias "my-scratch":
|
|
241
241
|
|
|
242
|
-
$ sf data
|
|
242
|
+
$ sf data delete record --sobject Account --where "Name='Universal Containers' Phone='(123) 456-7890'" \
|
|
243
243
|
--target-org myscratch
|
|
244
244
|
|
|
245
245
|
Delete a record from the Tooling API object TraceFlag with the specified (truncated) ID:
|
|
246
246
|
|
|
247
|
-
$ sf data
|
|
247
|
+
$ sf data delete record --use-tooling-api --sobject TraceFlag --record-id 7tf8c
|
|
248
248
|
```
|
|
249
249
|
|
|
250
|
-
_See code: [src/commands/data/delete/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
250
|
+
_See code: [src/commands/data/delete/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/data/delete/record.ts)_
|
|
251
251
|
|
|
252
|
-
## `sf data
|
|
252
|
+
## `sf data delete resume`
|
|
253
253
|
|
|
254
254
|
Resume a bulk delete job that you previously started. Uses Bulk API 2.0.
|
|
255
255
|
|
|
256
256
|
```
|
|
257
257
|
USAGE
|
|
258
|
-
$ sf data
|
|
258
|
+
$ sf data delete resume [--json] [-o <value>] [--use-most-recent | -i <value>] [--wait <value>] [--api-version
|
|
259
259
|
<value>]
|
|
260
260
|
|
|
261
261
|
FLAGS
|
|
@@ -277,22 +277,22 @@ DESCRIPTION
|
|
|
277
277
|
EXAMPLES
|
|
278
278
|
Resume a bulk delete job from your default org using an ID:
|
|
279
279
|
|
|
280
|
-
$ sf data
|
|
280
|
+
$ sf data delete resume --job-id 750xx000000005sAAA
|
|
281
281
|
|
|
282
282
|
Resume the most recently run bulk delete job for an org with alias my-scratch:
|
|
283
283
|
|
|
284
|
-
$ sf data
|
|
284
|
+
$ sf data delete resume --use-most-recent --target-org my-scratch
|
|
285
285
|
```
|
|
286
286
|
|
|
287
|
-
_See code: [src/commands/data/delete/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
287
|
+
_See code: [src/commands/data/delete/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/data/delete/resume.ts)_
|
|
288
288
|
|
|
289
|
-
## `sf data
|
|
289
|
+
## `sf data export tree`
|
|
290
290
|
|
|
291
291
|
Export data from an org into one or more JSON files.
|
|
292
292
|
|
|
293
293
|
```
|
|
294
294
|
USAGE
|
|
295
|
-
$ sf data
|
|
295
|
+
$ sf data export tree -o <value> -q <value> [--json] [--api-version <value>] [-p] [-x <value>] [-d <value>]
|
|
296
296
|
|
|
297
297
|
FLAGS
|
|
298
298
|
-d, --output-dir=<value> Directory in which to generate the JSON files; default is current directory.
|
|
@@ -321,35 +321,35 @@ DESCRIPTION
|
|
|
321
321
|
(https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm).
|
|
322
322
|
|
|
323
323
|
ALIASES
|
|
324
|
-
$ sf force
|
|
324
|
+
$ sf force data tree export
|
|
325
325
|
|
|
326
326
|
EXAMPLES
|
|
327
327
|
Export records retrieved with the specified SOQL query into a single JSON file in the current directory; the command
|
|
328
328
|
uses your default org:
|
|
329
329
|
|
|
330
|
-
$ sf data
|
|
330
|
+
$ sf data export tree --query "SELECT Id, Name, (SELECT Name, Address__c FROM Properties__r) FROM Broker__c"
|
|
331
331
|
|
|
332
332
|
Export data using a SOQL query in the "query.txt" file and generate JSON files for each object and a plan that
|
|
333
333
|
aggregates them:
|
|
334
334
|
|
|
335
|
-
$ sf data
|
|
335
|
+
$ sf data export tree --query query.txt --plan
|
|
336
336
|
|
|
337
337
|
Prepend "export-demo" before each generated file and generate the files in the "export-out" directory; run the
|
|
338
338
|
command on the org with alias "my-scratch":
|
|
339
339
|
|
|
340
|
-
$ sf data
|
|
340
|
+
$ sf data export tree --query query.txt --plan --prefix export-demo --output-dir export-out --target-org \
|
|
341
341
|
my-scratch
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
-
_See code: [src/commands/data/export/tree.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
344
|
+
_See code: [src/commands/data/export/tree.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/data/export/tree.ts)_
|
|
345
345
|
|
|
346
|
-
## `sf data
|
|
346
|
+
## `sf data get record`
|
|
347
347
|
|
|
348
348
|
Retrieve and display a single record of a Salesforce or Tooling API object.
|
|
349
349
|
|
|
350
350
|
```
|
|
351
351
|
USAGE
|
|
352
|
-
$ sf data
|
|
352
|
+
$ sf data get record -o <value> -s <value> [--json] [--api-version <value>] [-i <value>] [-w <value>] [-t]
|
|
353
353
|
|
|
354
354
|
FLAGS
|
|
355
355
|
-i, --record-id=<value> ID of the record you’re retrieving.
|
|
@@ -380,37 +380,37 @@ DESCRIPTION
|
|
|
380
380
|
Tooling API object.
|
|
381
381
|
|
|
382
382
|
ALIASES
|
|
383
|
-
$ sf force
|
|
383
|
+
$ sf force data record get
|
|
384
384
|
|
|
385
385
|
EXAMPLES
|
|
386
386
|
Retrieve and display a record from Account with the specified (truncated) ID:
|
|
387
387
|
|
|
388
|
-
$ sf data
|
|
388
|
+
$ sf data get record --sobject Account --record-id 00180XX
|
|
389
389
|
|
|
390
390
|
Retrieve a record from Account whose name equals "Acme":
|
|
391
391
|
|
|
392
|
-
$ sf data
|
|
392
|
+
$ sf data get record --sobject Account --where "Name=Acme"
|
|
393
393
|
|
|
394
394
|
Retrieve a record from Account identified with two field values, one that contains a space; the command uses the org
|
|
395
395
|
with alias "my-scratch":
|
|
396
396
|
|
|
397
|
-
$ sf data
|
|
397
|
+
$ sf data get record --sobject Account --where "Name='Universal Containers' Phone='(123) 456-7890'" --target-org \
|
|
398
398
|
myscratch
|
|
399
399
|
|
|
400
400
|
Retrieve a record from the Tooling API object TraceFlag with the specified (truncated) ID:
|
|
401
401
|
|
|
402
|
-
$ sf data
|
|
402
|
+
$ sf data get record --use-tooling-api --sobject TraceFlag --record-id 7tf8c
|
|
403
403
|
```
|
|
404
404
|
|
|
405
|
-
_See code: [src/commands/data/get/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
405
|
+
_See code: [src/commands/data/get/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/data/get/record.ts)_
|
|
406
406
|
|
|
407
|
-
## `sf data
|
|
407
|
+
## `sf data import tree`
|
|
408
408
|
|
|
409
409
|
Import data from one or more JSON files into an org.
|
|
410
410
|
|
|
411
411
|
```
|
|
412
412
|
USAGE
|
|
413
|
-
$ sf data
|
|
413
|
+
$ sf data import tree -o <value> [--json] [--api-version <value>] [-f <value> | -p <value>] [--config-help]
|
|
414
414
|
|
|
415
415
|
FLAGS
|
|
416
416
|
-f, --files=<value>... Comma-separated and in-order JSON files that contain the records, in sObject tree format,
|
|
@@ -440,27 +440,27 @@ DESCRIPTION
|
|
|
440
440
|
(https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm)
|
|
441
441
|
|
|
442
442
|
ALIASES
|
|
443
|
-
$ sf force
|
|
443
|
+
$ sf force data tree import
|
|
444
444
|
|
|
445
445
|
EXAMPLES
|
|
446
446
|
Import the records contained in two JSON files into the org with alias "my-scratch":
|
|
447
447
|
|
|
448
|
-
$ sf data
|
|
448
|
+
$ sf data import tree --files Contact.json,Account.json --target-org my-scratch
|
|
449
449
|
|
|
450
450
|
Import records using a plan definition file into your default org:
|
|
451
451
|
|
|
452
|
-
$ sf data
|
|
452
|
+
$ sf data import tree --plan Account-Contact-plan.json
|
|
453
453
|
```
|
|
454
454
|
|
|
455
|
-
_See code: [src/commands/data/import/tree.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
455
|
+
_See code: [src/commands/data/import/tree.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/data/import/tree.ts)_
|
|
456
456
|
|
|
457
|
-
## `sf data
|
|
457
|
+
## `sf data query`
|
|
458
458
|
|
|
459
459
|
Execute a SOQL query.
|
|
460
460
|
|
|
461
461
|
```
|
|
462
462
|
USAGE
|
|
463
|
-
$ sf data
|
|
463
|
+
$ sf data query -o <value> [--json] [--api-version <value>] [-q <value>] [-f <value>] [-w <value> [-b | -t]]
|
|
464
464
|
[--async ] [--all-rows] [-r human|json|csv]
|
|
465
465
|
|
|
466
466
|
FLAGS
|
|
@@ -494,35 +494,35 @@ DESCRIPTION
|
|
|
494
494
|
"data resume" command to get the job status.
|
|
495
495
|
|
|
496
496
|
ALIASES
|
|
497
|
-
$ sf force
|
|
497
|
+
$ sf force data soql query
|
|
498
498
|
|
|
499
499
|
EXAMPLES
|
|
500
500
|
Specify a SOQL query at the command line; the command uses your default org:
|
|
501
501
|
|
|
502
|
-
$ sf data
|
|
502
|
+
$ sf data query --query "SELECT Id, Name, Account.Name FROM Contact"
|
|
503
503
|
|
|
504
504
|
Read the SOQL query from a file called "query.txt"; the command uses the org with alias "my-scratch":
|
|
505
505
|
|
|
506
|
-
$ sf data
|
|
506
|
+
$ sf data query --file query.txt --target-org my-scratch
|
|
507
507
|
|
|
508
508
|
Use Tooling API to run a query on the ApexTrigger Tooling API object:
|
|
509
509
|
|
|
510
|
-
$ sf data
|
|
510
|
+
$ sf data query --query "SELECT Name FROM ApexTrigger" --use-tooling-api
|
|
511
511
|
|
|
512
512
|
Use Bulk API 2.0 to run a query that returns many rows, and return control to the terminal immediately:
|
|
513
513
|
|
|
514
|
-
$ sf data
|
|
514
|
+
$ sf data query --query "SELECT Id FROM Contact" --bulk --wait 0
|
|
515
515
|
```
|
|
516
516
|
|
|
517
|
-
_See code: [src/commands/data/query.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
517
|
+
_See code: [src/commands/data/query.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/data/query.ts)_
|
|
518
518
|
|
|
519
|
-
## `sf data
|
|
519
|
+
## `sf data query resume`
|
|
520
520
|
|
|
521
521
|
View the status of a bulk query.
|
|
522
522
|
|
|
523
523
|
```
|
|
524
524
|
USAGE
|
|
525
|
-
$ sf data
|
|
525
|
+
$ sf data query resume [--json] [-o <value>] [--api-version <value>] [-r human|json|csv] [--use-most-recent | -i
|
|
526
526
|
<value>]
|
|
527
527
|
|
|
528
528
|
FLAGS
|
|
@@ -542,23 +542,23 @@ DESCRIPTION
|
|
|
542
542
|
Run this command using the job ID returned from the "sf data query --bulk" command.
|
|
543
543
|
|
|
544
544
|
ALIASES
|
|
545
|
-
$ sf force
|
|
545
|
+
$ sf force data soql bulk report
|
|
546
546
|
|
|
547
547
|
EXAMPLES
|
|
548
548
|
View the status of a bulk query with the specified ID:
|
|
549
549
|
|
|
550
|
-
$ sf data
|
|
550
|
+
$ sf data query resume --bulk-query-id 7500x000005BdFzXXX
|
|
551
551
|
```
|
|
552
552
|
|
|
553
|
-
_See code: [src/commands/data/query/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
553
|
+
_See code: [src/commands/data/query/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/data/query/resume.ts)_
|
|
554
554
|
|
|
555
|
-
## `sf data
|
|
555
|
+
## `sf data resume`
|
|
556
556
|
|
|
557
557
|
View the status of a bulk data load job or batch.
|
|
558
558
|
|
|
559
559
|
```
|
|
560
560
|
USAGE
|
|
561
|
-
$ sf data
|
|
561
|
+
$ sf data resume -o <value> -i <value> [--json] [--api-version <value>] [-b <value>]
|
|
562
562
|
|
|
563
563
|
FLAGS
|
|
564
564
|
-b, --batch-id=<value> ID of the batch whose status you want to view; you must also specify the job ID.
|
|
@@ -578,22 +578,22 @@ DESCRIPTION
|
|
|
578
578
|
EXAMPLES
|
|
579
579
|
View the status of a bulk load job:
|
|
580
580
|
|
|
581
|
-
$ sf data
|
|
581
|
+
$ sf data resume --job-id 750xx000000005sAAA
|
|
582
582
|
|
|
583
583
|
View the status of a bulk load job and a specific batches:
|
|
584
584
|
|
|
585
|
-
$ sf data
|
|
585
|
+
$ sf data resume --job-id 750xx000000005sAAA --batch-id 751xx000000005nAAA
|
|
586
586
|
```
|
|
587
587
|
|
|
588
|
-
_See code: [src/commands/data/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
588
|
+
_See code: [src/commands/data/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/data/resume.ts)_
|
|
589
589
|
|
|
590
|
-
## `sf data
|
|
590
|
+
## `sf data update record`
|
|
591
591
|
|
|
592
592
|
Updates a single record of a Salesforce or Tooling API object.
|
|
593
593
|
|
|
594
594
|
```
|
|
595
595
|
USAGE
|
|
596
|
-
$ sf data
|
|
596
|
+
$ sf data update record -o <value> -s <value> -v <value> [--json] [--api-version <value>] [-i <value>] [-w <value>]
|
|
597
597
|
[-t]
|
|
598
598
|
|
|
599
599
|
FLAGS
|
|
@@ -624,36 +624,36 @@ DESCRIPTION
|
|
|
624
624
|
object.
|
|
625
625
|
|
|
626
626
|
ALIASES
|
|
627
|
-
$ sf force
|
|
627
|
+
$ sf force data record update
|
|
628
628
|
|
|
629
629
|
EXAMPLES
|
|
630
630
|
Update the Name field of an Account record with the specified (truncated) ID:
|
|
631
631
|
|
|
632
|
-
$ sf data
|
|
632
|
+
$ sf data update record --sobject Account --record-id 001D0 --values "Name=NewAcme"
|
|
633
633
|
|
|
634
634
|
Update the Name field of an Account record whose current name is 'Old Acme':
|
|
635
635
|
|
|
636
|
-
$ sf data
|
|
636
|
+
$ sf data update record --sobject Account --where "Name='Old Acme'" --values "Name='New Acme'"
|
|
637
637
|
|
|
638
638
|
Update the Name and Website fields of an Account record with the specified (truncated) ID:
|
|
639
639
|
|
|
640
|
-
$ sf data
|
|
640
|
+
$ sf data update record --sobject Account --record-id 001D0 --values "Name='Acme III' Website=www.example.com"
|
|
641
641
|
|
|
642
642
|
Update the ExpirationDate field of a record of the Tooling API object TraceFlag using the specified (truncated) ID:
|
|
643
643
|
|
|
644
|
-
$ sf data
|
|
644
|
+
$ sf data update record -t --sobject TraceFlag --record-id 7tf170000009cUBAAY --values \
|
|
645
645
|
"ExpirationDate=2017-12-01T00:58:04.000+0000"
|
|
646
646
|
```
|
|
647
647
|
|
|
648
|
-
_See code: [src/commands/data/update/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
648
|
+
_See code: [src/commands/data/update/record.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/data/update/record.ts)_
|
|
649
649
|
|
|
650
|
-
## `sf data
|
|
650
|
+
## `sf data upsert bulk`
|
|
651
651
|
|
|
652
652
|
Bulk upsert records to an org from a CSV file. Uses Bulk API 2.0.
|
|
653
653
|
|
|
654
654
|
```
|
|
655
655
|
USAGE
|
|
656
|
-
$ sf data
|
|
656
|
+
$ sf data upsert bulk -o <value> -f <value> -s <value> -i <value> [--json] [--api-version <value>] [-w <value> | -a]
|
|
657
657
|
[--verbose]
|
|
658
658
|
|
|
659
659
|
FLAGS
|
|
@@ -687,24 +687,24 @@ DESCRIPTION
|
|
|
687
687
|
EXAMPLES
|
|
688
688
|
Bulk upsert records to the Contact object in your default org:
|
|
689
689
|
|
|
690
|
-
$ sf data
|
|
690
|
+
$ sf data upsert bulk --sobject Contact --file files/contacts.csv --external-id Id
|
|
691
691
|
|
|
692
692
|
Bulk upsert records to a custom object in an org with alias my-scratch and wait 5 minutes for the command to
|
|
693
693
|
complete:
|
|
694
694
|
|
|
695
|
-
$ sf data
|
|
695
|
+
$ sf data upsert bulk --sobject MyObject__c --file files/file.csv --external-id MyField__c --wait 5 --target-org \
|
|
696
696
|
my-scratch
|
|
697
697
|
```
|
|
698
698
|
|
|
699
|
-
_See code: [src/commands/data/upsert/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
699
|
+
_See code: [src/commands/data/upsert/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/data/upsert/bulk.ts)_
|
|
700
700
|
|
|
701
|
-
## `sf data
|
|
701
|
+
## `sf data upsert resume`
|
|
702
702
|
|
|
703
703
|
Resume a bulk upsert job that you previously started. Uses Bulk API 2.0.
|
|
704
704
|
|
|
705
705
|
```
|
|
706
706
|
USAGE
|
|
707
|
-
$ sf data
|
|
707
|
+
$ sf data upsert resume [--json] [-o <value>] [--use-most-recent | -i <value>] [--wait <value>] [--api-version
|
|
708
708
|
<value>]
|
|
709
709
|
|
|
710
710
|
FLAGS
|
|
@@ -726,22 +726,22 @@ DESCRIPTION
|
|
|
726
726
|
EXAMPLES
|
|
727
727
|
Resume a bulk upsert job from your default org using an ID:
|
|
728
728
|
|
|
729
|
-
$ sf data
|
|
729
|
+
$ sf data upsert resume --job-id 750xx000000005sAAA
|
|
730
730
|
|
|
731
731
|
Resume the most recently run bulk upsert job for an org with alias my-scratch:
|
|
732
732
|
|
|
733
|
-
$ sf data
|
|
733
|
+
$ sf data upsert resume --use-most-recent --target-org my-scratch
|
|
734
734
|
```
|
|
735
735
|
|
|
736
|
-
_See code: [src/commands/data/upsert/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
736
|
+
_See code: [src/commands/data/upsert/resume.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/data/upsert/resume.ts)_
|
|
737
737
|
|
|
738
|
-
## `sf force
|
|
738
|
+
## `sf force data bulk delete`
|
|
739
739
|
|
|
740
740
|
Bulk delete records from an org using a CSV file. Uses Bulk API 1.0.
|
|
741
741
|
|
|
742
742
|
```
|
|
743
743
|
USAGE
|
|
744
|
-
$ sf force
|
|
744
|
+
$ sf force data bulk delete -o <value> -f <value> -s <value> [--json] [--api-version <value>] [-w <value>]
|
|
745
745
|
|
|
746
746
|
FLAGS
|
|
747
747
|
-f, --file=<value> (required) CSV file that contains the IDs of the records to delete.
|
|
@@ -769,23 +769,23 @@ DESCRIPTION
|
|
|
769
769
|
EXAMPLES
|
|
770
770
|
Bulk delete Account records from your default org using the list of IDs in the "files/delete.csv" file:
|
|
771
771
|
|
|
772
|
-
$ sf force
|
|
772
|
+
$ sf force data bulk delete --sobject Account --file files/delete.csv
|
|
773
773
|
|
|
774
774
|
Bulk delete records from a custom object in an org with alias my-scratch and wait 5 minutes for the command to
|
|
775
775
|
complete:
|
|
776
776
|
|
|
777
|
-
$ sf force
|
|
777
|
+
$ sf force data bulk delete --sobject MyObject__c --file files/delete.csv --wait 5 --target-org my-scratch
|
|
778
778
|
```
|
|
779
779
|
|
|
780
|
-
_See code: [src/commands/force/data/bulk/delete.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
780
|
+
_See code: [src/commands/force/data/bulk/delete.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/force/data/bulk/delete.ts)_
|
|
781
781
|
|
|
782
|
-
## `sf force
|
|
782
|
+
## `sf force data bulk status`
|
|
783
783
|
|
|
784
784
|
View the status of a bulk data load job or batch. Uses Bulk API 1.0.
|
|
785
785
|
|
|
786
786
|
```
|
|
787
787
|
USAGE
|
|
788
|
-
$ sf force
|
|
788
|
+
$ sf force data bulk status -o <value> -i <value> [--json] [--api-version <value>] [-b <value>]
|
|
789
789
|
|
|
790
790
|
FLAGS
|
|
791
791
|
-b, --batch-id=<value> ID of the batch whose status you want to view; you must also specify the job ID.
|
|
@@ -805,22 +805,22 @@ DESCRIPTION
|
|
|
805
805
|
EXAMPLES
|
|
806
806
|
View the status of a bulk load job in your default org:
|
|
807
807
|
|
|
808
|
-
$ sf force
|
|
808
|
+
$ sf force data bulk status --job-id 750xx000000005sAAA
|
|
809
809
|
|
|
810
810
|
View the status of a bulk load job and a specific batches in an org with alias my-scratch:
|
|
811
811
|
|
|
812
|
-
$ sf force
|
|
812
|
+
$ sf force data bulk status --job-id 750xx000000005sAAA --batch-id 751xx000000005nAAA --target-org my-scratch
|
|
813
813
|
```
|
|
814
814
|
|
|
815
|
-
_See code: [src/commands/force/data/bulk/status.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
815
|
+
_See code: [src/commands/force/data/bulk/status.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/force/data/bulk/status.ts)_
|
|
816
816
|
|
|
817
|
-
## `sf force
|
|
817
|
+
## `sf force data bulk upsert`
|
|
818
818
|
|
|
819
819
|
Bulk upsert records to an org from a CSV file. Uses Bulk API 1.0.
|
|
820
820
|
|
|
821
821
|
```
|
|
822
822
|
USAGE
|
|
823
|
-
$ sf force
|
|
823
|
+
$ sf force data bulk upsert -o <value> -i <value> -f <value> -s <value> [--json] [--api-version <value>] [-w <value>]
|
|
824
824
|
[-r]
|
|
825
825
|
|
|
826
826
|
FLAGS
|
|
@@ -864,10 +864,10 @@ EXAMPLES
|
|
|
864
864
|
Bulk upsert records to a custom object in an org with alias my-scratch and wait 5 minutes for the command to
|
|
865
865
|
complete:
|
|
866
866
|
|
|
867
|
-
$ sf force
|
|
867
|
+
$ sf force data bulk upsert --sobject MyObject__c --file files/file.csv --external-id MyField__c --wait 5 \
|
|
868
868
|
--target-org my-scratch
|
|
869
869
|
```
|
|
870
870
|
|
|
871
|
-
_See code: [src/commands/force/data/bulk/upsert.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.
|
|
871
|
+
_See code: [src/commands/force/data/bulk/upsert.ts](https://github.com/salesforcecli/plugin-data/blob/2.6.4-test.0/src/commands/force/data/bulk/upsert.ts)_
|
|
872
872
|
|
|
873
873
|
<!-- commandsstop -->
|