Sometimes it could happen that there is a request to rename element in modeler outside of the spreahsheet or manual. For that puspose we could use ETL and more speciefically groovy job.
In following example we will show how to rename element from User dimension using groovy job.
API.executeLoad(“Users_Load”);
LOG.info(“Start renaming elements”);
source = API.initSource(“Users_Extract”,”EA”,0);
String oldNames = “joe”;
String newNames = “Martin”;
OLAP.erename(“olapsystem”,”#_USER_”,oldNames as String,newNames as String);
LOG.info(“Finished renaming elements”);
In the graph we could see that for this action we need:
- Extract from dimension
- Connection to dimension
ETL is extracting all elements and then searching for joe and replacing it with Martin.
ETL project could be downloaded on this link.
Other PHP APIs could be found here .