The Administration Utility can execute a series of commands from a script file. This is useful if you want to automate or standardize administrative actions through the use of a script instead of manually executing commands through the Administration Utility or by using the Management Console.
To add a command to a script file, type the command and the necessary parameters as you would if you were entering the command at the command prompt. Enter one command per line.
To insert comments into a script file, use the following notation:
|To execute the script at the command line||
Specify the following at the command line or in a batch or shell script:
cli.cmd --cmdfile ScriptFile
|To execute the script form the Administration Utility||Open the Administration Utility and connect to the Spectrum™ Technology Platform server using the connect command. Then, use the script command to execute the script. For more information on this command, see script.|
You have three dataflows: Deduplication, AddressValidation, and DrivingDirections. You have a staging server where you make changes to these dataflows and test them, and a production environment where the dataflows are made available for execution. You want to have a consistent and automated way to move these dataflows from your staging server to your production server so you decide to use an Administration Utility script to accomplish this. The script might look like this:
// Connect to the staging server connect --h stagingserver:8080 --u allan12 --p something123 // Export from staging dataflow export --d "Deduplication" --e true --o exported dataflow export --d "AddressValidation" --e true --o exported dataflow export --d "DrivingDirections" --e true --o exported // Close connection to the staging server close // Connect to the production server connect --h productionserver:8080 --u allan12 --p something123 // Import to production dataflow import --f exported\Deduplication.df dataflow import --f exported\AddressValidation.df dataflow import --f exported\DrivingDirections.df // Close the connection to the production server close