0.0.33 • Published 4 years ago
sfdx-tohoom-plugin v0.0.33
sfdx-djc-plugin
A plugin for the Salesforce CLI built by Dave Carroll and containing a few of helpful commands.
Setup
Install from source
Install the SDFX CLI.
Clone the repository:
git clone git@github.com:wadewegner/sfdx-waw-plugin.git
Install npm modules:
npm install
Link the plugin:
sfdx plugins:link .
Install as plugin
- Install plugin:
sfdx plugins:install sfdx-waw-plugin
$ npm install -g sfdx-tohoom-plugin
$ sfdx-tohoom-plugin COMMAND
running command...
$ sfdx-tohoom-plugin (-v|--version|version)
sfdx-tohoom-plugin/0.0.32 darwin-x64 node-v10.15.1
$ sfdx-tohoom-plugin --help [COMMAND]
USAGE
$ sfdx-tohoom-plugin COMMAND
...
sfdx-tohoom-plugin tohoom:data:export
Extract data from an org to use in a scratch org. Just supply a list of SObjects and you should end up with a dataset and data plan that can be used with the official force:data:tree:import command
USAGE
$ sfdx-tohoom-plugin tohoom:data:export
OPTIONS
-b, --preserveobjectorder If present, uses the order of the objects from the command to
determine plan order
-e, --enforcereferences If present, missing child reference cause the record to be deleted,
otherwise, just the reference field is removed
-k, --tohoom Special Tohoom processing to handle self referential relationship
-m, --maxrecords=maxrecords [default: 10] Max number of records to return in any query
-n, --planname=planname [default: new-data-plan] name of the data plan to produce, deflaults
to "new-plan"
-o, --objects=objects (required) Comma separated list of objects to fetch
-p, --spiderreferences Include refereced SObjects determined by schema examination and
existing data
-s, --savedescribes Save describe results (for diagnostics)
-t, --targetdir=targetdir (required) target directoy to place results in
-u, --targetusername=targetusername username or alias for the target org; overrides default target org
--apiversion=apiversion override the api version used for api requests made by this command
--json format output as json
--loglevel=(trace|debug|info|warn|error|fatal) logging level for this command invocation
EXAMPLE
$ sfdx tohoom:data:export -o Account,Contact,Case,Opportunity -t data/exported -n my-testplan
See code: src/commands/tohoom/data/export.ts