[Babase] Conversion instructions

Karl O. Pinc babase@www.eco.princeton.edu
Thu, 24 Jun 2004 13:13:47 -0500


Notes and instructions on the babase conversion

Karl O. Pinc <kop@meme.com>


THE PROCESS


0)  Get into the conversion directory.

Go the the conversion directory with:

cd babase/workspace/babase/conversion


1)  Get the latest data

Before beginning it will usually be a good idea to get the latest
version of the conversion program.  The command to do this is:

cvs up -Pd

You will want to obtain the latest babase data.  You can do this while
the babase computer at Princeton is being used, but not while the
babase database is being used at Princeton.  So, this will require
some coordination at the remote end.

The command to get the babase data is as follows, you will be prompted
for the ftp password:

make get

After the data is retrieved, 'make get' also converts the data from
FoxPro format and makes it ready to import into the new Babase
database.


2) Empty the old data out of the database

It will probably usually be a good idea to remove all the old data
from the database before starting, although if some changes have been
made to the database it's likely to be empty already.  The command to
erase all data from the new database (the babase_sandbox version of
the database) is:

make empty

The command will prompt you for your database password.


3)  Load the database

The command which loads the data into the database is:

make convert

The command will prompt you for your database password.

This attempts to put all the data into the 'babase_sandbox' database.


THE RESULTS

make get      Gets database from Princeton
               Produces:
                loadscript  Sql commands to load the data
                txtdir      Directory of Princeton data as text
                dbfdir      Directory of Princeton foxpro data
make convert  Converts data into babase_sandbox database
               Produces:
                record      Normal output
                errors      All the error messages
                rejects     Directory of data that won't convert

So, the error messages in the 'errors' file contain references to line
numbers in the 'loadscript' file, each line of which is a command that
puts one row of data into the database.  If there's a problem
determining what data is causing the error, the error message is not
clear, then the actual data (and command) which caused the problem is
found in the 'loadscript' file.

The 'rejects' directory exists so that if there's a problem with the
conversion program or the database which prevents some data from
loading then we can fix the problem and run the convesion program
again on just the rejected data.  In practice I'm not yet clear on how
this will work or when it will be easier than just re-running the
whole conversion anyhow.



Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein