Sybase RAP includes two sets of sample data for the RAPCache and VLDBServer databases. A smaller set of sample data is loaded during the RAP installation process. Follow these instructions, if you need to reload this smaller set of sample data.
You can either run a script or use the automated load process to load the sample data. Before loading the sample data, unzip the files STOCK_QUOTE.zip and STOCK_TRADE.zip located in the $RAP30/Data/RAPCache/RAP_Input directory.
The installed files STOCK_QUOTE.csv and STOCK_TRADE.csv contain a subset of the data in the STOCK_QUOTE.zip and STOCK_TRADE.zip files. If you want to preserve the smaller STOCK_QUOTE.csv and STOCK_TRADE.csv files, rename these files before unzipping the STOCK_QUOTE.zip and STOCK_TRADE.zip files.
To load the TAQ (Trades and Quotes) sample data only into the RAPCache, run the script $RAP30/Data/RAPCache/RAP_Load/load_unix_ASE_TAQ_tables.sh from a command window on the machine that hosts the ASE RAPCache database. This script uses the bulk copy utility bcp to load the sample data into the RAPCache rapt and rapq databases. Errors are written to the files STOCK_TRADE.err and STOCK_QUOTE.err.
To check the status of the data loads, review the log file for Adaptive Server Enterprise. The default location of the ASE log file is $RAP30/RAPCache/ASE-15_0/install/<servername>.log.
Use the automated load process to load the TAQ sample data into both the RAPCache and the RAP VLDB databases.
Remove any TAQ sample data already loaded in the RAPCache,
or you will receive “Duplicate row”
errors.
See the section “Clearing the cache” for information on how to remove
the data from the RAPCache.
If the TAQ sample data is not in the RAPCache, follow these instructions before you start the automated load process.
Divide the STOCK_QUOTE.csv file into smaller batch files using the split command:
split -l 500000 STOCK_QUOTE.csv STOCK_QUOTE.csv.
This command creates several files called STOCK_QUOTE.csv.nn (where nn is an automatically generated two-character suffix beginning with aa, ab, ac, and so on) that contain 500,000 rows each. This optional step is recommended, to better demonstrate how the automated load process works.
To improve load performance, you may need to adjust the number of rows specified in the split command to an appropriate value for the physical resources on your system.
Divide the STOCK_TRADE.csv file into smaller batch files using the split command:
split -l 250000 STOCK_TRADE.csv STOCK_TRADE.csv.
This command creates several files called STOCK_TRADE.csv.nn (where nn is an automatically generated two-character suffix beginning with aa, ab, ac, and so on) that contain 250,000 rows each. This step is optional, but is recommended.
Copy all of the STOCK_QUOTE.csv.nn and STOCK_TRADE.csv.nn files into the $RAP_IN input directory of the automated load process.
If the automated load process is not already running, run $RAP_HOME/rap_bfap_start.sh and $RAP_HOME/rap_flap_start.sh to start the process.