Help and Support > Table of Contents > Running from the command line

Running Datamartist from the command line.

In order to enable automation, the Datamartist tool can also be used without the user interface. To do this, you simply use the command line (or a batch file which you can schedule) to specify which Datamartist DMC file you want to load and run, and where you want to have the log file generated created. To do this you use the "RUN" command when running the Datamartist executable.

Command line parameters for Datamartist:

  • /f The full path and name of the Datamartist DMC file.
  • /p The full path and name of the Datamartist password file if needed (this is an .XML file generated by Datamartist).
  • /l The full path to the folder where you want the log file to be written.

For example, if you had a DMC file c:\test\Test.DMC that did not require any passwords, you would run Datamartist like this:

c:\program files\nModal Solutions Inc\Datamartist\Datamartist.exe run /f c:\test\Test.DMC /l c:\test\

When you run this, datamartist will run, with all data, writing to outputs and will report the results, and how many rows were written to each output in the log file generated. The log file name will reference the DMC file name, and have a time stamp for the run time. For example;

And inside the file you will find;

Datamartist V1.2.0 2/8/2010 4:23:17 PM
Loading Password file:c:\test\TestPwd.xml 2/8/2010 4:23:17 PM
Loading:c:\test\Test.DMC 2/8/2010 4:23:17 PM
Loaded:2/8/2010 4:23:18 PM
Init Blocks: 2/8/2010 4:23:18 PM
Run Canvas: 2/8/2010 4:23:18 PM
Run Duration: 00:00:24.2968750
No block errors or warnings.
Block [TestOutputText.txt] wrote 108528 rows to C:\test\TestOutputText.txt
Block [xe TestOracleTableWrite] wrote 1313 rows to DB:localhost:1521/xe Table:TestOracleTableWrite

Password files and running datamartist

For security reasons, Datamartist does not store passwords in the DMC files. When you open a DMC file, you will be prompted for any passwords to data sources used in the file. If you are running the DMC from the command line, then you still need to provide these passwords.
Datamartist does this by using an xml file that contains the necessary passwords. Be very careful to protect this file- the passwords are stored inside without any encryption. However, because this is a separate file, it can be kept in a secure directory on the server running it.
The location of the file is specified by the /p parameter, and the file itself is generated by Datamartist. To generate a password XML file, select Tools then Export password file. run-from-cmd-line-generate-pwd-file (63K)

This will generate an .XML file that you can then use to run the data canvas automatically. Again, because this file contains the passwords for any database connections, it needs to be guarded carefully.

Specifying the pasword file with /p

To specify the password file, add a /p parameter- the following example illustrates how this is done;

c:\program files\nModal Solutions Inc\Datamartist\Datamartist.exe run /f c:\test\Test.DMC /l c:\test\ /p c:\test\passwordfile.xml