Quantcast
Channel: the naked leaf » Jedox 5.1
Viewing all articles
Browse latest Browse all 5

Scripting in ETL

0
0

Some ETL tools out there use pure scripting to extract, load and transform data. Jedox has a classical ETL interface which allows you to re-use components and structure things in a modular, logical way.

If scripting is the thing that you are used to, you can certainly go crazy in Jedox. There are a number of example of scripting jobs and transforms in ../ETL/samples.

For a long while, Jedox has been able to take advantage of the power of Java and Groovy to extend functionality in the ETL. With the advent of Jedox 5.1, we finally have access to the complete Jedox Java API. The implications of this is that you can (much more simply) refer to objects within the Jedox db in transforms and loads. For instance, you might want to look up the element index , or test what parent the element belongs to.

You can find the full description of the Java API in the Jedox Knowledgebase.

I have created a small project with a few examples of doing this within a transform. You can download here.

Examples of using the Java API in transformations. Note: In the script examples, the line

OLAP.getDatabase(“Jedox”)

“Jedox” refers to a Jedox connection name in ETL (either Jedox or JedoxGlobal connection types).

1. Get the Child count of a particular element


IDatabase db = OLAP.getDatabase("Jedox");
IElement e = db.getDimensionByName("Products").getElementByName(_input1,false);
if(e==null){
throw new RuntimeException("Element " + _input1 + " does not exist.");
};
return e.getChildCount();

2.  Get the Parent count of a particular element


IDatabase db = OLAP.getDatabase("Jedox");

IElement e = db.getDimensionByName("Products").getElementByName(_input1,false);
if(e==null){
throw new RuntimeException("Element " + _input1 + " does not exist.");
};
return e.getParentCount();



Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images