We're improving the data export tree
and data import tree
commands, but doing it in phases.
Our plan:
- Introduce the new
data import beta tree
anddata export beta tree
commands. - Both commands use the new helper functions.
- Update the existing commands' output with a message that encourages users to try the new commands.
- Ensure that export files created by
data export beta tree
are compatible with bothdata import tree
anddata import beta tree
.
These are the breaking changes between the existing and beta commands:
data import beta tree
: We removed the hidden and deprecated--content-type
flag. The command supports only JSON files. Usage of the flag: ~5 per year.data import beta tree
: We removed the--config-help
flag because the schema information is in the command help. Usage of the flag: ~1 per week.
Other differences:
data export tree --plan
uses the object names as the new file name. Previously it appended ans
on the end, but the new one doesn't. So the filename is nowAccount.json
andFoo__c.json
instead ofAccounts.json
and the awfulFoo__cs.json
.data export beta tree
no longer writes empty child objects. Previously, you saw properties with{records: []}
that had no effect when imported.data import beta tree --plan
doesn't care aboutresolveRefs
andsaveRefs
.data import beta tree --plan
doesn't care about the order of files in yourplan
file. Rather, it defers unresolved references until they're resolved.data export beta tree --plan
now handles more than 2 levels of child objects in a query. It can handle up to 5 levels, which is the SOQL limit.- Both
data export beta tree
anddata import beta tree
handle objects that refer to objects of the same type. For example, an Account with ParentId that's an Account or a User with Manager that's a User. data import beta tree --plan
handles more than 200 records. It batches them into groups of 200 per object. The new record limit isn't documented; it most likely comes from your operating system call stack depth or other org limits, such as data storage or api call limits.data import tree
supported plan files where thefiles
property could contain objects. It's unclear how those files were generated, but probably not from thedata export tree
command. The newdata import beta tree
command works only with strings and throws an error otherwise.data import beta tree --files
(and not--plan
) imports the files in parallel. Files can only reference each other if you specify--plan
.data import tree
outputs deprecation warnings for both--content-type
and--config-help
flags.
Our plan:
- Pin an issue when the change goes into the release candidate so if users run into problems they can quickly find the
legacy
commands. - Move the "old" commands to
legacy
and mark themhidden
anddeprecated
with the Phase 3 date. - Move the
force:
aliases to the new commands. - Remove the
beta
sub-topic from the new commands, but keep thebeta
alias so they will still work. Add thedeprecateAliases
property to encourage users to stop using the commands in thebeta
sub-topic. - Update
data export tree --plan
to display a warning that the JSON output is going to change after the Phase 3 date. Specifically, the JSON output won't includesaveRefs
andresolveRefs
information.
Our plan:
- Update
data export tree --plan
to stop writing the unusedsaveRefs
andresolveRefs
properties on plan files, and stop returning them in JSON output, and remove the warning about that change. - Tighten the schema to remove the
object
part offiles
, and removesaveRefs
andresolveRefs
. - Check messages for any that aren't being used, then remove them.
- Remove the
beta
alias fromdata import tree
anddata export tree
. - Update the pinned issue to reflect these changes.
Salesforce CLI uses beta
and legacy
subtopics to safely introduce beta versions of existing commands and then GA them. This approach allows you to try out the beta, while continuing to use the existing command at the same time. Let's look at an example to see how this works.
- We create and release the
data export beta tree
command, which is similar to the existingdata export tree
command, but with improvements and possibly breaking changes. The two separate commands co-exist, which means if you runsf commands
, you see both the existing andbeta
command. - After the beta period is over, we GA the changes by moving the functionality we added to
data export beta tree
to the "official"data export tree
command. We also move the functionality in the olddata export tree
to a new command calleddata export legacy tree
. We hide and deprecate both thelegacy
andbeta
versions of the command, but alias thebeta
version to thedata export tree
command because they're now the same. If you runsf commands
you see only thedata export tree
command, although thelegacy
version is still available (but hidden) if you really need it. - At some point, we remove the
data export legacy tree
command; we'll warn you, don't worry. We also remove thebeta
alias.