Script Command
Scanner.sh is the script command that you can run to view a list of resource types along with the list of available options. You can run the script along with the options and arguments in a sequence to extract metadata from inaccessible sources and offline sources and publish it to the catalog.
The scanner.sh command uses the following syntax:
scanner.sh
version
generateResourceConfig (-resourceType <resource_type>) (-output <path>) [-v]
encryptPassword (<password>)
validate (-rcf <resource_config_file>) [-v]
scan (-rcf <resource_config_file>) (-output <path>) [-v]
cancel (-rn <resource_name>) (-output <path>) [-v]
pause (-rn <resource_name>) (-output <path>) [-v]
resume (-rcf <resource_config_file>) (-output <path>) [-v]
describeArchive (-arf <path_to_archive_file>) [-v]
publishArchive (-un <isp_user>) (-pd <isp_user_password>) (-sd <isp_security_domain>) (-dh <isp_gateway_host>) (-dp <isp_domain_port>) (-dn <fully_qualified_domain_name>) (-sn <catalog_service_name>) [-dse] [-ts <path_to_truststore>] [-tsp <trust_store_password>] (-rn <resource_name>) (-arf <path_to_archive_file>) [-f] [-w] [-v] (-csh <catalog_service_hostname>) (-csp <catalog_service_port>)
The following table describes scanner.sh options and arguments:
Option | Argument | Description |
---|
version | - | Optional. Prints the CLI version number. |
generateResourceConfig | (-resourceType <resource_type>) (-output <path>) [-v] | Required. Generates a template of the resource configuration file. |
encryptPassword | (<password>) | Required. Prints the encrypted password. |
validate | (-rcf <resource_config_file>) [-v] | Required. Reads and prints the resource configuration file to the console and establishes a connection to the source. |
scan | (-rcf <resource_config_file>) (-output <path>) [-v] | Required. Prints the job status to the console at regular intervals. |
cancel | (-rn <resource_name>) (-output <path>) [-v] | Optional. Cancels the resource scan. |
pause | (-rn <resource_name>) (-output <path>) [-v] | Optional. Pauses a resource scan. |
resume | (-rcf <resource_config_file>) (-output <path>) [-v] | Optional. Resumes a paused resource scan. |
describeArchive | (-arf <path_to_archive_file>) [-v] | Required. Validates the checksum of the metadata archive file. |
publishArchive | (-un <isp_user>) (-pd <isp_user_password>) (-sd <isp_security_domain>) (-dh <isp_gateway_host>) (-dp <isp_domain_port>) (-dn <fully_qualified_domain_name>) (-sn <catalog_service_name>) [-dse] [-ts <path_to_truststore>] [-tsp <trust_store_password>] (-rn <resource_name>) (-arf <path_to_archive_file>) [-f] [-w] [-v] (-csh <catalog_service_hostname>) (-csp <catalog_service_port>) | Required. Publishes the metadata to Enterprise Data Catalog. |
Note: The exit code for the script is 0 for Success and -1 for Fatal Error.
generateResourceConfig
Generates a resource configuration file template based on the resource type. The template includes all the scanner options that apply to the selected scanner.
The scanner.sh generateResourceConfig command uses the following syntax:
scanner.sh generateResourceConfig
-resourceType <resourceType>
-output <path>
-v
The following table describes scanner.sh generateResourceConfig options and arguments:
Option | Argument | Description |
---|
-resourceType | resourceType | Required. Enter a resource type in the following naming convention: <ResourceType> For example, Oracle, MSSqlServer, or Teradata. Note: For the SAP S/4HANA resource, specify SAPERP6 as the resource type. |
-output | path | Required. Path to the output directory where the resource configuration file is generated. For example, you want to generate the scanner configuration file in the $HOME/resources location. Enter the path as $HOME/resources. Note: A [Y/N] prompt appears if the target file already exists. Select Y if you want to overwrite the file. |
-v | - | Optional. Displays information in verbose mode. Verbose mode provides detailed information about object versions, including repository name, folder name, version number, and status. |
Troubleshooting
- What are the errors that might appear when I run the generateResourceConfig command. How do I resolve it?
- The following list consists of potential errors with recommended actions to resolve it:
- - The template for the scanner does not exist. Contact Enterprise Data Catalog administrator for more information.
- - You do not have appropriate file permissions for the output file. Contact Enterprise Data Catalog administrator to assign the necessary permissions.
encryptPassword
Prints the encrypted password to the console. The encrypted password in the resource configuration file is used for other commands.
The scanner.sh encryptPassword command uses the following syntax:
scanner.sh
encryptPassword (<password>)
In the scanner.sh encryptPassword (<password>) command, enter the password and run the command.
validate
When you run the scanner. sh validate command, the command performs the following tasks:
- 1. Decrypts the password, and tests whether the connection to the data source is valid or not. If the test connection fails, the script stops to run and an error appears.
- 2. When the test connection is successful, the command reads the resource configuration file and prints the file contents to the console.
- 3. After the command displays the content, it establishes a connection to the data source.
The scanner.sh validate command uses the following syntax:
scanner.sh validate
-rcf <resource_config_file>
-v
The following table describes scanner.sh validate options and arguments:
Option | Argument | Description |
---|
-rcf | resource_config_file | Required. Enter the resource configuration file name. |
-v | - | Optional. Displays information in verbose mode. Verbose mode provides detailed information about object versions, including repository name, folder name, version number, and status. |
Troubleshooting
- What are the errors that might appear when I run the validate command or when the test connection fails. How do I resolve it?
- The following list consists of potential errors with recommended actions to resolve it:
- - Credentials are not valid. Verify that the credentials that you provide are correct.
- - Data source is not reachable. Check the connection details. If unresolved, contact the database administrator for more information.
- - Issues related to the data source. Contact database administrator for more information.
- - Password has not been encrypted. Run the scanner. sh encrypt Password (<password>) command to encrypt the password. Enter the encrypted password in the resource configuration file, if required. Run the scanner. sh validate (- rcf < resource_config_file >) [-v].
scan
When you run the scanner. sh scan command, the command performs the following tasks:
- 1. Runs the resource scan.
- 2. Prints the job status periodically on the console.
- 3. Creates an archive file titled Archive_$resourcename_$version.zip for the extracted metadata.
- 4. Saves the archive file in the output folder. The output folder is located in the path that you enter for the -output parameter in the scan command.
The scanner.sh scan command uses the following syntax:
scanner.sh scan
-rcf <resource_config_file>
-output <path>
-v
The following table describes scanner.sh scan options and arguments:
Option | Argument | Description |
---|
-rcf | resource_config_file | Required. Enter the resource configuration file name. |
-output | path | Required. Path to the output directory where the metadata archive file is generated. For example, you want to generate the metadata archive file in the $HOME/resources location. Enter the path as $HOME/resources. |
-v | - | Optional. Displays information in verbose mode. Verbose mode provides detailed information about object versions, including repository name, folder name, version number, and status. |
Troubleshooting
- What are the errors that might appear when I run the scan command. How do I resolve it?
- The following list consists of potential errors with recommended actions to resolve it:
- - Insufficient disk space to save the metadata archive file. Increase the disk space and run the command.
- - Cannot connect to the data source. Check the connection details. If unresolved, contact the database administrator for more information.
- - Credentials are not valid. Verify that the credentials that you provided are correct.
Note: If you can cancel the scan, the metadata archive file will not be created. For more information about the errors, see the log files.
cancel
Cancels the resource scan if the scan is in progress and does not create the metadata archive file.
The scanner.sh cancel command uses the following syntax:
scanner.sh cancel
-rn <resource_name>
-output <path>
-v
The following table describes scanner.sh cancel options and arguments:
Option | Argument | Description |
---|
-rn | resource_name | Required. Enter the resource name. |
-output | path | Required. Path to the output directory where the metadata archive file is generated. For example, you want to generate the metadata archive file in the $HOME/resources location. Enter the path as $HOME/resources. |
-v | - | Optional. Displays information in verbose mode. Verbose mode provides detailed information about object versions, including repository name, folder name, version number, and status. |
pause
Pauses the resource run and does not create the metadata archive file. The command retains the input and output directories.
The scanner.sh pause command uses the following syntax:
scanner.sh pause
-rn <resource_name>
-output <path>
-v
The following table describes scanner.sh pause options and arguments:
Option | Argument | Description |
---|
-rn | resource_name | Required. Enter the resource name. |
-output | path | Required. Path to the output directory where the metadata archive file is generated. For example, you want to generate the metadata archive file in the $HOME/resources location. Enter the path as $HOME/resources. |
-v | - | Optional. Displays information in verbose mode. Verbose mode provides detailed information about object versions, including repository name, folder name, version number, and status. |
Troubleshooting
- What are the errors that might appear when I run the pause command. How do I resolve it?
- The following list consists of potential errors with recommended actions to resolve it:
- - Resource run is not in progress. No action required.
resume
When you run the scanner. sh resume command, the scanner resumes the paused resource scan. Afer the resource run completes, the command creates and saves the metadata archive file.
The scanner.sh resume command uses the following syntax:
scanner.sh resume
-rcf <resource_config_file>
-output <path>
-v
The following table describes scanner.sh resume options and arguments:
Option | Argument | Description |
---|
-rcf | resource_config_file | Required. Enter the resource configuration file name. |
-output | path | Required. Path to the output directory where the metadata archive file is generated. For example, you want to generate the metadata archive file in the $HOME/resources location. Enter the path as $HOME/resources. |
-v | - | Optional. Displays information in verbose mode. Verbose mode provides detailed information about object versions, including repository name, folder name, version number, and status. |
Troubleshooting
- What are the errors that might appear when I run the resume command. How do I resolve it?
- The following list consists of potential errors with recommended actions to resolve it:
- - Resource run is in progress. No action required.
- - Resource run cannot be resumed due to unavoidable circumstances. To mitigate the issue, you can contact the catalog administrator.
describeArchive
When you run the scanner. sh describeArchive command, the command performs the following tasks:
- 1. Validates the checksum of the metadata archive file.
- 2. Prints the CLI version, resource configuration details, and timestamp on the console.
- 3. Displays scan summary that includes scan statistics.
The scanner.sh describeArchive command uses the following syntax:
scanner.sh describeArchive
-arf <path_to_archive_file>
-v
The following table describes scanner.sh describeArchive options and arguments:
Option | Argument | Description |
---|
-arf | resource_config_file | Required. Enter the path to the metadata archive file. |
-v | - | Optional. Displays information in verbose mode. Verbose mode provides detailed information about object versions, including repository name, folder name, version number, and status. |
publishArchive
When you run the scanner.sh publlishArchive command, the command performs the following tasks:
- 1. Validates the user name and password of the catalog administrator, and gets the API key or authorization token for next API calls.
- 2. Validates the checksum of the input file.
- 3. Ensures that the Enterprise Data Catalog version is the same or newer than the offline scanner version.
- 4. Verifies that the resource configuration version and the Enterprise Data Catalog version are compatible.
- 5. If required, creates a resource in Enterprise Data Catalog.
- 6. Verifies that the following are identical in the resource and resource configuration file:
- a. Resource configuration
- b. Resource type and name
- 7. Ingests the Exchange Documents into the catalog.
You can view the progress of the tasks on the console that include:
- 1. Connection to domain and Enterprise Data Catalog.
- 2. Creates a resource configuration file or updates the resource configuration file.
- 3. File upload.
- 4. Ingestion job scan.
- 5. Start time and end time.
- 6. Monitoring URL.
The scanner.sh publishArchive command uses the following syntax:
scanner.sh publishArchive
-un <isp_user>
-pd <isp_user_password>
-sd <isp_security_domain>
-dh <isp_gateway_host>
-dp <isp_domain_port>
-dn <fully_qualified_domain_name>
-sn <catalog_service_name>
[-dse]
[-sse]
[-ts <path_to_truststore>]
[-tsp <trust_store_password>]
-rn <resource_name>
-arf <path_to_archive_file>
[-f]
[-w]
[-v]
-csh <catalog_service_hostname>
-csp <catalog_service_port>
The following table describes scanner.sh publishArchive options and arguments:
Option | Argument | Description |
---|
-un | isp_user | Required. Enter the user name of the catalog administrator. |
-pd | isp_user_password | Required. Enter the encrypted password for the administrator. |
-sd | isp_security_domain | Required. Enter Native or LDAP as the security domain to log in to Enterprise Data Catalog. |
-dh | isp_gateway_host | Required. Enter the gateway host name for the domain. |
-dp | isp_domain_port | Required. Enter the port number of the gateway node. |
-dn | fully_qualified_domain_name | Required. Enter the Informatica node name. |
-sn | catalog_service_name | Required. Enter the Catalog Service name. |
-dse | <true|false> | Optional. Specify true to enable SSL domain. Default is False. |
-ts | path_to_truststore | Optional. Enter the path and file name of the truststore file that contains authentication certificates trusted by the Data Integration Service. Note: This field is required if you choose -dse as true. |
-tsp | trust_store_password | Optional. Enter the encrypted password for the truststore file. Note: This field is required if you choose -dse as true. |
-rn | resource_name | Required. Enter the resource name. |
-arf | path_to_archive_file | Required. Enter the path to the metadata archive file. |
-f | - | Optional. Updates or creates a resource in Enterprise Data Catalog. |
-w | - | Optional. Waits for the ingestion job to complete. |
-v | - | Optional. Displays information in verbose mode. Verbose mode provides detailed information about object versions, including repository name, folder name, version number, and status. |
-csh | catalog_service_hostname | Optional. Name of the host machine on which the Catalog Service runs. |
-csp | catalog_service_port | Optional. Port number of the Catalog Service. |
Troubleshooting
- What are the errors that might appear when I run the publishArchive command. How do I resolve it?
- The following list consists of potential errors with recommended actions to resolve it:
- - Resource configuration version and Exdocs are not compatible. Implement the required changes, run the commands, and then publish the archive file to the catalog.
- - Mismatch in resource type or resource name. Implement the required changes, run the commands, and then publish the archive file to the catalog.