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 treeanddata export beta treecommands. - 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 treeare compatible with bothdata import treeanddata 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-typeflag. The command supports only JSON files. Usage of the flag: ~5 per year.data import beta tree: We removed the--config-helpflag because the schema information is in the command help. Usage of the flag: ~1 per week.
Other differences:
data export tree --planuses the object names as the new file name. Previously it appended anson the end, but the new one doesn't. So the filename is nowAccount.jsonandFoo__c.jsoninstead ofAccounts.jsonand the awfulFoo__cs.json.data export beta treeno longer writes empty child objects. Previously, you saw properties with{records: []}that had no effect when imported.data import beta tree --plandoesn't care aboutresolveRefsandsaveRefs.data import beta tree --plandoesn't care about the order of files in yourplanfile. Rather, it defers unresolved references until they're resolved.data export beta tree --plannow 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 treeanddata import beta treehandle 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 --planhandles 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 treesupported plan files where thefilesproperty could contain objects. It's unclear how those files were generated, but probably not from thedata export treecommand. The newdata import beta treecommand 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 treeoutputs deprecation warnings for both--content-typeand--config-helpflags.
Our plan:
- Pin an issue when the change goes into the release candidate so if users run into problems they can quickly find the
legacycommands. - Move the "old" commands to
legacyand mark themhiddenanddeprecatedwith the Phase 3 date. - Move the
force:aliases to the new commands. - Remove the
betasub-topic from the new commands, but keep thebetaalias so they will still work. Add thedeprecateAliasesproperty to encourage users to stop using the commands in thebetasub-topic. - Update
data export tree --planto display a warning that the JSON output is going to change after the Phase 3 date. Specifically, the JSON output won't includesaveRefsandresolveRefsinformation.
Our plan:
- Update
data export tree --planto stop writing the unusedsaveRefsandresolveRefsproperties on plan files, and stop returning them in JSON output, and remove the warning about that change. - Tighten the schema to remove the
objectpart offiles, and removesaveRefsandresolveRefs. - Check messages for any that aren't being used, then remove them.
- Remove the
betaalias fromdata import treeanddata 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 treecommand, which is similar to the existingdata export treecommand, but with improvements and possibly breaking changes. The two separate commands co-exist, which means if you runsf commands, you see both the existing andbetacommand. - After the beta period is over, we GA the changes by moving the functionality we added to
data export beta treeto the "official"data export treecommand. We also move the functionality in the olddata export treeto a new command calleddata export legacy tree. We hide and deprecate both thelegacyandbetaversions of the command, but alias thebetaversion to thedata export treecommand because they're now the same. If you runsf commandsyou see only thedata export treecommand, although thelegacyversion is still available (but hidden) if you really need it. - At some point, we remove the
data export legacy treecommand; we'll warn you, don't worry. We also remove thebetaalias.