Showing posts with label Calc Script. Show all posts
Showing posts with label Calc Script. Show all posts

Wednesday, July 13, 2011

Currency Conversion in ASO cube

Hi All...

Long time no post :-)... was busy with personal commitments

So I am back and this time am going to give you a link which is a work around to what is considered to be a limitation with ASO cube

Currency Conversion is not supported in ASO cube as we cannot write Calculation rules / scripts in ASO cube. However we can write MDX formulas and with some tweaks in calculation order, we can achieve what is considered to be a limitation.

I found an interesting link on Oracle Forum with Step by Step ways to implement currency conversion in ASO cube and thought of sharing the same with you all


https://community.oracle.com/message/3334237#3334237


Copy Paste upper link in any browser and you could find the process of using ASO cube for currency conversion.

So enjoy sharing... :-)

Sunday, September 5, 2010

CDF Utility : JExtendedExportTo

While working/reading through number of blogs, I found an interesting article on CDF Essbase calc script utility function 'JExtendedExportTo' which can be used to export specific (tailored) data from Essbase using Calc Script. I liked the article too much and thought of sharing in my blog.

Here is the details of the function:

Exports (extended) the data to a text file or relational database (using either JDBC or JDBC-ODBC bridge).
* @param targetType The type of export (file, dsn or jdbc).
* @param targetName The name of the destination (see use). This file name must be used to close the file after the calculation completes.
* @param delimiter The character to use to delimit the fields (see use). Accepts "tab" for tab delimited.
* @param textQualifier text qualifier. Accepts "quotes" for " qualifier.
* @param tableName The name of the table (see use).
* @param strArgs An array of strings (member names). Use "" if you are not exporting members names.
* @param dblArgs An array of values (data). Use 0 if you are not exporting Data values.
* @param decimalPoints An array of int values that sets decimal points per column. Use -1 to return the stored number.
* @param replaceMiss an array of String values that replaces #Missing per column.
* #Missing can be replaced with any text or a number such as "0".
* @cdf.maxl CREATE OR REPLACE FUNCTION '@JExtendedExportTo'
* AS 'com.oracle.essbase.cdf.ExportTo.ExportToTarget(String,String,String,String,String,String[],double[],int[],String[])'
* SPEC '@JExtendedExportTo(targetType,targetName,delimiter,textQualifier,tableName,strArgs,dblArgs,intDecPts,replaceMi)'
* COMMENT 'Exports the data to a text file or relational database (using either JDBC or JDBC-ODBC bridge).';
* @cdf.use
* Export to a text file:

* arg 1: specify "file" to export to a text file

* arg 2: file name. This file name must be used to close the file after the calculation completes

* arg 3: delimiter. Accepts "tab" for tab delimited.

* arg 4: text qualifier. Accepts "quotes" for " qualifier.

* arg 5: leave blank when exporting to text files

* arg 6: an array of member names (Use "" if you are not exporting members names)

* arg 7: an array of data (Use 0 if you are not exporting Data values)

* arg 8: an array of int values that sets decimal points per column (use -1 to return the stored number)

* arg 9: an array of String values that replaces #Missing per column.
* #Missing can be replaced with any text or a number such as "0".

*
*
@JExtendedExportTo("file","%HYPERION_HOME%\flatdec.txt","tab","quotes","",
*
@List(@NAME(@currmbr(Market)),@NAME(@currmbr(Product)),"[None]"),
*
@LIST(jan:dec),@LIST(-1),
*
@list("NONE","0","0","#Mi","0","0","0","#Mi","0","0","0","#Mi") ) ;

However this utility is not an in-bult Hyperion Essbase feature. You need to download and register the utility on your essbase server. Please find the details in EssbaseLabs.blogspot.com URL : http://essbaselabs.blogspot.com/2008/10/cdf-jexport-and-dynamic-members.html

Hope you will find more useful functions in this utility

Wednesday, April 8, 2009

CALC DIM Vs AGG

If you have being using Calc Scripts in your Essbase database, I am sure you may have got confused when to use CALC DIM and when to use AGG for aggregation.

Here is the difference

CALC DIM (Product);
This line calculates the Product dimension doing both outline
aggregation (such as rolling all the Colas up into the parent
value) and member formulas, if they exist for members in that
dimension. If we want to calculate multiple dimensions using
this command (say, Market and Product), just separate them
with commas:
CALC DIM (Market, Product);
Remember how we said that “CALC DIM” not only does
aggregation but also member formulas? Well, how many member
formulas are there in the Market and Product dimensions?
That’s right: none, so “CALC DIM” is wasting time looking for
formulas that you know aren’t there. For sparse dimensions that
don’t have formulas, there’s a command that only does aggregation
and as such, is usually faster:
AGG (Market, Product);

Hope this would have made you some what comfortable about CALC DIM and AGG

So go on scripting