reimport option of the imam command
You can use the reimport option to reimport the most recent staged import in an import area. You can use the reimport option when you use the imam command with the --action parameter.
Purpose
You can use the reimport option to quickly reimport import areas without using the InfoSphere® Metadata Asset Manager user interface.The express import is automatically shared to the metadata repository unless there are errors. If there are errors, the reimported metadata appears as a new staged import in the staging area, but is not shared with the metadata repository. Depending on your import settings, you might be required to preview the import before it is shared.
You must have the Common Metadata Administrator role, or you must be the Common Metadata Importer who created the import area.
Reconciling imports
When you first import into an import area and share the import to the metadata repository, the metadata is reconciled with existing metadata in the repository. If an imported asset has the same identity as another asset that already exists in the metadata repository, the two assets are merged. Merge rules are used to determine the specific behavior, depending on the object type. When you reimport into the same import area, the reimport logic assumes that you are importing the same basic source metadata. Any assets that were imported in the previous import but are not present in the reimport are assumed to have been deleted in the source. The missing assets are deleted from the metadata repository when the reimport is shared.
Syntax
imam --action reimport --importArea import_area_name
[--localFile local_file_path][--dcAuthFile data_connection_credentials_file_path]
[--dcUser data_connection_user][--dcPassword data_connection_password]
[--username username] [--password password][--authfile credentials_file_path]
[--server server_name] [--port port_number] [--help] [--silent] [--log] [--checkEventDiff] [--saveDcPassword]
Parameters
When you specify the long name of a parameter, you must type two dashes (--) before the parameter. For example, --action. When you specify the short name of a parameter, type only one dash (-). For example, -a.
Commands that use the reimport option can use the following parameters.
Parameter name (short name) | Description |
---|---|
--action or -a | Required. Use the reimport option. |
--importArea or -i | Required. Name of the import area in which the reimport runs. The reimport uses the parameters from the most recent import in the import area. If the import area name contains blank spaces, you must put quotation marks around the blank spaces. If the name contains quotation marks, you must enter a backslash character (\) before each of the quotation marks. For information about other characters that you must escape, see Escaping characters. |
--localFile or -l | Optional. The path to a local file to import. If you are reimporting a file that was previously imported on the local computer instead of the metadata interchange server, you must specify the –localFile. If the previous import was imported on the metadata interchange server, you can choose to use –localFile to reimport from the local computer. The --localFile option is case-sensitive, so you must use a capital "F" when you specify this option. |
--dcAuthFile or -dcaf | Optional. For connector imports. The path to a file that contains the encrypted or non-encrypted credentials to connect to the data source that you are importing from. Do not specify credentials in a file if you are specifying the --dcUser and --dcPassword options on the command line. The credentials in the data connection credentials file override any stored data connection credentials. This parameter is ignored if the data connection credentials are explicitly specified by using --dcUser and --dcPassword. For more information, see the topic Encrypt command and its subtopics. |
--dcUser or -dcu | Optional. Note: This parameter is required
if you want to import by using a connector and you did not specify
a password in one of the following ways:
For connector imports. The user name that the data connection uses to connect to the data source. The user name that you enter overrides any stored user name that was specified for connecting to the data source. If you use --dcUser, you must also specify --dcPassword. |
--dcPassword or -dcw | Optional. Note: This parameter is required
if you want to import by using a connector and you did not specify
a password in one of the following ways:
For connector imports. The password that is used by the data connection to connect to the data source. The password that you enter overrides any stored password that was specified for connecting to the data source. If you use --dcPassword, you must also specify --dcUser. By default, passwords are saved. This default setting is controlled on the Import Settings page of the Administration tab of InfoSphere Metadata Asset Manager. |
--authfile or -af | Optional. Path to a file that contains the encrypted or non-encrypted credentials for logging on to InfoSphere Information Server. If you use the --authfile parameter, you do not need to specify --username or --password on the command line. If you specify both the --authfile parameter and the explicit user name and password parameters, the explicit parameters take precedence over what is specified in the file. For more information, see the topic Encrypt command and its subtopics. |
--username or -u | Optional. User name that is required for logging in to InfoSphere Information Server. The user must have the role of Common Metadata Administrator or Common Metadata Importer. You can use the --authfile parameter instead of specifying the --username and --password parameters. If you enter a user name without entering a password, you are prompted for a password when you run the command. |
--password or -w | Optional. Password for the specified user name to log in to InfoSphere Information Server. You can use the --authfile parameter instead of specifying the --username and --password parameters. By default, passwords are saved. This default setting is controlled on the Import Settings page of the Administration tab of InfoSphere Metadata Asset Manager. |
--server or -s | Optional. Name of the services tier computer. If you specify a server, then you must specify a port. |
--port or -p | Optional. Port number to use on the services tier computer. The default HTTPS port is 9443. If you specify a port, you must specify a server. |
--silent or -sl | Optional. Suppresses prompts for credentials and SSL certificates. Use this parameter when you run scheduled or unattended sessions. When a prompt is suppressed, the action fails. To prevent such failures, provide credentials on the command line or in a credentials file, if necessary, and Run the UpdateSignerCerts command to retrieve the certificate before you schedule a command-line session. . |
--help or -h | Optional. If you use --help with other options, the other options are ignored. Prints the list of actions and parameters. The help command is automatically issued when you issue a command that contains a syntax error, such as a typographical error, an improperly cased parameter or argument, or when the command is missing a required parameter. |
--log or -lg | Optional. Prints runtime log messages to the console while you run the command line. You can use the log to debug issues that arise when you use InfoSphere Metadata Asset Manager. The log includes the details of the HTTPS call that is made to the server, and stack trace information for any exceptions that are thrown. |
--checkEventDiff or -ced | Optional. This option compares assets between current event and the previously shared event. If a previously shared event is not found, this option will be ignored. The assets in the shared repository are ignored for this comparison. The re-import event will stop, if all the assets are the same as previous event. If not, the re-import event will continue. |
--saveDcPassword or -sdc | Optional. The Import does not save DataConnection password by default. When you want to save the DataConnection password, you can use the --saveDcPassword option to save the DataConnection password. |
reimport examples
The following command reimports the most recent staged import in the import area area51 from the local computer.imam –-action reimport --importArea area51 --server 9.184.184.153 --port 9443
--localFile C:\data.xml --authfile C:\authfile.txt
imam -u isadmin -w password100 -s mds-qa1 -p 9443 -a reimport
-i \"Customer\"
imam -a reimport -i 'salary' -u admin1 -w password1
imam -a reimport -i "\"Department heads" -u admin1
-w password1 -s mds-qa1 -p 9443
imam -a reimport -i "\"test\" model" -u admin1
-w password -s mds-qa1 -p 9443
imam --action reimport -dcu db2admin -dcw db2admin100 --importArea db2import1
--server 9.184.184.153 --port 9443 -u isadmin -w isadmin
imam --action reimport --dcAuthFile C:\dcauthfile.txt --importArea db2import2
--server 9.184.184.153 --port 9443 -u isadmin -w isadmin
imam –-action reimport --importArea area001 --server 9.184.184.153 --port 9443
--localFile "C:\My Stuff\data.xml" --authfile "C:\My Files\ authfile.txt"
imam --action reimport -i tgt_sample --username isadmin --password isadmin --checkEventDiff