Loading Data using the Package Maker

Before creating data and working with packages, it is recommended that you configure a test system first before applying changes and new data to your production database. Incorrect data loading can cause integrity issues at best, and total server failure at worst. See Database and Data Guidelines for instructions on setting up a test database.

Data Packages

In order to load data into the MIM, you will be creating a upd package similar to the data packages that your server picks up with cron_updates.sh from your FTP/HTTP account. Package names are structured as follows:

upd_krd_0_20040429

Packages always begin with upd_. This designator tells load_updates.sh that it is a package of data that needs to be loaded.

The next three letters are a package identifier. All packages that LIM distributes to customer machines have lowercase identifiers. This means any custom packages built must use an all uppercase, three letter identifier.

The identifier may also contain numbers (i.e., WI1 or WI2) but the first character of the identifier must be a letter.

Using this naming convention will guarantee that you do not use any of the same identifiers that LIM delivers. The following package example contains proprietary Widgets Incorporated data, so it is named as follows:

upd_WID_0_20040429

The _0_20040429 is the package sequence number followed by the current date. So, if you need to load 3 packages of the same data during the day, you will load:

upd_WID_0_20040429
upd_WID_1_20040429
upd_WID_2_20040429

This way, each time you load a package of data, you retain a unique log record which can be reviewed in case of problems. For more information on logs see the section called “Loading Data Packages and Checking Logs” below.

All packages contain at least two files, the make_data BMIM script file and the file containing the actual data to be loaded in .txt (text) or .csv (comma separated value) format. The make_data script essentially tells the MIM database how and where to load the data. Essentially, it instructs the MIM on how the data will be represented in the database.