-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new data import|export beta tree
commands
#2738
Comments
Hello @mshanemc, |
Nobody's asked for that before. You can open a request for it https://github.com/forcedotcom/cli/discussions (that's what we use to prioritize what gets done next). It's a good feature idea but probably needs some design discussions. |
For the record, I'm hitting a limit of about ~2800 records (of a single custom object type) using the new import command before I hit Example individual record: {
"attributes": {
"type": "MyNamespace__Car__c",
"referenceId": "MyNamespace__Car__cRef9"
},
"MyNamespace__Is_Insured__c": "Yes",
"MyNamespace__Location__c": "001As00000SEX15IAH",
"RecordTypeId": "012As000001wsWqIAI",
"MyNamespace__Manufacture_Date__c": "2016-09-01",
"MyNamespace__Manufacture_Time__c": "04:00:00.000Z",
"MyNamespace__Car_Type__c": "Sedan",
"MyNamespace__Car_Outcome__c": "Totaled",
"MyNamespace__Report_Date__c": "2016-09-01",
"MyNamespace__Report_Time__c": "04:00:00.000Z",
"MyNamespace__Mechanic__c": "Dr. Smith",
"MyNamespace__Repair_Facility__c": "Auto Shop",
"MyNamespace__Repair_Facility_Street__c": "123 Main St",
"MyNamespace__Repair_Facility_City__c": "New York",
"MyNamespace__Repair_Facility_State__c": "NY",
"MyNamespace__Repair_Facility_ZIP__c": "10001",
"MyNamespace__Time_Car_Began_Work__c": "09:00:00",
"MyNamespace__Activity_Before_Incident__c": "Driving",
"MyNamespace__What_Happened__c": "Accident",
"MyNamespace__What_Was_Damage__c": "Scratch",
"MyNamespace__What_Was_Object_Or_Substance__c": "Pole",
"MyNamespace__Incident_Location__c": "Garage",
"MyNamespace__Towed_Away__c": true
} |
We'll be pushing Phase 3 for next week, final schedule: |
There's been a number of longstanding problems and limitations with the
tree
commands whose fixes required a rewrite. There's a few small breaking changes and y'all run these commands A LOT so we're releasing them through our normal beta process.Phase 1: Beta (complete)
data import beta tree
anddata export beta tree
Breaking changes between existing commands and the beta commands
import beta
removes the hidden, deprecatedcontent-type
. Only json files are supported. Usage: ~5 per year.import beta
removes the--config-help
flag. The schema information is now in the command help. Usage: ~1 per week.Other changes
export --plan
writes Object names as the file name. It used to append ans
on the end. So the filename is nowAccount.json
andFoo__c.json
instead ofAccounts.json
andFoo__cs.json
. Since the filenames are part of the plan file, this only affects newly generated plans/files.export beta
no longer writes empty child objects. Previously, you'd see properties with{records: []}
that had no effect on imports.import beta
ignores theresolveRefs
andsaveRefs
(export beta
produces them to preserve compatibility with the non-beta import command).export beta
now handles more than 2 levels of child objects in a query using--plan
(up to 5 because that's SOQL's limit). see Extract deeply nested (more than 1 level) plan #2663 and Extract deeply nested (more than 1 level) plan #2359export beta
andimport beta
with--plan
handle records that refer to records of the same object type (ex: Account with ParentId, User with ManagerId). Improve handling of self-referencing lookups by force:data:tree commands #2364import beta
using--plan
handles files with more than 200 records. It will batch them into groups of 200 per object.import
supported plan files where thefiles
property could contain objects (the export command did not produce such files). Forimport beta
only strings are allowed and will throw an error otherwise.import beta
in--files
mode (not--plan
) will import the files in parallel (files can't reference each other without--plan
)import
provides deprecation warnings for bothcontent-type
andconfig-help
flags, sinceimport beta
removes them.--config-help
is now hidden (content-type
was already hidden)import beta
with--plan
is optimized for references (using the saved ID of one record as the value of a Relationship Field in another) that follow the standard pattern@[ObjectName]Ref[SomeNumber]
, like@AccountRef54
or@Foo__cRef0
. In the past, a ref could start with@
followed by anything. Theexport
command historically produced refs in the preferred format (as doesexport beta
), but you may have handcrafted your own at some point. Some of the enhancements (self-referential objects, support for more than 200 records in a file, etc) required the preferred pattern.Export files created by
export beta
are compatible withimport
andimport beta
The new record limit for
import beta
with--plan
is not documented. You're most likely to hit a call stack depth (from recursion) or some org limit (data storage, api call limits) depending on your data and your org. If you're doing something really large, we still recommend thebulk
commands.During the beta, please submit issues with the new commands to https://github.com/forcedotcom/cli/issues
In general, you'll find the
--plan
options much more powerful. We encourage you to use those over the--files
option.Phase 2: GA the new commands, put the old under
legacy
. [July 10 2024] <=== Currently Heredata import legacy tree
anddata export legacy tree
, and markedhidden
anddeprecated
with the Phase 3 datedata import tree
anddata export tree
. They will still work with theirbeta
alias, but you'll get a deprecation warning if you use it.force:
aliases will go to the new commandsdata export tree
with--json
will being warning that it will change json output (the saveRefs/resolveRefs properties are in the json output) after Phase 3 datePhase 3: retire the legacy commands and all their dependent code [Nov 10 2024]
export
stop writing the unusedsaveRefs
andresolveRefs
properties on plan files, and stop returning them in jsonobject
part offiles
, and removesaveRefs
andresolveRefs
beta
alias fromimport|export
The text was updated successfully, but these errors were encountered: