Re: Import data to structured array fields
User Role: System Administrator
To test the importing of records:
Click Tailoring > Database Manager.
Click More or the More Actions icon, and then select Text Import Wizard.
Fill in the following fields.
File to Import Type or browse to the path and name of the external text file to import.
Member This field is obsolete.
Destination Table Type the database dictionary name of the table used to import records.
File Type Select the source operating system of external file.
HP Service Manager searches for the external file and displays one of the following messages:
If Service Manager finds the external file but there is not existing import descriptor record, Service Manager displays the form to create a new import descriptor.
If Service Manager finds the external file and also finds one or more import descriptor records, Service Manager displays a list of import descriptor records.
If Service Manager cannot find the external file, it displays an error message.
If Service Manager displays a list of import descriptor records, do one of the following:
Click an existing import descriptor record to use.
From Creating a New Import Descriptor, select the Input File Type.
Fixed-width Select this option if each field in the file occupies a fixed-width position. For example, the following are two records using fixed width positions. The number field starts at position 1 and ends at position 6. The open.time field starts at position 8 and ends at position 15.
Character-delimited Select this option if a special character separates each field in the file. For example, the following are two records using commas to separate the information between fields. The number field is first, and the open.time field is second.
Character Delimited Field 1 Delimiter Field 2 Delimiter
Record 1 IM1042 , 12/29/00 ,
Record 2 IM1058 , 12/29/00 ,
Fill in the following import data definitions.
Import Name Type the name of the new import descriptor record.
Import Table This field lists the destination table you selected earlier in the wizard. This is a read-only field.
Import Mode Select one of the following options:
Add — select this option to only add new records.
Add/Replace — select this option to both add new records and replace existing records. You may also select this option to update fields that you define in the Advanced tab.
Replace only — select this option to only replace existing records.
Format Control Type the name of the optional Format Control record used to format the incoming records.
Delimiter Service Manager only displays this field on character-delimited imports. Select one of the following options:
Comma — select this option if the import file uses a comma (,) between fields.
Tab — select this option the import file uses a tab character between fields.
Semicolon — select this option if the import file uses a semicolon (;) between fields.
Other — select this option to specify the character the import file uses between fields.
Text Qualifier Service Manager only displays this field on character-delimited imports. Specify the text qualifier the import file uses to include special characters such as text delimiters in the record data.
Field Names Specify the database dictionary field names receiving the imported record data. Type one field name for each source field in the import file.
Field type This is a read-only field and cannot be edited. If Service Manager validates the data from the import file, it displays a number describing the data type.
Start Position Service Manager only displays this field on fixed-width imports. Type the column number where data for this field starts.
Field Length Service Manager only displays this field on fixed-width imports. Type the number columns that the data from this field uses.
Array Type This is a read-only field and cannot be edited. If Service Manager validates any array data from the import file, it displays a number describing the array type.
Occurrences Type the number of array elements to import for this field.
Date Format Type the date and time format used to import date and time fields. You can use the following tokens to represent units of time:
dd — two digit day
mm — two digit month
yy — two digit year
yyyy — four digit year
hh — hours
ii — minutes
ss — seconds
You can use any character to separate these tokens. For example, mm/dd/yyyy hh:ii:ss imports dates and times with slashes between the month, day, and four-digit year and colons between the hours, minutes, and seconds.
Query Type any query to select one existing record from the destination Service Manager database for updating. If this query returns a single record, Service Manager updates this record with the data from the import file. If the query returns more than one record, then Service Manager uses the Import Mode setting to determine what action to take.
Skip Type a query used to identify records to skip when adding or updating from the import file. If this query returns one or more records, Service Manager ignores adds or updates from records matching the query.
Expressions Type any RAD expressions used to identify records for importing.
Update Field Names Type the list of field names from the destination table to uniquely identify a record. If Service Manager finds existing records matching these fields, it updates the record with the data from the import file.
Case Conversion Select one of the following options to convert record data to a specific case:
None — select this option if you do not want to convert the case of imported data.
Upper case — select this option to convert imported data into all upper case.
Lower case — select this option to convert imported data into all lower case.
Skip Lines Specify the number of lines to skip at the beginning of the file.
Click the Test Import tab.
Customer Support Engineer
If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
Re: Import data to structured array fields
Much appreciate the response!
Was in fact looking out for info on importing data into an array of structure through text import.
Like for eg. importing data into the profile and groups (permission) in kmcategory table.
Thanks again for the info!