istool command line

istool comand line is available on the client and engine tiers.
you can import and export many types of assets,and you can query and delete command metadata.
Location of the istool command line:
For UNIX or Linux, the istool command framework is located in:installation_directory/Clients/istools/cli, where installation_directory is the directory where you installed InfoSphere Information Server. For example,/opt/IBM/InformationServer

$ pwd
/opt/IBM/InformationServer/Clients/istools/cli
./istool -h
istool Command [ Command_Options ] [ Options ]
Possible values for: Command
workbench query : Executes Metadata Workbench query
deletecm : Delete command set
query : Query command set
workbench extension mapping import : Imports Metadata Workbench Extension Mappings
workbench extension source delete : Deletes Metadata Workbench Extension Data Sources
– : Provide usage information.
help : Provide command-line help information.
: Istool Console.
export : Export to a file.
import : Import from a file.
build package : Build a Deployment Package.
deploy package : Deploy a Deployment Package.
send package : Send package to a file
workbench automated services : Runs the Metadata Workbench automated services
workbench extension source import : Imports Metadata Workbench Extension Sources
workbench extension mapping delete : Deletes Metadata Workbench Extension Mappings
To list Command_Options, enter: istool Command -help
Possible values for: Options
Long Name: Short Name: Description:
-help , -h : print command usage
-verbose , -v : display progress
-silent , -s : silence command output
-script , -script : file to read commands from.
Exit codes:
0 – Success
1 – Warning
2 – Partial failure
3 – Error reading from console
4 – Invalid command history index
5 – Error reading from script file
11 – Invalid command syntax
Export Help:
./istool export -h
istool export [ Options ]
Possible values for: Options
Long Name: Short Name: Description:
-help , -h : print command usage
-domain , -dom : Name of Information Server domain
-username , -u : Name of user account on Information Server domain
-password , -p : Password for Information Server account
-verbose , -v : display progress
-silent , -s : silence command output
-archive , -ar : Archive file
-preview , -pre : Preview export task without executing
-abortIfError , -abort : Abort task on N errors
-updatearchive , -up : Update any existing Archive file
-commonmetadata , -cm : CM Assets
Options for: -commonmetadata
-base , -base : Prefix for Paths
-contactassignmentonly , -caonly : Contact assignment only
-includecontactassignment , -incca : Include contact assignment
-includeannotation , -incannot : Include annotation
-includedataconnection , -incdc : Include data connection
CM item paths
-datastage , -ds : DataStage Assets
Options for: -datastage
-includedependent , -incdep : Include dependent items
-nodesign , -nodes : Exclude design items
-includeexecutable , -incexec : Include executable items
-base , -base : Prefix for Paths
DataStage item paths
-report , -rep : Reporting Assets
Options for: -report
-reportName , -repName : Names of Reports in Reporting Service
-ownedByProduct , -prod : Include Reports belonging to a product
-reportRIDs , -rid : RIDS of the reports to be exported
-includeLastReportResults , -incLastResult : Include Last N Report Results for every report
-includeAllReportResults , -incAllResults : Include all referenced Report results for the Reports Exported
-includeReportResultName , -incResultName : Include Report Result for a given name.
Reporting item paths.
-security , -sec : Security Group Assets.
Options for: -security
-securityGroup , -sg : Security Group Assets.
-groupident , -grp : Specify list of groups. Can use * or ? wildchars.
-includeGroupUserMemberships , -incGrpUsrMems : To specify that group users and their references should be exported along with group.
-includeRoles , -incRole : To specify that user or group role relationships must be exported.
-securityUser , -su : Security User Assets.
-userident , -u : Specify list of users. Can use * or ? wildchars.
-includeUserGroupMemberships , -incUsrGrpMems : To specify that user groups and their references should be exported along with user.
-includeCredential , -incCred : To specify that IS credentials must be exported.
-includeCredentialMappings , -incMap : To specify that DataStage user credential mappings must be exported.
Exit codes:
0 – Success
1 – Warning
2 – Partial failure
3 – Export failed
4 – Export preview failed
5 – Invalid archive file
10 – Failed to connect to Information Server domain
11 – Invalid command syntax
Import Help:
./istool import -h
istool import [ Options ]
Possible values for: Options
Long Name: Short Name: Description:
-help , -h : print command usage
-domain , -dom : Name of Information Server domain
-username , -u : Name of user account on Information Server domain
-password , -p : Password for Information Server account
-verbose , -v : display progress
-silent , -s : silence command output
-preview , -pre : Preview the command, listing items to be imported. Do not execute.
-archive , -ar : Name of source archive for imported items, on local filesystem
-replace , -r : Replace existing versions of items in Information Server
-abortAfter , -abort : Abort after N errors
-commonmetadata , -cm : Common Metadata
-datastage , -ds : DataStage specific options
Options for: -datastage
-nodes , -nodesign : Exclude DataStage design items
server/project : DataStage project
-report , -rep : Reporting Assets
Options for: -report
-replace , -r : Modify assets during the [import] command execution. Must be specified with [import].
Reporting item paths.
-security , -sec : Security Group Assets.
Options for: -security
-replace , -r : Modify assets during the import command execution. Must be specified with import.
Exit codes:
0 – Success
1 – Warning
2 – Partial failure
3 – Import failed
4 – Import preview failed
5 – Invalid archive file
10 – Failed to connect to Information Server domain
11 – Invalid command syntax
=====================================
Now we will see some working examples.
Export Command for Infosphere datastage and qualitystage assets.
Syntax:
istool export
authentication options
[generic options]
-archive “pathname” [-updatearchive]
[-preview ]
[-abortIfError=number_of_errors]
-datastage ‘ [ -base=”server[:port]/project”]
[-includedependent]
[-nodesign]
[-includeexecutable]
“dsServer[:port]/project/folder/name.type” ‘

