Parameters for SmartMapper Tools

To use SmartMapper tools, you have to configure the commands with proper parameters.

The following table explains the parameters used in the tools:

Parameter Comment
-db

Specify the database connection.

The value of this parameter is either the database alias configured in the db.properties file, or a group of parameters used to connect to the database. If you do not use the database alias, the following database related parameters must be specified: type, driver, URL, username, and password.

For example:

-db mysql com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/test root admin

-f Specify the name and the path of the file where the data are stored.
-e Specify the name of the entity.
-r Specify the name of the relationship.
-c Specify a criterion to filter the entity instance or the relationship instance that you want to export. This parameter is optional.

When multiple filter criteria are provided, each of them is AND'ed if operator and value are specified using the where clause. Conditions are OR'ed together if operator and value are specified using the orWhere clause.

A filter criterion consists of three parts, which are separated by commas (,). The first part is the filter condition, where or orWhere; the second part is the entity’s field name, or the participant name and the corresponding field name separated by a dot (.); the third part is the value of the field.

Use semicolon (;) to separate multiple filter criteria.

Note: When adding two filters and each filter is a different participant, the filters are only combined as OR; and if one filter is a participant and the other filter is a createTimestamp, the two filters are also only combined as OR.
Note: When adding filters for timestamps, the filter names must only be createTimestamp or updateTimestamp.

For example:

-c "where, createTimestamp,>=2013-09-10; where, createTimestamp,<=2014-05-15"

For example:

Filter entity data:

-c "where,key1,like’%1%’;where,key1,!=’a21’"

Filter relationship data:

-c "where,A.key1,=’a11’;orWhere,C.key1,=’c1’"

Note: This parameter is used only in Bulk Extract tool.
-ermodel Specify the SmartMapper ER Model.

The value of this parameter is the path of the ER Model file, which is detailed to the SmartMapper ER Model name.

For example:

upgrade -db mysql -ermodel c:\SmartMapperERModel.smartmapperermodel

Note: This parameter is used only in Database Upgrade Tool.
-src Specify the source SmartMapper ER Model.

The value of this parameter is either the database alias configured in the db.properties file, or a group of parameters used to connect to the database. If you do not use the database alias, the following database related parameters must be specified: type, driver, URL, username, and password.

Note: This parameter is used in Migration Tool and Differencing Tool.
-dest Specify the destination SmartMapper ER Model.

The value of this parameter is either the database alias configured in the db.properties file, or a group of parameters used to connect to the database. If you do not use the database alias, the following database related parameters must be specified: type, driver, URL, username, and password.

Note: This parameter is used only in Migration Tool and Differencing Tool.
When using the Differencing Tool, the following parameters are combined with -src and -dest parameters.
db Specify a database in which the SmartMapper ER Model is to be compared.

The value of this parameter is either the database alias configured in the db.properties file, or a group of parameters used to connect to the database. If you do not use the database alias, the following database related parameters must be specified: type, driver, URL, username, and password.

For example:

diff -src mysql com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/test root admin

ear Specify an Enterprise Archive (EAR) file in which the SmartMapper ER Model is to be compared.

The value of this parameter consists of two parts that are separated by an exclamation mark (!). The first part is the path of the EAR file; the second part is the folder where the specified SmartMapper ER Model is located, which is detailed to the SmartMapper ER Model name.

Note: If the file name or the file path contains spaces, enclose the value in the quotation marks ("").
Note: On Linux and Mac OS, add backslashes (\) before exclamation points (!) to separate EAR file directory from ER Model file in this command.

For example:

diff -src file c:/test.smartmapperermodel -dest ear c:/test.ear!test.jar!Resources/project/SmartMapperERModel.smartmapperermodel

jar Specify a Java ARchive (JAR) file in which the SmartMapper ER Model to be compared.

The value of this parameter consists of two parts that are separated by an exclamation mark (!). The first part is the path of the JAR file; the second part is the folder where the specified SmartMapper ER Model is located, which is detailed to the SmartMapper ER Model name.

Note: On Linux and Mac OS, add backslashes (\) before exclamation points (!) to separate JAR file directory from ER Model file in this command.

For example:

diff -src jar c:/test.jar!Resources/project/SmartMapperERModel.smartmapperermodel -dest file c:/SmartMapperERModel.smartmapperermodel

file Specify a SmartMapper ER Model file to be compared.

The value of this parameter is the path of the SmartMapper ER Model file, which is detailed to the SmartMapper ER Model name.

Note: If the file name or the file path contains spaces, enclose the value in the quotation marks ("").

For example:

diff -src file c:/test.smartmapperermodel -dest ear c:/test.ear!test.jar!Resources/project/SmartMapperERModel.smartmapperermodel