Command Line Options
If you installed to the default location, SNU will be located in C:\ProgramData\STR\SuperCHANNEL\bin
To run SNU, open a command prompt and change to this directory, then use the following command:
snu <options> <project>
Replace <options>
with one or more of the options listed in the table below.
Replace <project>
with the name of the XML project file (including the file extension). If the project file is not in the current working directory then you must specify the full path. If there are any spaces in the project filename then it must be enclosed in double quotes.
For example:
snu -create -insert -sp D:\SuperCHANNEL\MyProject.xml
For more examples of command lines to run SNU, see Examples. Or see the table below for a full list of all the available options.
Parameter | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
-create | Create fact tables in the target database for all tables specified in the project file. The target SXV4 database (if it exists) is destroyed first, and SNU creates a new file. | ||||||||
-create+ | Create fact tables in the target database for all tables specified in the project file. SNU will append the new table(s) to an existing target SXV4 database (when you add the + option, this command is equivalent to the Resume option in the SuperCHANNEL GUI). | ||||||||
-create:<table> | Create fact tables in the target database for the specified table(s) only (you can add this option multiple times to specify multiple tables). | ||||||||
-insert | Inserts all rows in source tables to target tables. | ||||||||
-insert+ | Inserts all rows in source tables to target tables. When + is specified, SNU will attempt to resume the build from a previously failed build. | ||||||||
-insert:<table> | Insert all rows for the specified table(s) only (you can add this option multiple times to specify multiple tables). | ||||||||
-sample:<number_rows> | The number of rows to include when building the database. This option is designed to allow you to test your configuration without having to build the entire SXV4. It is particularly useful if you have a very large source database. You can configure SuperCHANNEL to run a partial build with just a small number of rows to check that you are happy with the output. Once you are satisfied with the design of the SXV4 you can turn off the partial build and build the entire database. To use this option you must also set either This option is equivalent to the Partial Build option in the Target Attributes in the SuperCHANNEL GUI. If the option has been selected in the GUI and is therefore specified in the project file, then that setting takes precedence. Any value you set on the command line will be ignored if there is already a sample size specified in the project file. | ||||||||
-errors:<number_actions> | Stop channelling after encountering the specified number of cleansing actions ( This option is equivalent to the Stop on Error option under Cleansing Actions in the Target Attributes in the SuperCHANNEL GUI. If the option has been selected in the GUI and is therefore specified in the project file, then that setting takes precedence. Any value you set on the command line will be ignored if there is already a maximum number of cleansing actions specified in the project file. | ||||||||
-update | For all rows in the database, perform a searched update where the primary key in the target database is equal. If the primary key does not exist in the target, insert a new row in the target database. | ||||||||
-update:<table> | Perform a searched update for the specified table(s) only (you can add this option multiple times to specify multiple tables). | ||||||||
-delete:<table>:<column> | For all rows in the source database, perform a searched delete where the value in the specified column in the source database is equal to the column in the target database. This operation is usually applied to the top-level fact table which results in a cascading delete of related rows in child tables. | ||||||||
-scan | Scan all of the columns in the source database to see if they contain valid values. If any invalid values are encountered the build stops after the scan phase. Scan is applied to any table values that are inserted, updated or deleted. | ||||||||
-sp | Instruct SNU to prompt you to enter the password for the source database. | ||||||||
-sp:<password> | Set the password for connecting to the source database. | ||||||||
-tp | Instruct SNU to prompt you for the password for the target database. | ||||||||
-tp:<password> | Set the password for connecting to the target database. | ||||||||
-su:<user> | Set the username for connecting to the source database. If a source database username is specified in the project file then that value takes precedence. | ||||||||
-tu:<user> | Set the username for connecting to the target database. If a target database username is specified in the project file then that value takes precedence. | ||||||||
-source:<location> | Set the location of the source database. This option cannot be used in conjunction with a project file. If specifying the source location you must also specify the target location using the If you are connecting to a RDBMS, then the source database location is the full connection string, enclosed in double quotes. Some examples for different source types are shown below. SQL ServerThe following example connects to the SQL Server database running on
TDDThe following examples connects to a directory of TDD files located at D:\Source\MyTDD.
| ||||||||
-target:<location> | Set the location of the target database. In most cases this will be the location on disk of a SXV4 file. For example, the following target creates or updates an SXV4 file located at D:\Databases\RetailBanking.sxv4
As shown here:
This option cannot be used in conjunction with a project file. If specifying the target location you must also specify the source location using the | ||||||||
-ss:<schema> or -sourceschema:<schema> | The schema for the source database (if applicable). This option is only for use in conjunction with the | ||||||||
-ts:<schema> or -targetschema:<schema> | The schema for the target database (if applicable). This option is only for use in conjunction with the | ||||||||
-cleanaction:<add|stop|skip|none> | Set the cleansing action that will be used for all foreign key references:
This parameter will override any existing configuration defined in the project file. The action specified here will be used for all columns regardless of the individual column settings in the project file. | ||||||||
-version | Display SNU version information and exit. Cannot be used in conjunction with any other parameters. | ||||||||
-silent | Hides the following from the output:
| ||||||||
-suppress | Hide information about matching errors from the output. For example, using this option will hide messages such as the following from the error log:
CODE
| ||||||||
-auto | Automatically sets all fact table columns of string type to classifications and all fact table columns of numeric type to measures. This option is only for use in conjunction with the | ||||||||
-format:<lowercase|uppercase|heading> | Apply capitalisation to the table and column labels in the target database:
This parameter will override any existing capitalisation set in the project file. | ||||||||
-help | Display help information. Cannot be used in conjunction with any other parameters. |
Comparison Between Options in the SuperCHANNEL GUI and SNU
SuperCHANNEL GUI Option | Equivalent Command Line Options |
---|---|
Build All | -create -insert |
Update All | -update -insert |
Resume All | -create+ -insert+ |
Build (selected table) | -create:<table> -insert:<table> |
Update (selected table) | -update:<table> -insert:<table> |
Revise (selected table) | -delete:<table>:<column> -insert:<table> |
Resume (selected table) | -create+:<table> -insert+:<table> |