Asset type

Asset types are identified by a type suffix. Type suffixes are not case-sensitive.
Asset typeType suffix
Data elementdet
IMS databaseidb
IMS viewsetivs
Mainframe jobmjb
Parallel jobpjb
Sequence jobqjb
Server jobsjb
Machine profilemcp
Mainframe routinemrt
Parallel routineprt
Server routinesrt
Parallel shared containerpsc
Server shared containerssc
Table definitiontbd
Transformtfm
Data quality specificationdqs
Stage typestp
Data connectiondcn
Parameter setpst

Examples:
export Parallel job:
istool export -domain ishost:9080 -username dsadm -password password -archive “/tmp/arc.isx” -datastage ‘ “dsengine/dstage1/Jobs/oracle/Extract.pjb” ‘
Beginning Export
[1/1] dsengine/dstage1/Jobs/oracle/Extract.pjb
Elapsed time: 00:00:01
Exported 1 assets
2)Preview export:
istool export -domain ishost:9080 -username dsadm -password password -archive “/tmp/arc.isx” -pre -datastage ‘ “dsengine/dstage1/Jobs/oracle/Extract.pjb” ‘
Beginning Export Preview
[1/1] dsengine/dstage1/Jobs/oracle/Extract.pjb
Previewed 1 assets
3)Export category:
istool export -domain ishost:9080 -username dsadm -password password -archive “/tmp/arc.isx”  -datastage ‘
“dsengine/dstage1/Jobs/oracle/*.*” ‘
Beginning Export
[1/8] dsengine/dstage1/Jobs/oracle/Extract.pjb
[2/8] dsengine/dstage1/Jobs/oracle/Extract1_Optimized1.pjb
[3/8] dsengine/dstage1/Jobs/oracle/Extract2_Oracle_Connector.pjb
[4/8] dsengine/dstage1/Jobs/oracle/Extract3_Using_DRS_Connector.pjb
[5/8] dsengine/dstage1/Jobs/oracle/Extract4.pjb
[6/8] dsengine/dstage1/Jobs/oracle/Load_Oracle_Amazon_Customers.pjb
[7/8] dsengine/dstage1/Jobs/oracle/Load_Oracle_Amazon_Customers2.pjb
[8/8] dsengine/dstage1/Jobs/oracle/Oracle_Connector_Stage_New_Features.pjb
Elapsed time: 00:00:11
Exported 8 assets
4)using the “-incdep”
istool export -domain ishost:9080 -username dsadm -password password -archive “/tmp/arc.isx” -datastage  ‘-incdep “dsengine/dstage1/Jobs/oracle//SrvJob.sjb” ‘
Beginning Export
[1/2] dsengine/dstage1/Jobs/oracle/SrvJob.sjb
[2/2] dsengine/dstage1/Routines/srvTest.srt
Elapsed time: 00:00:01
Exported 2 assets
The disadvantage of using above command line is it will expose password in the command line.
istool -script scriptfile
example of script file:
cat /tmp/export.txt
export -domain ishost:9080 -username dsadm -password password -archive “/tmp/arc.isx” -pre -datastage ‘
“dsengine/dstage1/Jobs/oracle/*.*” ‘
istool -script /tmp/export.txt

Import command for InfoSphere DataStage and QualityStage assets:

Syntax:
istool import
authentication options
[generic options]
-archive pathname
[-preview|-replace]
[-abortAfter=number_of_errors]
-datastage ‘[-nodesign]“Server/project” ‘
Examples:
The following command previews an import of assets from the file arc.isx
istool import -domain ishost:9080 -username dsadm -password password -archive “/tmp/arc.isx” -pre -datastage ‘ -nodesign “dsengine/dstage1″ ‘
Beginning import preview
[1/1] dsengine/dstage1/Jobs/oracle/Extract.pjb ignored – already exists. Use -replace to overwrite
Previewed 0 assets
After the preview, the command is repeated without the -preview option to import the assets to the project named dstage1 and also use -replace to import the existing asset.
istool import -domain ishost:9080 -username dsadm -password password -archive “/tmp/arc.isx” -replace -datastage ‘ “dsengine/dstage1″ ‘
Beginning import
[1/1] dsengine/dstage1/Jobs/oracle/Extract.pjb
Elapsed time: 00:00:03
Imported 1 assets

Popular posts from this blog

Shrink you container size up to 95%.

alma linux: dnf Module yaml error: Unexpected key in data