The Aster Loader Tool must be installed on your data staging machine. (See Installing the Loader Tool
in the Aster Client Guide
.)
- If you have not already added one or more loader nodes to your Aster Database cluster, create them now in the tab in the AMC.
-
Prepare the file or files that contain the data you wish to load:
For hints on file formatting, see the descriptions of the --csv, --delimiter, and --null arguments, in the Argument Flags section. Use a consistent newline character in your input file(s)!
- Determine your mapping of the input file’s field values to the columns of your target table. See the --columns argument in the Argument Flags section.
- Determine any special parsing hints you need to provide to the loader routing. See the --escape, --quote, and --data-prefix arguments in the Argument Flags section.
- Place your data input file(s) on the data staging machine.
- Decide how you want to handle records that fail to load. See the section Error Logging. Be prepared to query the nc_all_errorlogging_stats table for statistics about your load attempt. If you are on a system running with Aster Execution Engine, use --el-label and the system-defined tables.
-
Figure out which advanced options of the Aster Loader Tool you will use:
- Do you need to load from multiple files or insert into multiple tables? If so, see the description of the --map-file argument and read the section, Troubleshoot Loading in the Aster Client Guide .
- Do you need to automatically partition data when loading parent child tables with inheritance? Use the --auto-partition argument and read the section, Loading Parent Child Tables with Inheritance.
- If you need to run an SQL script before and/or after the data is loaded, see the --begin-script and --end-script arguments in the Argument Flags section.
-
Load your data by running the Aster Loader Tool on your input file(s). See Argument Flags for a list of the command-line options. The command you type will be similar to:
See the Argument Flags section for a list of the command-line options. The command you type will be similar to:
$ ./ncluster_loader -h 10.50.25.100 –w beehive -D "~" customersinput_data.txt
- Check the results of your load attempt by querying the statistics tables, nc_all_errorlogging_stats and nc_user_errorlogging_stats.
- Check your error logging table(s) for rows that failed to load. Be aware that if the load failed entirely (for example, if the number of errors exceeded the --el-limit), then no new rows will appear in your target table, and no error rows will appear in the error logging table.
- If you want to import the failed rows, find each row of input data that failed, edit it to fix it, and combine these fixed rows into a new input file. Re-run the Aster Loader Tool on the new input file.