Command Line Deployments

The Ajilius command line performs automated deployment tasks that make it easy to migrate data warehouses from development to production, through as many intermediate environments as required.

Command line deployments are similar to command line scheduling.

Here is a sample command line:

  • The section highlighted in blue must be present to start a Java program.
  • The orange section beginning with -w tells Ajilius which data warehouse you wish to deploy. This is the same name as shown on your Data Warehouses list screen.
  • The green section comprises one or more parameterised commands. This tells Ajilius the deployment steps to be carried out.

Deployment Scenarios

Ajilius supports three basic deployment scenarios:

  1. Multiple environments run from one instance of Ajilius
  2. Multiple environments run from multiple instances of Ajilius
  3. Combinations of (1) and (2).

One Ajilius, many environments

This model is common for smaller teams, where the team has control over all its environments.

One Ajilius server hosts the metadata and processing for multiple environments. These environments might be on one database server, or many.

Use the Warehouse Migrate feature to copy data warehouse metadata from one environment to the next. For example, assuming that you started in a development environment, your migration process might be:

  • Development -> Test
  • Test -> Production

When you migrate to environments other than Development, remember to adjust the credentials for the new environment, particularly for your data sources. Alternatively, erase these credentials (see the CLEAN command, below) and use an environment settings script (see the ENV command, below) to manage credentials by environment

You can process multiple deployments in parallel, by running the command line in different windows and/or sessions, depending on your operating system.

Many Ajilius, many environments

This deployment model is common for larger teams, where the team may not have access to environments other than Development, and other teams are responsible for deployment across environments.

Remember, Ajilius is site-licensed, so there is no license penalty for deploying under this model if required by your operational environment.

The setup of this deployment model is a little more complex.

  • Install Ajilius on each server.
  • On the DEVELOPMENT server, create your data warehouse with a name that is not specific to the environment.
  • Copy the ajilius/metadata folder from your DEVELOPMENT server to the other servers. This will establish the baseline environment.
  • Establish environment settings on each target server.

For each deployment from one environment to another:

  • Copy the metadata file from the source environment. Assuming a data warehouse named ChinookDW on a Windows platform, the metadata file would be named c:\ajilius\metadata\ChinookDW.sqlite
  • Paste the metadata file you have copied to the same location on the target server, overwriting any previous copy.
  • Update the environment settings where necessary.
  • Use the command line commands and options, below, to process the new deployment.

Command Line Parameters

Deployments are driven by the -deploy command line parameter. There is no short form for this parameter, or for its commands.

The -deploy parameter may be followed by one or more command options. For example, the following command may be used to erase all credentials from the ChinookDemo metadata database:

java -jar ajilius.jar -w ChinookDemo -deploy clear

Command options will be executed in the order they appear following the -deploy parameter. The following command will import a previous metadata state, perform an incremental deployment, then export the new metadata state to disk:

java -jar ajilius.jar -w ChinookDemo -deploy import alter export

The parameters and commands which are recognised by Ajilius command line deployments are:



Erase data source credentials prior to deployment. Data warehouse processing that is run from the command line uses environment variables to manage credentials. Clearing credentials helps to avoid accidental connections to dev/test data sources from a production environment.

This option may also be used to erase credentials if you want to share your metadata with us when requesting support.


Create the first deployment to a new data warehouse.

The data warehouse schemas will be created, and all tables created.

Do not run this command against a data warehouse you wish to retain, as all data will be lost, and it will be over-written with a new deployment.


Create an environment file which may be used as a template to set credentials for the current deployment.

An OS-suitable batch/shell file will be written to the ajilius/scripts folder, named <dwname>_env.bat (Windows), and <dwname> (Linux and OSX).

Edit this file to update the environment’s credentials.


Run an incremental deployment to the data warehouse. Tables which have had their metadata changed will be redeployed, unchanged tables will not be altered.

Redeploying transient tables (load and stage) will drop and create the table. Data in these tables is local to a batch, and will be lost during the recreation.

Persistent tables (persistent stage, dimension, fact) will retain their data during the deployment process.


Import the most recently deployed state of a data warehouse.

As metadata is deployed through environments its deployed state is updated for each environment.

Importing a previous deployment state resets the metadata for deployment against a new environment.


Export the most recently deployed state of tables and columns to disk.

The deployment state will be written to the ajilius/metadata folder on the Ajilius server.

Given a data warehouse named DW, the deployment state will be written to the following files:

  • DW.dt (Tables)
  • DW.dc (Columns)

If these files already exist in the metadata folder, they will be overwritten.