Was this helpful?
Populate a Table Using the Import Assistant
You can populate a table with data by importing the data from a file. The Actian Import Assistant can import data from various file types.
In this example, we use a CSV file located in %II_SYSTEM%\ingres\demo\data\airport.csv.
Note:  The airport table in the demodb is already populated. This sample procedure creates a new table called temp, which you can delete (drop) after this exercise.
To import data from a file using the Import Assistant
1. Start the Import Assistant.
To do this, select Start, All Programs, Actian, IngresXX, Other Utilities, Actian Import Assistant.
(Alternatively, in Visual DBA, right-click on the new table you just created, and choose Import from the menu.)
Step 1 of 4 of the Import Assistant is displayed.
2. Use the browse button in the File to Be Imported control to locate the file.
3. Expand the (local) node in the Into Table control, and then expand the demodb database. Select the <new table> option and enter temp into the Table to be Created field. Press Next.
Step 2 of 4 of the Import Assistant (File Format Identification) is displayed.
The Import Assistant displays each of its interpretations of the data as a tab.
4. Select the Csv1 tab, which shows that there are five columns of data.
Select the "Tab corresponds to expected results" box and press Next.
Step 3 of 4 of the Import Assistant (Column Properties) is displayed.
The utility assigns default values to column properties.
5. Double-click the "with null" field in the first column and select "not null" from the drop-down list.
Change the properties of the other columns, as needed.
Note:  When importing into Unicode columns, use the data type char or varchar. Actian X will coerce the values to Unicode using the appropriate Unicode mapping, indicated by the value of the Actian X environment variable II_CHARSET.
Press Next.
Step 4 of 4 of the Import Assistant (Import Preview) is displayed.
Note:  If the file was large, you could commit every 1000 rows to avoid filling the transaction log file.
6. Press the Finish Button
The new table is populated.
You are asked if you want to import another file.
7. Press No.
The Import Assistant closes.
 
Last modified date: 12/14/2023