Pregunta

So I am writing an application that will help users setup Datasources in pentaho biserver in a couple easy steps, so that the user does not have to worry about setting up the database or the joins for the schema. So far I can successfully create the Mondrian.xml files that describe the cube and link it to the database. I have noticed that when I create a datasource with pentaho it creates an .xmi file in addition to the mondrian.xml file. The XMI file is a metadata file that is used for Ad Hoc reporting, I would like to generate this as well. The schema for the XMI file doesnt seem quite as straight forward as the mondrian file though so I would rather go through the Pentaho API than try to generate it on my own.

I was wondering if anyone knows how to generate the XMI file that goes along with the mondrian file. I have searched throughout the biserver logs (catalina.out and pentaho.log) and they provide no insight as to what is going on. I also asked a couple times on the penthao forums and have 0 responses in the past month of these questions being online. I know that the org.pentaho.pms package has a lot of metadata stuff, but I find Pentaho's javadocs lacking in terms of clear instructions on how to use their libraries. If anyone knows how to generate the XMI out of Mondrian or if that is even possible I would greatly appreciate it. Thanks

¿Fue útil?

Solución

Looking do the network requests within Pentaho User Console, when we ask to create or modify a model, it calls the pentaho/gwtrpc/modelerService.

As the data-access/plugin.xml shows us:

<webservice
 id="modelerService"
 type="xml,gwt"
 class="org.pentaho.platform.dataaccess.datasource.wizard.service.impl.ModelerService"/>

This service is implemented under the class ModelerService - here's the source code.

It's definitely possible to programmatically generate them xmi. Not directly using the xml mondrian schema, you'll only have to parse it - or to use your model pre-mondrian-xml - for then applying to the API and generating the CWM-based XML.

Focus on building up the org.pentaho.metadata.model.Domain and then serializing it to the xmi.

Here's the starting point of your toolbox: https://github.com/pentaho/data-access

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top