Creating an Aggregate Storage Sample Using MaxL

The following sample MaxL script creates, loads data into, and aggregates an Essbase aggregate storage database that is based on Sample.Basic.

login $1 $2;

spool on to 'maxl_log.txt';

create or replace application Sample2 using aggregate_storage 
 comment 'aggregate storage version of Sample';

create database Sample2.Basic2 
 comment 'aggregate storage version of Sample Basic';

create or replace outline on aggregate_storage database Sample2.Basic2 
 as outline on database sample.basic;

alter database Sample2.Basic2 initialize load buffer with buffer_id 1;

import database Sample2.Basic2 data 
 from server data_file '/catalog/users/catalogUser/Data.txt' 
 to load_buffer with buffer_id 1 
 on error abort;

import database Sample2.Basic2 data from load_buffer with buffer_id 1;

execute aggregate process on database Sample2.Basic2 
 stopping when total_size exceeds 1.9;

spool off;

logout;