SOA Governance and API Management : Administering CentraSite : Basic Operations : Usage of the CentraSite Toolbox Scripts : Bulk Importing Assets from the Command Line
Bulk Importing Assets from the Command Line
Use the toolbox command, CentraSiteAssetImporter, to bulk import multiple assets from a CSV file or an Excel file (.xlsx format).
Note:  
Ensure that all of the necessary JAR files are available in the "redist" folder. This folder is located directly under the CentraSite installation directory.
Required JAR files for a CSV (.csv) file:
Download OpenCSV 2.4.0 jar from the URL https://code.google.com/p/opencsv/downloads/detail?name=opencsv-2.4.jar&can=2&q= and place it in the “redist" folder.
Required JAR files for an Excel (.xlsx) file:
Download Apache POI 3.13 from the URL https://poi.apache.org/download.html and place the following Jar files in the “redist" folder.
*poi*.jar
*poi-ooxml*.jar
*poi-ooxml-schemas*.jar
Supported data types and their format:
*String
*Boolean
*Number
*URI/URL
*Multiline String
*Classification
*IP Address
*Email
*Date/Time
*Duration
Format for data type "Duration":
Example: P1Y2M3DT4H5M
Format for data type "Date":
*yyyy-MM-dd
Example: 2015-12-10
Format for data type "Date and Time":
*yyyy-mm-dd hh:mm:ss
Example: 2015-12-10 12:04:10
*yyyy-mm-dd hh:mm
Example: 2015-12-10 12:04
Format for data type "Time":
*hh:mm:ss
Example: 12:04:10
*hh:mm
Example: 12.10
The syntax for the toolbox command is:
C:\SoftwareAG\CentraSite\utilities>CentraSiteToolbox.cmd CentraSiteAssetImporter.jar [-url <CENTRASITE-URL>] -username <USERNAME> -password <PASSWORD> [-ownername] <OWNER-NAME>) -qname <FULLY QUALIFIED NAME> -inputfile <FULL PATH TO FILE> [-excelworksheet <EXCEL WORKSHEET NAME>] -namecolumn <ASSET COLUMN NAME> [-desccolumn <ASSET DESC COLUMN NAME>]
The input parameters are:
Parameter
Description
-url
(Optional). The fully qualified URL of the CentraSite registry/repository. Default value is http://localhost:53307.
-username
The user ID of a registered CentraSite user who has the CentraSite Administrator role. For example, Administrator.
-password
The password for the CentraSite user identified by the parameter -username.
-ownername
(Optional). The domain in which the user wants to include the imported asset. If this parameter is not specified, the user identified by the parameter -username will be the owner.
-qname
The namespace of an asset type along with its schema name. For example:
{http://namespaces.DefaultOrganization.com/Schema}
-inputfile
The absolute or relative path to the CSV or Excel file. If relative, the path should be relative to the location from where the command is executed.
-excelworksheet
(Applicable only to Excel). The name of the Excel worksheet which contains the details of assets to be imported into CentraSite.
-namecolumn
The name of the column or header in Excel sheet or CSV file from which a display name would be assigned to the imported asset.
-desccolumn
The name of the column or header in Excel sheet or CSV file from which a brief description would be assigned to the imported asset.
Example:
C:\SoftwareAG\CentraSite\utilities>CentraSiteToolbox.cmd CentraSiteAssetImporter.jar -url http://localhost:53305/CentraSite/CentraSite -username Administrator -password manage -ownername sag\inosec1 -qname {http://namespaces.DefaultOrganization.com/Schema} MyAssetType -filelocation c:\repository\assetdata.xlsx -namecolumn "Interface Name" -excelworksheet Lowes.com -desccolumn "desc"
Copyright © 2015- 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback