import option for the imam command

Use the import option to create a new import area by running an express import. You can use the import option when you use the imam command with the --action parameter.

Purpose

When you run the imam command with the import option, it creates a new import and invokes the import bridge or connector that you specify when you create a parameters file.

The imported metadata is automatically shared to the metadata repository unless there are errors or unless your import settings require preview. If there are errors, the imported metadata appears as a 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 staged import before it is shared to the metadata repository.

You must have the Common Metadata Importer role.

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 import 
--importArea import_area_name --paramsFile parameter_file_path [--replaceParams param_name=param_value]
--misName metadata_interchange_server_name [--localFile local_file_path]
[--dcAuthFile data_connection_credentials_file_path]
[--dcUser data_connection_user][--dcPassword data_connection_password]
[--importDescription description_of_import]
[--areaDescription description_of_import_area]
[--username username] [--password password][--authfile credentials_file_path]
[--server server_name] [--port port_number] [--force] [--help] [--silent]  [--log][--saveDcPassword] 

Parameters

Commands that use the import option can use the following parameters.

Table 1. Parameters that are used with the import option.
Parameter name Description
--action or -a

Required.

Specify the import option.

--importArea or -i

Required.

The name of the import area that you want to create. The parameters for the import area are specified in the parameters file. If the import area name contains blank spaces, you must put quotation marks around the blank spaces. If the name of the import area 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.

--paramsFile or -pf

Required.

The name and location of the parameter file. For example, C:\Files\parameters_file.xml.

--replaceParams or -rp

Optional.

Change one or more of the parameter values that is specified in the params.xml file. This command allows you to use the command line to update the parameters instead of having to update the file manually and reimport it.

Specify parameters that you want to replace in a comma-separated list in the following format:
parameter_name=parameter_value,parameter_name=parameter_value,parameter_name=parameter_value
Use the plus sign (+) as an escape character for the comma (,) equal (=), and plus sign (+) characters. For example, to replace a host name parameter with the host name production,=A, specify production+,+=A.
--misName or -mn

Required.

The name of the metadata interchange server that you want to use for the import.

--localFile or -l

Optional.

The path to an import file on the local computer.

The --localFile parameter name 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 them in the parameters file or 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:
  • In the parameters file
  • By specifying --dcAuthFile

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.

If you specified the data connection user name in the parameters file, you must not specify it on the command-line interface or you will receive an error message.

--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:
  • In the parameters file
  • By specifying --dcAuthFile

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.

If you specified the data connection password in the parameters file, you must not specify it on the command-line interface or you will receive an error message.

By default, passwords are saved. This default setting is controlled on the Import Settings page of the Administration tab of InfoSphere Metadata Asset Manager.

--importDescription or -id

Optional.

A description of the import. The description is displayed on the Staged Imports tab in InfoSphere Metadata Asset Manager.

--areaDescription or -ad

Optional.

A description of the import area. The description is displayed on the Import tab in 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.

--force or -f

Optional.

By default, the command-line interface checks the version of InfoSphere Metadata Asset Manager and the bridge version. If it finds a mismatch, the import is cancelled.

When you use a parameters file that was created in an earlier version, you can use the --force option to skip this check if the bridge parameters in the parameters file have not changed since the previous release.

If the bridge parameters have changed since the previous release, do not skip the version check. Instead, generate a new parameters file by using InfoSphere Metadata Asset Manager. Then, import the metadata from the command line. When you enter the import command, specify the new parameters file.

--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.

--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.

Import examples

The following import command creates the import area area57 and uses the parameters file ErwinData1_parameters.xml to import metadata into InfoSphere Metadata Asset Manager.
imam -i area57 --paramsFile C:\Files\ErwinData1_parameters.xml --action import
 --areaDescription Erwin files --importDescription initial import --misName
 Default --username isadmin --password mypassword
The following import command creates the import area "Department" and uses the parameters file MyData.xml to import metadata into InfoSphere Metadata Asset Manager. The name of the import area contains quotation marks, so backslash characters (\) are included before each of the quotation marks.
 imam -i \"Department\" --paramsFile C:\Files\MyData.xml --action import --areaDescription Department names --importDescription initial import --misName Default --username isadmin  
The following import command creates the import area "Sales_Data" and uses the parameters file parameters.xml to import metadata into InfoSphere Metadata Asset Manager. The command replaces the data connection parameter in the parameters.xml file with the data connection Connection100, the user name parameter with xmeta, the password parameter with xyz123, and the host name parameter with production,build=March.
imam -action import -i Sales_Data --paramsFile "C:\MyData\MyFiles parameters.xml" --areaDescription SalesDataFeb --importDescription update --misName Default --force --username isadmin --password isadmin --replaceParams "dcName_=Connection100,Username=xmeta,Password=xyz123,AP_Host system name=production+,build+=March"