Tuesday, January 27, 2009

Automation of DataLoad

This document is intended to explain how to automate data load.

Step.1:
Create a data load rule in Essbase

Step.2 :

Create a Maxl file to execute the load rule

Step .3 :

Create a batch file to execute the MaxL file. We can schedule the Batch file using windows scheduler.


Example of MaxL code.
1.This MaxL code clears the existing data
2.Loads data
3.Aggregates the data.


Remember : You need clear the data before you load. We clear the data because of our requirements. You can just use step 2 and 3 load data and aggregate data.




/*Script Start */
/*Login */
LOGIN 'UserName' 'Password' ON 'Server Name';

/*Clears data */
execute calculation '
Fix (@idescendants("Account"),@idescendants(Entity),&Current Year,Version)
CLEARDATA Scenario;
Endfix;'
on ApplicationName.Database Name;

/* Imports Data */

import database 'ApplicationName'.'DatabaseName' data connect as 'UserName' identified by 'Password' using server rules_file 'LoadRuleName' on error
write to 'e:\\Logs\Errorfilename.err';

/*Aggregates Data*/
execute calculation'
SET AGGMISSG ON;
SET UPDATECALC OFF;
Fix (Scenario,Year,Version)
CALC DIM(Product,Entity);
Endfix;'
on ApplicationName.DatabaseName;

LOGOUT;
EXIT;
/*End MaxL Script*/


Batch File to call the MaxL Script and send email about status of the

Rem ******************************************************************************
Rem Object Type: Batch File
Rem Object Name: BatchFileName.bat
Rem Script Date: 01-27-2009
Rem Created by: Dornakal
Rem Purpose: This script loads the following data into Cube
Rem Changed By:
Rem Change Date:
Rem Description:
Rem ******************************************************************************
Rem This starts the log file
echo "Start of log" > E:\Logs\Dataload.log

Rem This calls MaxL script to load data


essmsh E:\Scripts\MaxL \DataLoad.mxl >> E:\Logs\Dataload.log

Rem Send mail about the status of the job


sendmail -b E:\Logs\Dataload.log -s "Subject of the mail (data load status)." -f Sendersemail -r Recievers email -r Receiver’s email -X HQSMTP.yourcompany.net




4 comments:

  1. hi
    ur blog is very helpful.I faced these questions in one interview ,but i dontkanow how to ans these questions. pls send soon

    i need these answres also
    Q)How many instances are using for your client?

    1Q) How to work on different instances?
    2Q) How to add one more extra column in the report, with out changing the outline?
    3Q) what is the outline size
    4Q) how u will get task from ur head?
    5Q) >how much time for each task/if u r not reached within the time reasons for not reaching the task?
    6Q) what is level 0 data size
    7Q) wt r operational performance metrics?
    8Q) In the web forms how to give access for total (top to bottom) i.e. edit permission..? For particular cell?

    9Q) How to add different charts in the single report?

    thanks in advance
    bye

    ReplyDelete
  2. 3Q) what is the outline size
    depends on how many members you have in teh outline. my outline size is about 600KB
    .pag file will be maximum 2GB


    4Q) how u will get task from ur head?
    first step is to draw an outline on how to do that ; then make it into parts and finish it

    5Q) >how much time for each task/if u r not reached within the time reasons for not reaching the task?
    It depends on the task; remember failing to plan is planning to fail.

    6Q) what is level 0 data size
    depends on how much data you have it vries fom 1 GB to 250 GB.


    8Q) In the web forms how to give access for total (top to bottom) i.e. edit permission..? For particular cell?

    9Q) How to add different charts in the single report?

    ReplyDelete
  3. Hello,

    How do you create/schedule a batch script in Unix flavor? Does the file have .sh extension?
    Please let me know ..
    Thanks

    ReplyDelete