@salesforce/plugin-data 4.0.27 → 4.0.29
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 +27 -78
- package/lib/bulkDataRequestCache.js +0 -19
- package/lib/bulkDataRequestCache.js.map +1 -1
- package/lib/commands/data/query.js +3 -83
- package/lib/commands/data/query.js.map +1 -1
- package/lib/queryUtils.js +0 -22
- package/lib/queryUtils.js.map +1 -1
- package/messages/soql.query.md +1 -26
- package/oclif.manifest.json +80 -371
- package/package.json +7 -7
- package/lib/commands/data/query/resume.js +0 -67
- package/lib/commands/data/query/resume.js.map +0 -1
- package/messages/bulk.report.md +0 -21
package/README.md
CHANGED
|
@@ -90,7 +90,6 @@ sf plugins
|
|
|
90
90
|
- [`sf data import resume`](#sf-data-import-resume)
|
|
91
91
|
- [`sf data import tree`](#sf-data-import-tree)
|
|
92
92
|
- [`sf data query`](#sf-data-query)
|
|
93
|
-
- [`sf data query resume`](#sf-data-query-resume)
|
|
94
93
|
- [`sf data resume`](#sf-data-resume)
|
|
95
94
|
- [`sf data search`](#sf-data-search)
|
|
96
95
|
- [`sf data update bulk`](#sf-data-update-bulk)
|
|
@@ -145,7 +144,7 @@ EXAMPLES
|
|
|
145
144
|
$ sf data bulk results --job-id 7507i000fake341G --target-org my-scratch
|
|
146
145
|
```
|
|
147
146
|
|
|
148
|
-
_See code: [src/commands/data/bulk/results.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
147
|
+
_See code: [src/commands/data/bulk/results.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/bulk/results.ts)_
|
|
149
148
|
|
|
150
149
|
## `sf data create file`
|
|
151
150
|
|
|
@@ -194,7 +193,7 @@ EXAMPLES
|
|
|
194
193
|
$ sf data create file --file path/to/astro.png --parent-id a03fakeLoJWPIA3
|
|
195
194
|
```
|
|
196
195
|
|
|
197
|
-
_See code: [src/commands/data/create/file.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
196
|
+
_See code: [src/commands/data/create/file.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/create/file.ts)_
|
|
198
197
|
|
|
199
198
|
## `sf data create record`
|
|
200
199
|
|
|
@@ -250,7 +249,7 @@ EXAMPLES
|
|
|
250
249
|
TracedEntityId=01p17000000R6bLAAS"
|
|
251
250
|
```
|
|
252
251
|
|
|
253
|
-
_See code: [src/commands/data/create/record.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
252
|
+
_See code: [src/commands/data/create/record.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/create/record.ts)_
|
|
254
253
|
|
|
255
254
|
## `sf data delete bulk`
|
|
256
255
|
|
|
@@ -310,7 +309,7 @@ FLAG DESCRIPTIONS
|
|
|
310
309
|
and can be enabled only by a system administrator.
|
|
311
310
|
```
|
|
312
311
|
|
|
313
|
-
_See code: [src/commands/data/delete/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
312
|
+
_See code: [src/commands/data/delete/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/delete/bulk.ts)_
|
|
314
313
|
|
|
315
314
|
## `sf data delete record`
|
|
316
315
|
|
|
@@ -371,7 +370,7 @@ EXAMPLES
|
|
|
371
370
|
$ sf data delete record --use-tooling-api --sobject TraceFlag --record-id 7tf8c
|
|
372
371
|
```
|
|
373
372
|
|
|
374
|
-
_See code: [src/commands/data/delete/record.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
373
|
+
_See code: [src/commands/data/delete/record.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/delete/record.ts)_
|
|
375
374
|
|
|
376
375
|
## `sf data delete resume`
|
|
377
376
|
|
|
@@ -410,7 +409,7 @@ EXAMPLES
|
|
|
410
409
|
$ sf data delete resume --use-most-recent --target-org my-scratch
|
|
411
410
|
```
|
|
412
411
|
|
|
413
|
-
_See code: [src/commands/data/delete/resume.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
412
|
+
_See code: [src/commands/data/delete/resume.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/delete/resume.ts)_
|
|
414
413
|
|
|
415
414
|
## `sf data export bulk`
|
|
416
415
|
|
|
@@ -484,7 +483,7 @@ EXAMPLES
|
|
|
484
483
|
--result-format json --async
|
|
485
484
|
```
|
|
486
485
|
|
|
487
|
-
_See code: [src/commands/data/export/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
486
|
+
_See code: [src/commands/data/export/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/export/bulk.ts)_
|
|
488
487
|
|
|
489
488
|
## `sf data export resume`
|
|
490
489
|
|
|
@@ -520,7 +519,7 @@ EXAMPLES
|
|
|
520
519
|
$ sf data export resume --use-most-recent --target-org my-scratch
|
|
521
520
|
```
|
|
522
521
|
|
|
523
|
-
_See code: [src/commands/data/export/resume.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
522
|
+
_See code: [src/commands/data/export/resume.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/export/resume.ts)_
|
|
524
523
|
|
|
525
524
|
## `sf data export tree`
|
|
526
525
|
|
|
@@ -580,7 +579,7 @@ EXAMPLES
|
|
|
580
579
|
my-scratch
|
|
581
580
|
```
|
|
582
581
|
|
|
583
|
-
_See code: [src/commands/data/export/tree.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
582
|
+
_See code: [src/commands/data/export/tree.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/export/tree.ts)_
|
|
584
583
|
|
|
585
584
|
## `sf data get record`
|
|
586
585
|
|
|
@@ -644,7 +643,7 @@ EXAMPLES
|
|
|
644
643
|
$ sf data get record --use-tooling-api --sobject TraceFlag --record-id 7tf8c
|
|
645
644
|
```
|
|
646
645
|
|
|
647
|
-
_See code: [src/commands/data/get/record.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
646
|
+
_See code: [src/commands/data/get/record.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/get/record.ts)_
|
|
648
647
|
|
|
649
648
|
## `sf data import bulk`
|
|
650
649
|
|
|
@@ -702,7 +701,7 @@ EXAMPLES
|
|
|
702
701
|
$ sf data import bulk --file accounts.csv --sobject Account --async
|
|
703
702
|
```
|
|
704
703
|
|
|
705
|
-
_See code: [src/commands/data/import/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
704
|
+
_See code: [src/commands/data/import/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/import/bulk.ts)_
|
|
706
705
|
|
|
707
706
|
## `sf data import resume`
|
|
708
707
|
|
|
@@ -738,7 +737,7 @@ EXAMPLES
|
|
|
738
737
|
$ sf data import resume --use-most-recent --target-org my-scratch
|
|
739
738
|
```
|
|
740
739
|
|
|
741
|
-
_See code: [src/commands/data/import/resume.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
740
|
+
_See code: [src/commands/data/import/resume.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/import/resume.ts)_
|
|
742
741
|
|
|
743
742
|
## `sf data import tree`
|
|
744
743
|
|
|
@@ -802,7 +801,7 @@ FLAG DESCRIPTIONS
|
|
|
802
801
|
- files(array) - Files: An array of files paths to load
|
|
803
802
|
```
|
|
804
803
|
|
|
805
|
-
_See code: [src/commands/data/import/tree.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
804
|
+
_See code: [src/commands/data/import/tree.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/import/tree.ts)_
|
|
806
805
|
|
|
807
806
|
## `sf data query`
|
|
808
807
|
|
|
@@ -811,10 +810,9 @@ Execute a SOQL query.
|
|
|
811
810
|
```
|
|
812
811
|
USAGE
|
|
813
812
|
$ sf data query -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-q <value>] [-f <value>]
|
|
814
|
-
[-t
|
|
813
|
+
[-t] [--all-rows] [-r human|csv|json] [--output-file <value>]
|
|
815
814
|
|
|
816
815
|
FLAGS
|
|
817
|
-
-b, --bulk Use Bulk API 2.0 to run the query.
|
|
818
816
|
-f, --file=<value> File that contains the SOQL query.
|
|
819
817
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
820
818
|
configuration variable is already set.
|
|
@@ -822,10 +820,8 @@ FLAGS
|
|
|
822
820
|
-r, --result-format=<option> [default: human] Format to display the results; the --json flag overrides this flag.
|
|
823
821
|
<options: human|csv|json>
|
|
824
822
|
-t, --use-tooling-api Use Tooling API so you can run queries on Tooling API objects.
|
|
825
|
-
-w, --wait=<value> Time to wait for the command to finish, in minutes.
|
|
826
823
|
--all-rows Include deleted records. By default, deleted records are not returned.
|
|
827
824
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
828
|
-
--async Use Bulk API 2.0, but don't wait for the job to complete.
|
|
829
825
|
--output-file=<value> File where records are written; only CSV and JSON output formats are supported.
|
|
830
826
|
|
|
831
827
|
GLOBAL FLAGS
|
|
@@ -837,14 +833,8 @@ DESCRIPTION
|
|
|
837
833
|
|
|
838
834
|
Specify the SOQL query at the command line with the --query flag or read the query from a file with the --file flag.
|
|
839
835
|
|
|
840
|
-
If your query returns more than 10,000 records,
|
|
841
|
-
API 2.0, which has higher limits than the default API used by the command.
|
|
842
|
-
|
|
843
|
-
When using --bulk, the command waits 3 minutes by default for the query to complete. Use the --wait parameter to
|
|
844
|
-
specify a different number of minutes to wait, or set --wait to 0 to immediately return control to the terminal. If
|
|
845
|
-
you set --wait to 0, or you use the --async flag, or the command simply times out, the command displays an ID. Pass
|
|
846
|
-
this ID to the the "data query resume" command using the --bulk-query-id flag to get the results; pass the ID to the
|
|
847
|
-
"data resume" command to get the job status.
|
|
836
|
+
If your query returns more than 10,000 records, prefer to use the `sf data export bulk` command instead. It runs the
|
|
837
|
+
query using Bulk API 2.0, which has higher limits than the default API used by the command.
|
|
848
838
|
|
|
849
839
|
ALIASES
|
|
850
840
|
$ sf force data soql query
|
|
@@ -862,50 +852,9 @@ EXAMPLES
|
|
|
862
852
|
Use Tooling API to run a query on the ApexTrigger Tooling API object:
|
|
863
853
|
|
|
864
854
|
$ sf data query --query "SELECT Name FROM ApexTrigger" --use-tooling-api
|
|
865
|
-
|
|
866
|
-
Use Bulk API 2.0 to run a query that returns many rows, and return control to the terminal immediately:
|
|
867
|
-
|
|
868
|
-
$ sf data query --query "SELECT Id FROM Contact" --bulk --wait 0
|
|
869
|
-
```
|
|
870
|
-
|
|
871
|
-
_See code: [src/commands/data/query.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.27/src/commands/data/query.ts)_
|
|
872
|
-
|
|
873
|
-
## `sf data query resume`
|
|
874
|
-
|
|
875
|
-
View the status of a bulk query.
|
|
876
|
-
|
|
877
|
-
```
|
|
878
|
-
USAGE
|
|
879
|
-
$ sf data query resume [--json] [--flags-dir <value>] [-o <value>] [--api-version <value>] [-r human|csv|json] [-i
|
|
880
|
-
<value>] [--use-most-recent]
|
|
881
|
-
|
|
882
|
-
FLAGS
|
|
883
|
-
-i, --bulk-query-id=<value> Job ID of the bulk query.
|
|
884
|
-
-o, --target-org=<value> Username or alias of the target org.
|
|
885
|
-
-r, --result-format=<option> [default: human] Format to display the results; the --json flag overrides this flag.
|
|
886
|
-
<options: human|csv|json>
|
|
887
|
-
--api-version=<value> Override the api version used for api requests made by this command
|
|
888
|
-
--use-most-recent Use the most recent bulk query ID from cache.
|
|
889
|
-
|
|
890
|
-
GLOBAL FLAGS
|
|
891
|
-
--flags-dir=<value> Import flag values from a directory.
|
|
892
|
-
--json Format output as json.
|
|
893
|
-
|
|
894
|
-
DESCRIPTION
|
|
895
|
-
View the status of a bulk query.
|
|
896
|
-
|
|
897
|
-
Run this command using the job ID returned from the "sf data query --bulk" command.
|
|
898
|
-
|
|
899
|
-
ALIASES
|
|
900
|
-
$ sf force data soql bulk report
|
|
901
|
-
|
|
902
|
-
EXAMPLES
|
|
903
|
-
View the status of a bulk query with the specified ID:
|
|
904
|
-
|
|
905
|
-
$ sf data query resume --bulk-query-id 7500x000005BdFzXXX
|
|
906
855
|
```
|
|
907
856
|
|
|
908
|
-
_See code: [src/commands/data/query
|
|
857
|
+
_See code: [src/commands/data/query.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/query.ts)_
|
|
909
858
|
|
|
910
859
|
## `sf data resume`
|
|
911
860
|
|
|
@@ -942,7 +891,7 @@ EXAMPLES
|
|
|
942
891
|
$ sf data resume --job-id 750xx000000005sAAA --batch-id 751xx000000005nAAA
|
|
943
892
|
```
|
|
944
893
|
|
|
945
|
-
_See code: [src/commands/data/resume.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
894
|
+
_See code: [src/commands/data/resume.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/resume.ts)_
|
|
946
895
|
|
|
947
896
|
## `sf data search`
|
|
948
897
|
|
|
@@ -992,7 +941,7 @@ EXAMPLES
|
|
|
992
941
|
$ sf data search --file query.txt --target-org my-scratch --result-format csv
|
|
993
942
|
```
|
|
994
943
|
|
|
995
|
-
_See code: [src/commands/data/search.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
944
|
+
_See code: [src/commands/data/search.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/search.ts)_
|
|
996
945
|
|
|
997
946
|
## `sf data update bulk`
|
|
998
947
|
|
|
@@ -1053,7 +1002,7 @@ EXAMPLES
|
|
|
1053
1002
|
$ sf data update bulk --file accounts.csv --sobject Account --async
|
|
1054
1003
|
```
|
|
1055
1004
|
|
|
1056
|
-
_See code: [src/commands/data/update/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
1005
|
+
_See code: [src/commands/data/update/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/update/bulk.ts)_
|
|
1057
1006
|
|
|
1058
1007
|
## `sf data update record`
|
|
1059
1008
|
|
|
@@ -1115,7 +1064,7 @@ EXAMPLES
|
|
|
1115
1064
|
"ExpirationDate=2017-12-01T00:58:04.000+0000"
|
|
1116
1065
|
```
|
|
1117
1066
|
|
|
1118
|
-
_See code: [src/commands/data/update/record.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
1067
|
+
_See code: [src/commands/data/update/record.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/update/record.ts)_
|
|
1119
1068
|
|
|
1120
1069
|
## `sf data update resume`
|
|
1121
1070
|
|
|
@@ -1151,7 +1100,7 @@ EXAMPLES
|
|
|
1151
1100
|
$ sf data update resume --use-most-recent --target-org my-scratch
|
|
1152
1101
|
```
|
|
1153
1102
|
|
|
1154
|
-
_See code: [src/commands/data/update/resume.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
1103
|
+
_See code: [src/commands/data/update/resume.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/update/resume.ts)_
|
|
1155
1104
|
|
|
1156
1105
|
## `sf data upsert bulk`
|
|
1157
1106
|
|
|
@@ -1208,7 +1157,7 @@ EXAMPLES
|
|
|
1208
1157
|
my-scratch
|
|
1209
1158
|
```
|
|
1210
1159
|
|
|
1211
|
-
_See code: [src/commands/data/upsert/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
1160
|
+
_See code: [src/commands/data/upsert/bulk.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/upsert/bulk.ts)_
|
|
1212
1161
|
|
|
1213
1162
|
## `sf data upsert resume`
|
|
1214
1163
|
|
|
@@ -1247,7 +1196,7 @@ EXAMPLES
|
|
|
1247
1196
|
$ sf data upsert resume --use-most-recent --target-org my-scratch
|
|
1248
1197
|
```
|
|
1249
1198
|
|
|
1250
|
-
_See code: [src/commands/data/upsert/resume.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
1199
|
+
_See code: [src/commands/data/upsert/resume.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/data/upsert/resume.ts)_
|
|
1251
1200
|
|
|
1252
1201
|
## `sf force data bulk delete`
|
|
1253
1202
|
|
|
@@ -1294,7 +1243,7 @@ EXAMPLES
|
|
|
1294
1243
|
$ sf force data bulk delete --sobject MyObject__c --file files/delete.csv --wait 5 --target-org my-scratch
|
|
1295
1244
|
```
|
|
1296
1245
|
|
|
1297
|
-
_See code: [src/commands/force/data/bulk/delete.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
1246
|
+
_See code: [src/commands/force/data/bulk/delete.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/force/data/bulk/delete.ts)_
|
|
1298
1247
|
|
|
1299
1248
|
## `sf force data bulk status`
|
|
1300
1249
|
|
|
@@ -1331,7 +1280,7 @@ EXAMPLES
|
|
|
1331
1280
|
$ sf force data bulk status --job-id 750xx000000005sAAA --batch-id 751xx000000005nAAA --target-org my-scratch
|
|
1332
1281
|
```
|
|
1333
1282
|
|
|
1334
|
-
_See code: [src/commands/force/data/bulk/status.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
1283
|
+
_See code: [src/commands/force/data/bulk/status.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/force/data/bulk/status.ts)_
|
|
1335
1284
|
|
|
1336
1285
|
## `sf force data bulk upsert`
|
|
1337
1286
|
|
|
@@ -1389,6 +1338,6 @@ EXAMPLES
|
|
|
1389
1338
|
--target-org my-scratch
|
|
1390
1339
|
```
|
|
1391
1340
|
|
|
1392
|
-
_See code: [src/commands/force/data/bulk/upsert.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.
|
|
1341
|
+
_See code: [src/commands/force/data/bulk/upsert.ts](https://github.com/salesforcecli/plugin-data/blob/4.0.29/src/commands/force/data/bulk/upsert.ts)_
|
|
1393
1342
|
|
|
1394
1343
|
<!-- commandsstop -->
|
|
@@ -72,25 +72,6 @@ export class BulkDataRequestCache extends TTLConfig {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
export class BulkQueryRequestCache extends BulkDataRequestCache {
|
|
76
|
-
static getDefaultOptions() {
|
|
77
|
-
return {
|
|
78
|
-
isGlobal: true,
|
|
79
|
-
isState: true,
|
|
80
|
-
filename: BulkQueryRequestCache.getFileName(),
|
|
81
|
-
stateFolder: Global.SF_STATE_FOLDER,
|
|
82
|
-
ttl: Duration.days(3),
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
static getFileName() {
|
|
86
|
-
return 'bulk-data-query-cache.json';
|
|
87
|
-
}
|
|
88
|
-
static async unset(key) {
|
|
89
|
-
const cache = await BulkQueryRequestCache.create();
|
|
90
|
-
cache.unset(key);
|
|
91
|
-
await cache.write();
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
75
|
export class BulkDeleteRequestCache extends BulkDataRequestCache {
|
|
95
76
|
static getDefaultOptions() {
|
|
96
77
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulkDataRequestCache.js","sourceRoot":"","sources":["../src/bulkDataRequestCache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAI3C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,UAAU,CAAC,CAAC;AAmB9E,MAAM,OAAgB,oBAAqB,SAAQ,SAAiD;IAC3F,MAAM,CAAC,iBAAiB;QAC7B,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,oBAAoB,CAAC,WA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AAK,CAAC,UAAU;gBAC5B,OAAO,EAAE;oBACP,UAAU,EAAE,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC;iBAC9F;aACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -5,15 +5,12 @@
|
|
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
*/
|
|
7
7
|
import fs from 'node:fs';
|
|
8
|
-
import { Logger, Messages
|
|
8
|
+
import { Logger, Messages } from '@salesforce/core';
|
|
9
9
|
import { ensureJsonArray, ensureJsonMap, ensureString, getArray, isJsonArray, toJsonMap, } from '@salesforce/ts-types';
|
|
10
|
-
import { Duration } from '@salesforce/kit';
|
|
11
10
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
12
|
-
import { BulkV2, QueryJobV2 } from '@jsforce/jsforce-node/lib/api/bulk2.js';
|
|
13
11
|
import { orgFlags, perflogFlag, resultFormatFlag } from '../../flags.js';
|
|
14
12
|
import { FieldType } from '../../types.js';
|
|
15
|
-
import { displayResults
|
|
16
|
-
import { BulkQueryRequestCache } from '../../bulkDataRequestCache.js';
|
|
13
|
+
import { displayResults } from '../../queryUtils.js';
|
|
17
14
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
18
15
|
const messages = Messages.loadMessages('@salesforce/plugin-data', 'soql.query');
|
|
19
16
|
export class DataSoqlQueryCommand extends SfCommand {
|
|
@@ -42,26 +39,6 @@ export class DataSoqlQueryCommand extends SfCommand {
|
|
|
42
39
|
summary: messages.getMessage('flags.use-tooling-api.summary'),
|
|
43
40
|
aliases: ['usetoolingapi'],
|
|
44
41
|
deprecateAliases: true,
|
|
45
|
-
exclusive: ['bulk'],
|
|
46
|
-
}),
|
|
47
|
-
bulk: Flags.boolean({
|
|
48
|
-
char: 'b',
|
|
49
|
-
default: false,
|
|
50
|
-
summary: messages.getMessage('flags.bulk.summary'),
|
|
51
|
-
exclusive: ['use-tooling-api'],
|
|
52
|
-
}),
|
|
53
|
-
wait: Flags.duration({
|
|
54
|
-
unit: 'minutes',
|
|
55
|
-
char: 'w',
|
|
56
|
-
summary: messages.getMessage('flags.wait.summary'),
|
|
57
|
-
dependsOn: ['bulk'],
|
|
58
|
-
exclusive: ['async'],
|
|
59
|
-
}),
|
|
60
|
-
async: Flags.boolean({
|
|
61
|
-
summary: messages.getMessage('flags.async.summary'),
|
|
62
|
-
dependsOn: ['bulk'],
|
|
63
|
-
exclusive: ['wait'],
|
|
64
|
-
deprecated: true,
|
|
65
42
|
}),
|
|
66
43
|
'all-rows': Flags.boolean({
|
|
67
44
|
summary: messages.getMessage('flags.all-rows.summary'),
|
|
@@ -103,21 +80,13 @@ export class DataSoqlQueryCommand extends SfCommand {
|
|
|
103
80
|
async run() {
|
|
104
81
|
this.logger = await Logger.child('data:soql:query');
|
|
105
82
|
const flags = (await this.parse(DataSoqlQueryCommand)).flags;
|
|
106
|
-
if (flags.bulk || flags.wait || flags.async) {
|
|
107
|
-
this
|
|
108
|
-
.warn(`Bulk mode for "data query" is deprecated, the following flags will be removed after April 2025: --bulk | --wait | --async.
|
|
109
|
-
Use "data export bulk" for bulk queries instead.
|
|
110
|
-
`);
|
|
111
|
-
}
|
|
112
83
|
try {
|
|
113
84
|
// --file will be present if flags.query isn't. Oclif exactlyOne isn't quite that clever
|
|
114
85
|
const queryString = flags.query ?? fs.readFileSync(flags.file, 'utf8');
|
|
115
86
|
const conn = flags['target-org'].getConnection(flags['api-version']);
|
|
116
87
|
if (flags['result-format'] !== 'json')
|
|
117
88
|
this.spinner.start(messages.getMessage('queryRunningMessage'));
|
|
118
|
-
const queryResult = flags.
|
|
119
|
-
? await this.runBulkSoqlQuery(conn, queryString, flags.async ? Duration.minutes(0) : flags.wait ?? Duration.minutes(0), flags['all-rows'] === true)
|
|
120
|
-
: await this.runSoqlQuery(flags['use-tooling-api'] ? conn.tooling : conn, queryString, this.logger, this.configAggregator.getInfo('org-max-query-limit').value, flags['all-rows']);
|
|
89
|
+
const queryResult = await this.runSoqlQuery(flags['use-tooling-api'] ? conn.tooling : conn, queryString, this.logger, this.configAggregator.getInfo('org-max-query-limit').value, flags['all-rows']);
|
|
121
90
|
if (flags['output-file'] ?? !this.jsonEnabled()) {
|
|
122
91
|
displayResults({ ...queryResult }, flags['result-format'], flags['output-file']);
|
|
123
92
|
}
|
|
@@ -134,44 +103,6 @@ Use "data export bulk" for bulk queries instead.
|
|
|
134
103
|
this.spinner.stop();
|
|
135
104
|
}
|
|
136
105
|
}
|
|
137
|
-
/**
|
|
138
|
-
* Executes a SOQL query using the bulk 2.0 API
|
|
139
|
-
*
|
|
140
|
-
* @param connection
|
|
141
|
-
* @param query
|
|
142
|
-
* @param timeout
|
|
143
|
-
*/
|
|
144
|
-
async runBulkSoqlQuery(connection, query, timeout, allRows = false) {
|
|
145
|
-
if (timeout.milliseconds === 0) {
|
|
146
|
-
const job = new QueryJobV2(connection, {
|
|
147
|
-
bodyParams: {
|
|
148
|
-
query,
|
|
149
|
-
operation: allRows ? 'queryAll' : 'query',
|
|
150
|
-
},
|
|
151
|
-
pollingOptions: { pollTimeout: timeout.milliseconds, pollInterval: 5000 },
|
|
152
|
-
});
|
|
153
|
-
const info = await job.open();
|
|
154
|
-
return prepareAsyncQueryResponse(connection)(this)({ query, jobId: info.id });
|
|
155
|
-
}
|
|
156
|
-
try {
|
|
157
|
-
const bulk2 = new BulkV2(connection);
|
|
158
|
-
const res = (await bulk2.query(query, {
|
|
159
|
-
pollTimeout: timeout.milliseconds ?? Duration.minutes(5).milliseconds,
|
|
160
|
-
pollInterval: 5000,
|
|
161
|
-
...(allRows ? { scanAll: true } : {}),
|
|
162
|
-
})) ?? [];
|
|
163
|
-
return transformBulkResults((await res.toArray()), query);
|
|
164
|
-
}
|
|
165
|
-
catch (e) {
|
|
166
|
-
if (e instanceof Error && e.name === 'JobPollingTimeout' && 'jobId' in e && typeof e.jobId === 'string') {
|
|
167
|
-
process.exitCode = 69;
|
|
168
|
-
return prepareAsyncQueryResponse(connection)(this)({ query, jobId: e.jobId });
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
throw e instanceof Error || typeof e === 'string' ? SfError.wrap(e) : e;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
106
|
async runSoqlQuery(connection, query, logger, maxFetch = 50_000, allRows = false) {
|
|
176
107
|
logger.debug('running query');
|
|
177
108
|
const result = await connection.query(query, {
|
|
@@ -191,17 +122,6 @@ Use "data export bulk" for bulk queries instead.
|
|
|
191
122
|
};
|
|
192
123
|
}
|
|
193
124
|
}
|
|
194
|
-
const prepareAsyncQueryResponse = (connection) => (cmd) => async ({ query, jobId }) => {
|
|
195
|
-
const cache = await BulkQueryRequestCache.create();
|
|
196
|
-
await cache.createCacheEntryForRequest(jobId, connection.getUsername(), connection.getApiVersion());
|
|
197
|
-
cmd.log(messages.getMessage('bulkQueryTimeout', [jobId, jobId, connection.getUsername()]));
|
|
198
|
-
return buildEmptyQueryResult({ query, jobId });
|
|
199
|
-
};
|
|
200
|
-
const buildEmptyQueryResult = ({ query, jobId }) => ({
|
|
201
|
-
columns: [],
|
|
202
|
-
result: { done: false, records: [], totalSize: 0, id: jobId },
|
|
203
|
-
query,
|
|
204
|
-
});
|
|
205
125
|
const searchSubColumnsRecursively = (parent) => {
|
|
206
126
|
const column = ensureJsonMap(parent);
|
|
207
127
|
const name = ensureString(column.columnName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/commands/data/query.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAc,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,EAEL,eAAe,EACf,aA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AC,CAAC,CAAC,CAAC;oBACzC,CAAC;gBACH,CAAC;gBACD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;iBAAM,CAAC;gBACN,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;oBAC3C,MAAM,gBAAgB,GAAG,2BAA2B,CAAC,SAAS,CAAC,CAAC;oBAChE,KAAK,MAAM,SAAS,IAAI,gBAAgB,EAAE,CAAC;wBACzC,OAAO,CAAC,IAAI,CAAC;4BACX,SAAS,EAAE,SAAS,CAAC,KAAK;4BAC1B,IAAI,EAAE,GAAG,IAAI,IAAI,SAAS,EAAE;yBAC7B,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;aAAM,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;YAC5B,MAAM,KAAK,GAAU;gBACnB,SAAS,EAAE,SAAS,CAAC,aAAa;gBAClC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC;aACvC,CAAC;YACF,6EAA6E;YAC7E,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC7B,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;YACrB,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,KAAK,EAAE,IAAI,EAAW,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
package/lib/queryUtils.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FieldType } from './types.js';
|
|
2
1
|
import { JsonReporter } from './reporters/query/reporters.js';
|
|
3
2
|
import { CsvReporter } from './reporters/query/csvReporter.js';
|
|
4
3
|
import { HumanReporter } from './reporters/query/humanReporter.js';
|
|
@@ -18,25 +17,4 @@ export const displayResults = (queryResult, resultFormat, outputFile) => {
|
|
|
18
17
|
// delegate to selected reporter
|
|
19
18
|
reporter.display();
|
|
20
19
|
};
|
|
21
|
-
/**
|
|
22
|
-
* transforms Bulk 2.0 results to match the SOQL query results
|
|
23
|
-
*
|
|
24
|
-
* @param results results object
|
|
25
|
-
* @param query query string
|
|
26
|
-
*/
|
|
27
|
-
export const transformBulkResults = (results, query) => {
|
|
28
|
-
/*
|
|
29
|
-
bulk queries return a different payload, it's a [{column: data}, {column: data}]
|
|
30
|
-
so we just need to grab the first object, find the keys (columns) and create the columns
|
|
31
|
-
*/
|
|
32
|
-
const columns = Object.keys(results[0] ?? {}).map((name) => ({
|
|
33
|
-
fieldType: FieldType.field,
|
|
34
|
-
name,
|
|
35
|
-
}));
|
|
36
|
-
return {
|
|
37
|
-
columns,
|
|
38
|
-
result: { done: true, records: results, totalSize: results.length },
|
|
39
|
-
query,
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
20
|
//# sourceMappingURL=queryUtils.js.map
|
package/lib/queryUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryUtils.js","sourceRoot":"","sources":["../src/queryUtils.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"queryUtils.js","sourceRoot":"","sources":["../src/queryUtils.ts"],"names":[],"mappings":"AAOA,OAAO,EAAe,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,WAA4B,EAAE,YAAyB,EAAE,UAAmB,EAAQ,EAAE;IACnH,IAAI,QAAoD,CAAC;IACzD,QAAQ,YAAY,EAAE,CAAC;QACrB,KAAK,OAAO;YACV,QAAQ,GAAG,IAAI,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;YAC/D,MAAM;QACR,KAAK,MAAM;YACT,QAAQ,GAAG,IAAI,YAAY,CAAC,WAAW,EAAE,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;YAC1E,MAAM;QACR,KAAK,KAAK;YACR,QAAQ,GAAG,IAAI,WAAW,CAAC,WAAW,EAAE,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;YACzE,MAAM;IACV,CAAC;IACD,gCAAgC;IAChC,QAAQ,CAAC,OAAO,EAAE,CAAC;AACrB,CAAC,CAAC"}
|
package/messages/soql.query.md
CHANGED
|
@@ -6,9 +6,7 @@ Execute a SOQL query.
|
|
|
6
6
|
|
|
7
7
|
Specify the SOQL query at the command line with the --query flag or read the query from a file with the --file flag.
|
|
8
8
|
|
|
9
|
-
If your query returns more than 10,000 records,
|
|
10
|
-
|
|
11
|
-
When using --bulk, the command waits 3 minutes by default for the query to complete. Use the --wait parameter to specify a different number of minutes to wait, or set --wait to 0 to immediately return control to the terminal. If you set --wait to 0, or you use the --async flag, or the command simply times out, the command displays an ID. Pass this ID to the the "data query resume" command using the --bulk-query-id flag to get the results; pass the ID to the "data resume" command to get the job status.
|
|
9
|
+
If your query returns more than 10,000 records, prefer to use the `sf data export bulk` command instead. It runs the query using Bulk API 2.0, which has higher limits than the default API used by the command.
|
|
12
10
|
|
|
13
11
|
# examples
|
|
14
12
|
|
|
@@ -24,10 +22,6 @@ When using --bulk, the command waits 3 minutes by default for the query to compl
|
|
|
24
22
|
|
|
25
23
|
<%= config.bin %> <%= command.id %> --query "SELECT Name FROM ApexTrigger" --use-tooling-api
|
|
26
24
|
|
|
27
|
-
- Use Bulk API 2.0 to run a query that returns many rows, and return control to the terminal immediately:
|
|
28
|
-
|
|
29
|
-
<%= config.bin %> <%= command.id %> --query "SELECT Id FROM Contact" --bulk --wait 0
|
|
30
|
-
|
|
31
25
|
# flags.query.summary
|
|
32
26
|
|
|
33
27
|
SOQL query to execute.
|
|
@@ -40,22 +34,10 @@ Use Tooling API so you can run queries on Tooling API objects.
|
|
|
40
34
|
|
|
41
35
|
File that contains the SOQL query.
|
|
42
36
|
|
|
43
|
-
# flags.bulk.summary
|
|
44
|
-
|
|
45
|
-
Use Bulk API 2.0 to run the query.
|
|
46
|
-
|
|
47
|
-
# flags.async.summary
|
|
48
|
-
|
|
49
|
-
Use Bulk API 2.0, but don't wait for the job to complete.
|
|
50
|
-
|
|
51
37
|
# flags.all-rows.summary
|
|
52
38
|
|
|
53
39
|
Include deleted records. By default, deleted records are not returned.
|
|
54
40
|
|
|
55
|
-
# flags.wait.summary
|
|
56
|
-
|
|
57
|
-
Time to wait for the command to finish, in minutes.
|
|
58
|
-
|
|
59
41
|
# flags.output-file.summary
|
|
60
42
|
|
|
61
43
|
File where records are written; only CSV and JSON output formats are supported.
|
|
@@ -67,10 +49,3 @@ Total number of records retrieved: %s.
|
|
|
67
49
|
# queryRunningMessage
|
|
68
50
|
|
|
69
51
|
Querying Data
|
|
70
|
-
|
|
71
|
-
# bulkQueryTimeout
|
|
72
|
-
|
|
73
|
-
Query ID: %s
|
|
74
|
-
Query is in progress.
|
|
75
|
-
|
|
76
|
-
Run "sf data query resume -i %s -o %s" to get the latest status and results.
|
package/oclif.manifest.json
CHANGED
|
@@ -6,12 +6,11 @@
|
|
|
6
6
|
],
|
|
7
7
|
"args": {},
|
|
8
8
|
"deprecateAliases": true,
|
|
9
|
-
"description": "Specify the SOQL query at the command line with the --query flag or read the query from a file with the --file flag.\n\nIf your query returns more than 10,000 records,
|
|
9
|
+
"description": "Specify the SOQL query at the command line with the --query flag or read the query from a file with the --file flag.\n\nIf your query returns more than 10,000 records, prefer to use the `sf data export bulk` command instead. It runs the query using Bulk API 2.0, which has higher limits than the default API used by the command.",
|
|
10
10
|
"examples": [
|
|
11
11
|
"Specify a SOQL query at the command line; the command uses your default org:\n<%= config.bin %> <%= command.id %> --query \"SELECT Id, Name, Account.Name FROM Contact\"",
|
|
12
12
|
"Read the SOQL query from a file called \"query.txt\" and write the CSV-formatted output to a file; the command uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --file query.txt --output-file output.csv --result-format csv --target-org my-scratch",
|
|
13
|
-
"Use Tooling API to run a query on the ApexTrigger Tooling API object:\n<%= config.bin %> <%= command.id %> --query \"SELECT Name FROM ApexTrigger\" --use-tooling-api"
|
|
14
|
-
"Use Bulk API 2.0 to run a query that returns many rows, and return control to the terminal immediately:\n<%= config.bin %> <%= command.id %> --query \"SELECT Id FROM Contact\" --bulk --wait 0"
|
|
13
|
+
"Use Tooling API to run a query on the ApexTrigger Tooling API object:\n<%= config.bin %> <%= command.id %> --query \"SELECT Name FROM ApexTrigger\" --use-tooling-api"
|
|
15
14
|
],
|
|
16
15
|
"flags": {
|
|
17
16
|
"json": {
|
|
@@ -91,51 +90,11 @@
|
|
|
91
90
|
],
|
|
92
91
|
"char": "t",
|
|
93
92
|
"deprecateAliases": true,
|
|
94
|
-
"exclusive": [
|
|
95
|
-
"bulk"
|
|
96
|
-
],
|
|
97
93
|
"name": "use-tooling-api",
|
|
98
94
|
"summary": "Use Tooling API so you can run queries on Tooling API objects.",
|
|
99
95
|
"allowNo": false,
|
|
100
96
|
"type": "boolean"
|
|
101
97
|
},
|
|
102
|
-
"bulk": {
|
|
103
|
-
"char": "b",
|
|
104
|
-
"exclusive": [
|
|
105
|
-
"use-tooling-api"
|
|
106
|
-
],
|
|
107
|
-
"name": "bulk",
|
|
108
|
-
"summary": "Use Bulk API 2.0 to run the query.",
|
|
109
|
-
"allowNo": false,
|
|
110
|
-
"type": "boolean"
|
|
111
|
-
},
|
|
112
|
-
"wait": {
|
|
113
|
-
"char": "w",
|
|
114
|
-
"dependsOn": [
|
|
115
|
-
"bulk"
|
|
116
|
-
],
|
|
117
|
-
"exclusive": [
|
|
118
|
-
"async"
|
|
119
|
-
],
|
|
120
|
-
"name": "wait",
|
|
121
|
-
"summary": "Time to wait for the command to finish, in minutes.",
|
|
122
|
-
"hasDynamicHelp": true,
|
|
123
|
-
"multiple": false,
|
|
124
|
-
"type": "option"
|
|
125
|
-
},
|
|
126
|
-
"async": {
|
|
127
|
-
"dependsOn": [
|
|
128
|
-
"bulk"
|
|
129
|
-
],
|
|
130
|
-
"deprecated": true,
|
|
131
|
-
"exclusive": [
|
|
132
|
-
"wait"
|
|
133
|
-
],
|
|
134
|
-
"name": "async",
|
|
135
|
-
"summary": "Use Bulk API 2.0, but don't wait for the job to complete.",
|
|
136
|
-
"allowNo": false,
|
|
137
|
-
"type": "boolean"
|
|
138
|
-
},
|
|
139
98
|
"all-rows": {
|
|
140
99
|
"name": "all-rows",
|
|
141
100
|
"summary": "Include deleted records. By default, deleted records are not returned.",
|
|
@@ -442,83 +401,6 @@
|
|
|
442
401
|
"search:data"
|
|
443
402
|
]
|
|
444
403
|
},
|
|
445
|
-
"data:bulk:results": {
|
|
446
|
-
"aliases": [],
|
|
447
|
-
"args": {},
|
|
448
|
-
"description": "Use this command to get the complete results after running one of the CLI commands that uses Bulk API 2.0 to ingest (import, update, upsert, or delete) large datasets to your org, such as \"data import bulk\". The previously-run bulk command must have completed; if it's still processing, run the corresponding resume command first, such as \"data import resume.\" Make note of the job ID of the previous bulk command because you use it to run this command. \n\nYou can also use this command to get results from running a bulk ingest job with a different tool, such as Data Loader, as long as you have the job ID. For information on Data Loader, see https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/data_loader_intro.htm. \n\nThis command first displays the status of the previous bulk job, the operation that was executed in the org (such as insert or hard delete), and the updated Salesforce object. The command then displays how many records were processed in total, and how many were successful or failed. Finally, the output displays the names of the generated CSV-formatted files that contain the specific results for each ingested record. Depending on the success or failure of the bulk command, the results files can include the IDs of inserted records or the specific errors. When possible, if the ingest job failed or was aborted, you also get a CSV file with the unprocessed results.",
|
|
449
|
-
"examples": [
|
|
450
|
-
"Get results from a bulk ingest job; use the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --job-id 7507i000fake341G --target-org my-scratch"
|
|
451
|
-
],
|
|
452
|
-
"flags": {
|
|
453
|
-
"json": {
|
|
454
|
-
"description": "Format output as json.",
|
|
455
|
-
"helpGroup": "GLOBAL",
|
|
456
|
-
"name": "json",
|
|
457
|
-
"allowNo": false,
|
|
458
|
-
"type": "boolean"
|
|
459
|
-
},
|
|
460
|
-
"flags-dir": {
|
|
461
|
-
"helpGroup": "GLOBAL",
|
|
462
|
-
"name": "flags-dir",
|
|
463
|
-
"summary": "Import flag values from a directory.",
|
|
464
|
-
"hasDynamicHelp": false,
|
|
465
|
-
"multiple": false,
|
|
466
|
-
"type": "option"
|
|
467
|
-
},
|
|
468
|
-
"job-id": {
|
|
469
|
-
"char": "i",
|
|
470
|
-
"name": "job-id",
|
|
471
|
-
"required": true,
|
|
472
|
-
"summary": "Job ID of the bulk job.",
|
|
473
|
-
"hasDynamicHelp": false,
|
|
474
|
-
"multiple": false,
|
|
475
|
-
"type": "option"
|
|
476
|
-
},
|
|
477
|
-
"target-org": {
|
|
478
|
-
"char": "o",
|
|
479
|
-
"name": "target-org",
|
|
480
|
-
"noCacheDefault": true,
|
|
481
|
-
"required": true,
|
|
482
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
483
|
-
"hasDynamicHelp": true,
|
|
484
|
-
"multiple": false,
|
|
485
|
-
"type": "option"
|
|
486
|
-
},
|
|
487
|
-
"api-version": {
|
|
488
|
-
"description": "Override the api version used for api requests made by this command",
|
|
489
|
-
"name": "api-version",
|
|
490
|
-
"hasDynamicHelp": false,
|
|
491
|
-
"multiple": false,
|
|
492
|
-
"type": "option"
|
|
493
|
-
}
|
|
494
|
-
},
|
|
495
|
-
"hasDynamicHelp": true,
|
|
496
|
-
"hiddenAliases": [],
|
|
497
|
-
"id": "data:bulk:results",
|
|
498
|
-
"pluginAlias": "@salesforce/plugin-data",
|
|
499
|
-
"pluginName": "@salesforce/plugin-data",
|
|
500
|
-
"pluginType": "core",
|
|
501
|
-
"strict": true,
|
|
502
|
-
"summary": "Get the results of a bulk ingest job that you previously ran.",
|
|
503
|
-
"enableJsonFlag": true,
|
|
504
|
-
"isESM": true,
|
|
505
|
-
"relativePath": [
|
|
506
|
-
"lib",
|
|
507
|
-
"commands",
|
|
508
|
-
"data",
|
|
509
|
-
"bulk",
|
|
510
|
-
"results.js"
|
|
511
|
-
],
|
|
512
|
-
"aliasPermutations": [],
|
|
513
|
-
"permutations": [
|
|
514
|
-
"data:bulk:results",
|
|
515
|
-
"bulk:data:results",
|
|
516
|
-
"bulk:results:data",
|
|
517
|
-
"data:results:bulk",
|
|
518
|
-
"results:data:bulk",
|
|
519
|
-
"results:bulk:data"
|
|
520
|
-
]
|
|
521
|
-
},
|
|
522
404
|
"data:create:file": {
|
|
523
405
|
"aliases": [],
|
|
524
406
|
"args": {},
|
|
@@ -776,6 +658,83 @@
|
|
|
776
658
|
"record:create:data"
|
|
777
659
|
]
|
|
778
660
|
},
|
|
661
|
+
"data:bulk:results": {
|
|
662
|
+
"aliases": [],
|
|
663
|
+
"args": {},
|
|
664
|
+
"description": "Use this command to get the complete results after running one of the CLI commands that uses Bulk API 2.0 to ingest (import, update, upsert, or delete) large datasets to your org, such as \"data import bulk\". The previously-run bulk command must have completed; if it's still processing, run the corresponding resume command first, such as \"data import resume.\" Make note of the job ID of the previous bulk command because you use it to run this command. \n\nYou can also use this command to get results from running a bulk ingest job with a different tool, such as Data Loader, as long as you have the job ID. For information on Data Loader, see https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/data_loader_intro.htm. \n\nThis command first displays the status of the previous bulk job, the operation that was executed in the org (such as insert or hard delete), and the updated Salesforce object. The command then displays how many records were processed in total, and how many were successful or failed. Finally, the output displays the names of the generated CSV-formatted files that contain the specific results for each ingested record. Depending on the success or failure of the bulk command, the results files can include the IDs of inserted records or the specific errors. When possible, if the ingest job failed or was aborted, you also get a CSV file with the unprocessed results.",
|
|
665
|
+
"examples": [
|
|
666
|
+
"Get results from a bulk ingest job; use the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --job-id 7507i000fake341G --target-org my-scratch"
|
|
667
|
+
],
|
|
668
|
+
"flags": {
|
|
669
|
+
"json": {
|
|
670
|
+
"description": "Format output as json.",
|
|
671
|
+
"helpGroup": "GLOBAL",
|
|
672
|
+
"name": "json",
|
|
673
|
+
"allowNo": false,
|
|
674
|
+
"type": "boolean"
|
|
675
|
+
},
|
|
676
|
+
"flags-dir": {
|
|
677
|
+
"helpGroup": "GLOBAL",
|
|
678
|
+
"name": "flags-dir",
|
|
679
|
+
"summary": "Import flag values from a directory.",
|
|
680
|
+
"hasDynamicHelp": false,
|
|
681
|
+
"multiple": false,
|
|
682
|
+
"type": "option"
|
|
683
|
+
},
|
|
684
|
+
"job-id": {
|
|
685
|
+
"char": "i",
|
|
686
|
+
"name": "job-id",
|
|
687
|
+
"required": true,
|
|
688
|
+
"summary": "Job ID of the bulk job.",
|
|
689
|
+
"hasDynamicHelp": false,
|
|
690
|
+
"multiple": false,
|
|
691
|
+
"type": "option"
|
|
692
|
+
},
|
|
693
|
+
"target-org": {
|
|
694
|
+
"char": "o",
|
|
695
|
+
"name": "target-org",
|
|
696
|
+
"noCacheDefault": true,
|
|
697
|
+
"required": true,
|
|
698
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
699
|
+
"hasDynamicHelp": true,
|
|
700
|
+
"multiple": false,
|
|
701
|
+
"type": "option"
|
|
702
|
+
},
|
|
703
|
+
"api-version": {
|
|
704
|
+
"description": "Override the api version used for api requests made by this command",
|
|
705
|
+
"name": "api-version",
|
|
706
|
+
"hasDynamicHelp": false,
|
|
707
|
+
"multiple": false,
|
|
708
|
+
"type": "option"
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
"hasDynamicHelp": true,
|
|
712
|
+
"hiddenAliases": [],
|
|
713
|
+
"id": "data:bulk:results",
|
|
714
|
+
"pluginAlias": "@salesforce/plugin-data",
|
|
715
|
+
"pluginName": "@salesforce/plugin-data",
|
|
716
|
+
"pluginType": "core",
|
|
717
|
+
"strict": true,
|
|
718
|
+
"summary": "Get the results of a bulk ingest job that you previously ran.",
|
|
719
|
+
"enableJsonFlag": true,
|
|
720
|
+
"isESM": true,
|
|
721
|
+
"relativePath": [
|
|
722
|
+
"lib",
|
|
723
|
+
"commands",
|
|
724
|
+
"data",
|
|
725
|
+
"bulk",
|
|
726
|
+
"results.js"
|
|
727
|
+
],
|
|
728
|
+
"aliasPermutations": [],
|
|
729
|
+
"permutations": [
|
|
730
|
+
"data:bulk:results",
|
|
731
|
+
"bulk:data:results",
|
|
732
|
+
"bulk:results:data",
|
|
733
|
+
"data:results:bulk",
|
|
734
|
+
"results:data:bulk",
|
|
735
|
+
"results:bulk:data"
|
|
736
|
+
]
|
|
737
|
+
},
|
|
779
738
|
"data:delete:bulk": {
|
|
780
739
|
"aliases": [],
|
|
781
740
|
"args": {},
|
|
@@ -2157,256 +2116,6 @@
|
|
|
2157
2116
|
"tree:import:data"
|
|
2158
2117
|
]
|
|
2159
2118
|
},
|
|
2160
|
-
"data:query:resume": {
|
|
2161
|
-
"aliases": [
|
|
2162
|
-
"force:data:soql:bulk:report"
|
|
2163
|
-
],
|
|
2164
|
-
"args": {},
|
|
2165
|
-
"deprecateAliases": true,
|
|
2166
|
-
"deprecationOptions": {
|
|
2167
|
-
"message": "Bulk mode for \"data query\" is deprecated, this command will be removed after April 2025.\nUse \"data export bulk | data export resume\" for bulk queries instead.\n"
|
|
2168
|
-
},
|
|
2169
|
-
"description": "Run this command using the job ID returned from the \"<%= config.bin %> data query --bulk\" command.",
|
|
2170
|
-
"examples": [
|
|
2171
|
-
"View the status of a bulk query with the specified ID:\n<%= config.bin %> <%= command.id %> --bulk-query-id 7500x000005BdFzXXX"
|
|
2172
|
-
],
|
|
2173
|
-
"flags": {
|
|
2174
|
-
"json": {
|
|
2175
|
-
"description": "Format output as json.",
|
|
2176
|
-
"helpGroup": "GLOBAL",
|
|
2177
|
-
"name": "json",
|
|
2178
|
-
"allowNo": false,
|
|
2179
|
-
"type": "boolean"
|
|
2180
|
-
},
|
|
2181
|
-
"flags-dir": {
|
|
2182
|
-
"helpGroup": "GLOBAL",
|
|
2183
|
-
"name": "flags-dir",
|
|
2184
|
-
"summary": "Import flag values from a directory.",
|
|
2185
|
-
"hasDynamicHelp": false,
|
|
2186
|
-
"multiple": false,
|
|
2187
|
-
"type": "option"
|
|
2188
|
-
},
|
|
2189
|
-
"target-org": {
|
|
2190
|
-
"aliases": [
|
|
2191
|
-
"targetusername",
|
|
2192
|
-
"u"
|
|
2193
|
-
],
|
|
2194
|
-
"char": "o",
|
|
2195
|
-
"deprecateAliases": true,
|
|
2196
|
-
"name": "target-org",
|
|
2197
|
-
"noCacheDefault": true,
|
|
2198
|
-
"summary": "Username or alias of the target org.",
|
|
2199
|
-
"hasDynamicHelp": true,
|
|
2200
|
-
"multiple": false,
|
|
2201
|
-
"type": "option"
|
|
2202
|
-
},
|
|
2203
|
-
"api-version": {
|
|
2204
|
-
"aliases": [
|
|
2205
|
-
"apiversion"
|
|
2206
|
-
],
|
|
2207
|
-
"deprecateAliases": true,
|
|
2208
|
-
"description": "Override the api version used for api requests made by this command",
|
|
2209
|
-
"name": "api-version",
|
|
2210
|
-
"hasDynamicHelp": false,
|
|
2211
|
-
"multiple": false,
|
|
2212
|
-
"type": "option"
|
|
2213
|
-
},
|
|
2214
|
-
"loglevel": {
|
|
2215
|
-
"deprecated": {
|
|
2216
|
-
"message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
|
|
2217
|
-
},
|
|
2218
|
-
"hidden": true,
|
|
2219
|
-
"name": "loglevel",
|
|
2220
|
-
"hasDynamicHelp": false,
|
|
2221
|
-
"multiple": false,
|
|
2222
|
-
"type": "option"
|
|
2223
|
-
},
|
|
2224
|
-
"result-format": {
|
|
2225
|
-
"aliases": [
|
|
2226
|
-
"resultformat"
|
|
2227
|
-
],
|
|
2228
|
-
"char": "r",
|
|
2229
|
-
"deprecateAliases": true,
|
|
2230
|
-
"name": "result-format",
|
|
2231
|
-
"summary": "Format to display the results; the --json flag overrides this flag.",
|
|
2232
|
-
"default": "human",
|
|
2233
|
-
"hasDynamicHelp": false,
|
|
2234
|
-
"multiple": false,
|
|
2235
|
-
"options": [
|
|
2236
|
-
"human",
|
|
2237
|
-
"csv",
|
|
2238
|
-
"json"
|
|
2239
|
-
],
|
|
2240
|
-
"type": "option"
|
|
2241
|
-
},
|
|
2242
|
-
"bulk-query-id": {
|
|
2243
|
-
"aliases": [
|
|
2244
|
-
"bulkqueryid"
|
|
2245
|
-
],
|
|
2246
|
-
"char": "i",
|
|
2247
|
-
"deprecateAliases": true,
|
|
2248
|
-
"name": "bulk-query-id",
|
|
2249
|
-
"summary": "Job ID of the bulk query.",
|
|
2250
|
-
"hasDynamicHelp": false,
|
|
2251
|
-
"multiple": false,
|
|
2252
|
-
"type": "option"
|
|
2253
|
-
},
|
|
2254
|
-
"use-most-recent": {
|
|
2255
|
-
"name": "use-most-recent",
|
|
2256
|
-
"summary": "Use the most recent bulk query ID from cache.",
|
|
2257
|
-
"allowNo": false,
|
|
2258
|
-
"type": "boolean"
|
|
2259
|
-
}
|
|
2260
|
-
},
|
|
2261
|
-
"hasDynamicHelp": true,
|
|
2262
|
-
"hiddenAliases": [],
|
|
2263
|
-
"id": "data:query:resume",
|
|
2264
|
-
"pluginAlias": "@salesforce/plugin-data",
|
|
2265
|
-
"pluginName": "@salesforce/plugin-data",
|
|
2266
|
-
"pluginType": "core",
|
|
2267
|
-
"state": "deprecated",
|
|
2268
|
-
"strict": true,
|
|
2269
|
-
"summary": "View the status of a bulk query.",
|
|
2270
|
-
"enableJsonFlag": true,
|
|
2271
|
-
"isESM": true,
|
|
2272
|
-
"relativePath": [
|
|
2273
|
-
"lib",
|
|
2274
|
-
"commands",
|
|
2275
|
-
"data",
|
|
2276
|
-
"query",
|
|
2277
|
-
"resume.js"
|
|
2278
|
-
],
|
|
2279
|
-
"aliasPermutations": [
|
|
2280
|
-
"force:data:soql:bulk:report",
|
|
2281
|
-
"data:force:soql:bulk:report",
|
|
2282
|
-
"data:soql:force:bulk:report",
|
|
2283
|
-
"data:soql:bulk:force:report",
|
|
2284
|
-
"data:soql:bulk:report:force",
|
|
2285
|
-
"force:soql:data:bulk:report",
|
|
2286
|
-
"soql:force:data:bulk:report",
|
|
2287
|
-
"soql:data:force:bulk:report",
|
|
2288
|
-
"soql:data:bulk:force:report",
|
|
2289
|
-
"soql:data:bulk:report:force",
|
|
2290
|
-
"force:soql:bulk:data:report",
|
|
2291
|
-
"soql:force:bulk:data:report",
|
|
2292
|
-
"soql:bulk:force:data:report",
|
|
2293
|
-
"soql:bulk:data:force:report",
|
|
2294
|
-
"soql:bulk:data:report:force",
|
|
2295
|
-
"force:soql:bulk:report:data",
|
|
2296
|
-
"soql:force:bulk:report:data",
|
|
2297
|
-
"soql:bulk:force:report:data",
|
|
2298
|
-
"soql:bulk:report:force:data",
|
|
2299
|
-
"soql:bulk:report:data:force",
|
|
2300
|
-
"force:data:bulk:soql:report",
|
|
2301
|
-
"data:force:bulk:soql:report",
|
|
2302
|
-
"data:bulk:force:soql:report",
|
|
2303
|
-
"data:bulk:soql:force:report",
|
|
2304
|
-
"data:bulk:soql:report:force",
|
|
2305
|
-
"force:bulk:data:soql:report",
|
|
2306
|
-
"bulk:force:data:soql:report",
|
|
2307
|
-
"bulk:data:force:soql:report",
|
|
2308
|
-
"bulk:data:soql:force:report",
|
|
2309
|
-
"bulk:data:soql:report:force",
|
|
2310
|
-
"force:bulk:soql:data:report",
|
|
2311
|
-
"bulk:force:soql:data:report",
|
|
2312
|
-
"bulk:soql:force:data:report",
|
|
2313
|
-
"bulk:soql:data:force:report",
|
|
2314
|
-
"bulk:soql:data:report:force",
|
|
2315
|
-
"force:bulk:soql:report:data",
|
|
2316
|
-
"bulk:force:soql:report:data",
|
|
2317
|
-
"bulk:soql:force:report:data",
|
|
2318
|
-
"bulk:soql:report:force:data",
|
|
2319
|
-
"bulk:soql:report:data:force",
|
|
2320
|
-
"force:data:bulk:report:soql",
|
|
2321
|
-
"data:force:bulk:report:soql",
|
|
2322
|
-
"data:bulk:force:report:soql",
|
|
2323
|
-
"data:bulk:report:force:soql",
|
|
2324
|
-
"data:bulk:report:soql:force",
|
|
2325
|
-
"force:bulk:data:report:soql",
|
|
2326
|
-
"bulk:force:data:report:soql",
|
|
2327
|
-
"bulk:data:force:report:soql",
|
|
2328
|
-
"bulk:data:report:force:soql",
|
|
2329
|
-
"bulk:data:report:soql:force",
|
|
2330
|
-
"force:bulk:report:data:soql",
|
|
2331
|
-
"bulk:force:report:data:soql",
|
|
2332
|
-
"bulk:report:force:data:soql",
|
|
2333
|
-
"bulk:report:data:force:soql",
|
|
2334
|
-
"bulk:report:data:soql:force",
|
|
2335
|
-
"force:bulk:report:soql:data",
|
|
2336
|
-
"bulk:force:report:soql:data",
|
|
2337
|
-
"bulk:report:force:soql:data",
|
|
2338
|
-
"bulk:report:soql:force:data",
|
|
2339
|
-
"bulk:report:soql:data:force",
|
|
2340
|
-
"force:data:soql:report:bulk",
|
|
2341
|
-
"data:force:soql:report:bulk",
|
|
2342
|
-
"data:soql:force:report:bulk",
|
|
2343
|
-
"data:soql:report:force:bulk",
|
|
2344
|
-
"data:soql:report:bulk:force",
|
|
2345
|
-
"force:soql:data:report:bulk",
|
|
2346
|
-
"soql:force:data:report:bulk",
|
|
2347
|
-
"soql:data:force:report:bulk",
|
|
2348
|
-
"soql:data:report:force:bulk",
|
|
2349
|
-
"soql:data:report:bulk:force",
|
|
2350
|
-
"force:soql:report:data:bulk",
|
|
2351
|
-
"soql:force:report:data:bulk",
|
|
2352
|
-
"soql:report:force:data:bulk",
|
|
2353
|
-
"soql:report:data:force:bulk",
|
|
2354
|
-
"soql:report:data:bulk:force",
|
|
2355
|
-
"force:soql:report:bulk:data",
|
|
2356
|
-
"soql:force:report:bulk:data",
|
|
2357
|
-
"soql:report:force:bulk:data",
|
|
2358
|
-
"soql:report:bulk:force:data",
|
|
2359
|
-
"soql:report:bulk:data:force",
|
|
2360
|
-
"force:data:report:soql:bulk",
|
|
2361
|
-
"data:force:report:soql:bulk",
|
|
2362
|
-
"data:report:force:soql:bulk",
|
|
2363
|
-
"data:report:soql:force:bulk",
|
|
2364
|
-
"data:report:soql:bulk:force",
|
|
2365
|
-
"force:report:data:soql:bulk",
|
|
2366
|
-
"report:force:data:soql:bulk",
|
|
2367
|
-
"report:data:force:soql:bulk",
|
|
2368
|
-
"report:data:soql:force:bulk",
|
|
2369
|
-
"report:data:soql:bulk:force",
|
|
2370
|
-
"force:report:soql:data:bulk",
|
|
2371
|
-
"report:force:soql:data:bulk",
|
|
2372
|
-
"report:soql:force:data:bulk",
|
|
2373
|
-
"report:soql:data:force:bulk",
|
|
2374
|
-
"report:soql:data:bulk:force",
|
|
2375
|
-
"force:report:soql:bulk:data",
|
|
2376
|
-
"report:force:soql:bulk:data",
|
|
2377
|
-
"report:soql:force:bulk:data",
|
|
2378
|
-
"report:soql:bulk:force:data",
|
|
2379
|
-
"report:soql:bulk:data:force",
|
|
2380
|
-
"force:data:report:bulk:soql",
|
|
2381
|
-
"data:force:report:bulk:soql",
|
|
2382
|
-
"data:report:force:bulk:soql",
|
|
2383
|
-
"data:report:bulk:force:soql",
|
|
2384
|
-
"data:report:bulk:soql:force",
|
|
2385
|
-
"force:report:data:bulk:soql",
|
|
2386
|
-
"report:force:data:bulk:soql",
|
|
2387
|
-
"report:data:force:bulk:soql",
|
|
2388
|
-
"report:data:bulk:force:soql",
|
|
2389
|
-
"report:data:bulk:soql:force",
|
|
2390
|
-
"force:report:bulk:data:soql",
|
|
2391
|
-
"report:force:bulk:data:soql",
|
|
2392
|
-
"report:bulk:force:data:soql",
|
|
2393
|
-
"report:bulk:data:force:soql",
|
|
2394
|
-
"report:bulk:data:soql:force",
|
|
2395
|
-
"force:report:bulk:soql:data",
|
|
2396
|
-
"report:force:bulk:soql:data",
|
|
2397
|
-
"report:bulk:force:soql:data",
|
|
2398
|
-
"report:bulk:soql:force:data",
|
|
2399
|
-
"report:bulk:soql:data:force"
|
|
2400
|
-
],
|
|
2401
|
-
"permutations": [
|
|
2402
|
-
"data:query:resume",
|
|
2403
|
-
"query:data:resume",
|
|
2404
|
-
"query:resume:data",
|
|
2405
|
-
"data:resume:query",
|
|
2406
|
-
"resume:data:query",
|
|
2407
|
-
"resume:query:data"
|
|
2408
|
-
]
|
|
2409
|
-
},
|
|
2410
2119
|
"data:update:bulk": {
|
|
2411
2120
|
"aliases": [],
|
|
2412
2121
|
"args": {},
|
|
@@ -3523,5 +3232,5 @@
|
|
|
3523
3232
|
]
|
|
3524
3233
|
}
|
|
3525
3234
|
},
|
|
3526
|
-
"version": "4.0.
|
|
3235
|
+
"version": "4.0.29"
|
|
3527
3236
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-data",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.29",
|
|
4
4
|
"description": "Plugin for salesforce data commands",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"homepage": "https://github.com/salesforcecli/plugin-data",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"dependencies": {
|
|
123
123
|
"@jsforce/jsforce-node": "^3.6.6",
|
|
124
124
|
"@oclif/multi-stage-output": "^0.8.12",
|
|
125
|
-
"@salesforce/core": "^8.
|
|
125
|
+
"@salesforce/core": "^8.10.0",
|
|
126
126
|
"@salesforce/kit": "^3.2.2",
|
|
127
127
|
"@salesforce/sf-plugins-core": "^12.2.1",
|
|
128
128
|
"@salesforce/ts-types": "^2.0.11",
|
|
@@ -138,11 +138,11 @@
|
|
|
138
138
|
"@oclif/plugin-command-snapshot": "^5.2.38",
|
|
139
139
|
"@oclif/test": "^4.1.12",
|
|
140
140
|
"@salesforce/cli-plugins-testkit": "^5.3.39",
|
|
141
|
-
"@salesforce/dev-scripts": "^11.0.
|
|
141
|
+
"@salesforce/dev-scripts": "^11.0.2",
|
|
142
142
|
"@salesforce/plugin-command-reference": "^3.1.49",
|
|
143
143
|
"@salesforce/types": "^1.3.0",
|
|
144
|
-
"eslint-plugin-sf-plugin": "^1.20.
|
|
145
|
-
"oclif": "^4.17.
|
|
144
|
+
"eslint-plugin-sf-plugin": "^1.20.21",
|
|
145
|
+
"oclif": "^4.17.46",
|
|
146
146
|
"ts-node": "^10.9.2",
|
|
147
147
|
"typescript": "^5.8.3"
|
|
148
148
|
},
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
"exports": "./lib/index.js",
|
|
268
268
|
"type": "module",
|
|
269
269
|
"sfdx": {
|
|
270
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/4.0.
|
|
271
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/4.0.
|
|
270
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/4.0.29.crt",
|
|
271
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-data/4.0.29.sig"
|
|
272
272
|
}
|
|
273
273
|
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* Licensed under the BSD 3-Clause license.
|
|
5
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
import { Messages } from '@salesforce/core';
|
|
8
|
-
import { QueryJobV2 } from '@jsforce/jsforce-node/lib/api/bulk2.js';
|
|
9
|
-
import { Flags, loglevel, optionalOrgFlagWithDeprecations, orgApiVersionFlagWithDeprecations, SfCommand, } from '@salesforce/sf-plugins-core';
|
|
10
|
-
import { resultFormatFlag } from '../../../flags.js';
|
|
11
|
-
import { displayResults, transformBulkResults } from '../../../queryUtils.js';
|
|
12
|
-
import { BulkQueryRequestCache } from '../../../bulkDataRequestCache.js';
|
|
13
|
-
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
14
|
-
const reportMessages = Messages.loadMessages('@salesforce/plugin-data', 'bulk.report');
|
|
15
|
-
// needed by the flags loaded from the other command
|
|
16
|
-
export class BulkQueryReport extends SfCommand {
|
|
17
|
-
static summary = reportMessages.getMessage('summary');
|
|
18
|
-
static description = reportMessages.getMessage('description');
|
|
19
|
-
static examples = reportMessages.getMessages('examples');
|
|
20
|
-
static aliases = ['force:data:soql:bulk:report'];
|
|
21
|
-
static deprecateAliases = true;
|
|
22
|
-
static state = 'deprecated';
|
|
23
|
-
static deprecationOptions = {
|
|
24
|
-
message: `Bulk mode for "data query" is deprecated, this command will be removed after April 2025.
|
|
25
|
-
Use "data export bulk | data export resume" for bulk queries instead.
|
|
26
|
-
`,
|
|
27
|
-
};
|
|
28
|
-
static flags = {
|
|
29
|
-
'target-org': { ...optionalOrgFlagWithDeprecations },
|
|
30
|
-
'api-version': orgApiVersionFlagWithDeprecations,
|
|
31
|
-
loglevel,
|
|
32
|
-
'result-format': resultFormatFlag(),
|
|
33
|
-
'bulk-query-id': Flags.salesforceId({
|
|
34
|
-
length: 18,
|
|
35
|
-
char: 'i',
|
|
36
|
-
startsWith: '750',
|
|
37
|
-
summary: reportMessages.getMessage('flags.bulkQueryId.summary'),
|
|
38
|
-
aliases: ['bulkqueryid'],
|
|
39
|
-
exactlyOne: ['bulk-query-id', 'use-most-recent'],
|
|
40
|
-
deprecateAliases: true,
|
|
41
|
-
}),
|
|
42
|
-
'use-most-recent': Flags.boolean({
|
|
43
|
-
summary: reportMessages.getMessage('flags.useMostRecent.summary'),
|
|
44
|
-
exactlyOne: ['bulk-query-id', 'use-most-recent'],
|
|
45
|
-
}),
|
|
46
|
-
};
|
|
47
|
-
async run() {
|
|
48
|
-
const [{ flags }, cache] = await Promise.all([this.parse(BulkQueryReport), BulkQueryRequestCache.create()]);
|
|
49
|
-
const resumeOptions = await cache.resolveResumeOptionsFromCache(flags['bulk-query-id'] ?? flags['use-most-recent']);
|
|
50
|
-
const job = new QueryJobV2(resumeOptions.options.connection, {
|
|
51
|
-
id: resumeOptions.jobInfo.id,
|
|
52
|
-
pollingOptions: {
|
|
53
|
-
pollTimeout: 30_000,
|
|
54
|
-
pollInterval: 1000,
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
await job.poll();
|
|
58
|
-
const results = await job.result();
|
|
59
|
-
// we don't have access to the SOQL query here so we pass an empty string.
|
|
60
|
-
const queryResult = transformBulkResults((await results.toArray()), '');
|
|
61
|
-
if (!this.jsonEnabled()) {
|
|
62
|
-
displayResults({ ...queryResult }, flags['result-format']);
|
|
63
|
-
}
|
|
64
|
-
return queryResult.result;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=resume.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../../../../src/commands/data/query/resume.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEpE,OAAO,EACL,KAAK,EACL,QAAQ,EACR,+BAA+B,EAC/B,iCAAiC,EACjC,SAAS,GACV,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,cAAc,GAAG,QAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,aA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AAC,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,qBAAqB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAC5G,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,6BAA6B,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACpH,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,EAAE;YAC3D,EAAE,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE;YAC5B,cAAc,EAAE;gBACd,WAAW,EAAE,MAAM;gBACnB,YAAY,EAAE,IAAI;aACnB;SACF,CAAC,CAAC;QACH,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QACjB,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC;QACnC,0EAA0E;QAC1E,MAAM,WAAW,GAAG,oBAAoB,CAAC,CAAC,MAAM,OAAO,CAAC,OAAO,EAAE,CAAoB,EAAE,EAAE,CAAC,CAAC;QAE3F,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,cAAc,CAAC,EAAE,GAAG,WAAW,EAAE,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;QAC7D,CAAC;QAED,OAAO,WAAW,CAAC,MAAM,CAAC;IAC5B,CAAC"}
|
package/messages/bulk.report.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# summary
|
|
2
|
-
|
|
3
|
-
View the status of a bulk query.
|
|
4
|
-
|
|
5
|
-
# description
|
|
6
|
-
|
|
7
|
-
Run this command using the job ID returned from the "<%= config.bin %> data query --bulk" command.
|
|
8
|
-
|
|
9
|
-
# examples
|
|
10
|
-
|
|
11
|
-
- View the status of a bulk query with the specified ID:
|
|
12
|
-
|
|
13
|
-
<%= config.bin %> <%= command.id %> --bulk-query-id 7500x000005BdFzXXX
|
|
14
|
-
|
|
15
|
-
# flags.bulkQueryId.summary
|
|
16
|
-
|
|
17
|
-
Job ID of the bulk query.
|
|
18
|
-
|
|
19
|
-
# flags.useMostRecent.summary
|
|
20
|
-
|
|
21
|
-
Use the most recent bulk query ID from cache.
|