Example of importing an array to SM using Text Import Wizard

import

For example to update field “support.groups” in device table, the .txt file would look like below:
CI10855;adv-afr-copier-hr;officeelectronics;Test1;Test2;Test3
WHERE:
“CI10855” is for “id” field
“adv-afr-copier-hr is” is for “logical.name” field
“officeelectronics” is for “type” field
“Test1;Test2;Test3” are for array of “support.groups” field

In this scenario, I assume that you have maximum 3 value in your array. In case you have more values on array, please see, your .txt file would look like below:
A1;B1;C1;D1;E1;F1;G1
A2;B1;C2;D2;E2;;
WHERE:
A1, A2 are values of “id” field
B1, B2 are for “logical.name” field
C1, C2 are for “type” field
“D1;E1;F1;G1” and “D2;E2;;” are for array of “support.groups” field

In the above scenario, I assume that you have maximum 4 value in your array, an array contain 4 and other contain only 2.

• In order to make sure, I also provide the step to import .txt to SM table:

1.Go to db
2.In the top right corner you will have get the option Text import Wizard click that
3.Give the .txt file location
4.Give the table name
5.Select file type winnt click enter
6.Select Input file type character -delimited and click proceed
7.Give any name for import name
8.In the field tab. select the column name and in the occurrences of array field, give the value 3(here 3 means the maximum number of values in the array)
9.Select delimiter as ;
10.Click the test button to see if the data are going properly to specific column
11.Click the proceed button and then RUN it
The data would go to specific column as array. The only thing you need to make sure is you prepare the .txt file properly and if you do not have the value for any array just put the ;;; which means there is no value. but you have to make sure what is the maximum numbers of value you are having in the array.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s