Open mshanemc opened 7 months ago
Hello @mshanemc, Thank you for this new release! I particularly like to query more than 2 levels of child object, the import of more than 200 records and the possibility to refer to the same object type in a relation. Do you have any plan to support record type definition at import?
Hello @mshanemc, Thank you for this new release! I particularly like to query more than 2 levels of child object, the import of more than 200 records and the possibility to refer to the same object type in a relation. Do you have any plan to support record type definition at import?
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.
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 https://github.com/forcedotcom/cli/issues/2663 and https://github.com/forcedotcom/cli/discussions/2359export beta
andimport beta
with--plan
handle records that refer to records of the same object type (ex: Account with ParentId, User with ManagerId). https://github.com/forcedotcom/cli/discussions/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