Subsetting command-line reference - run
Published 14 March 2025
Runs the subsetter, subsetting from a source database to a target database.
rgsubset run --database-engine SqlServer --source-connection-string "[source connection string]" --target-connection-string "[target connection string]"
Option | Required? | Notes |
---|---|---|
--database-engine | The type of the database to classify. Must be one of:
| |
--source-connection-string | The connection string of the database to subset. Can also be set via a | |
--target-connection-string | The connection string of the database to copy the subset to. Can also be set via a | |
--options-file | The file path to an options file. | |
--target-database-write-mode | Whether to fail or remove the rows if data is present in the target database. Can be one of:
| |
--dry-run | Perform a dry-run with no subsetting. This is a 'validation only' option that allows you to ensure your subsetting command line parameters and options file are configured correctly without modifying the database. If issues are found, they are sent to STDOUT in a JSON structure. This gives you specific information about the issues, and helps you identify and fix any problems before they arise. | |
--force | Forces subsetting to run, ignoring certain validation errors that warn about unexpected results. The validation the that runs before subsetting starts ensures subsetting is likely to succeed. However, some databases can trigger validation errors that subsetting could successfully work on. This option allows certain validation errors to be ignored, allowing subsetting to start:
Subsetting with no foreign keys in the source database is unlikely to do what is desired, but can still produce a subsetted database. Subsetting with some schema differences between the source and target database can succeed, but it is not always the case. If this option is used and subsetting then fails, it may be that the database is not in a state that can be successfully subsetted. | |
--output-file | The file to save a summary of what has been subsetted to. | |
--output | The format to use for the output file. Can be one of:
| |
| The verbosity level to log at.
| |
| The location of the log file, or | |
| Show help and usage information. |