Hi there,
I've been testing the generic XMLA driver on SAP BW yesterday.
It didn't work but I don't think we need that many changes to make it work:
The first problem I ran into was that the measure was being a datatype called "FLTP"
I think we could add easily support for other datatypes by changing org.olap4j.metadata.Datatype and just changing the key of the enums to string
so e.g:
DOUBLE(5, "DBTYPE_R8", "A double-precision floating-point value: Double"),
would become
DOUBLE("5", "DBTYPE_R8", "A double-precision floating-point value: Double"),
so we can add FLTP("FLTP", "DBTYPE_NUMBER", "An eight byte floating point number: Number");
Of course we would need to change from integerElement(row, "DATA_TYPE") to stringElement(row, "DATA_TYPE") etc.
I don't know what other data types we would need, but I guess we could find that out
The next problem I ran into was a NullPointerException in XmlaOlap4jConnection around line 1176 (i have some fixes applied in that class so the line number may vary...)
final XmlaOlap4jLevel measuresLevel =
(XmlaOlap4jLevel)
context.getCube(row).getHierarchies().get("Measures")
.getLevels().get(0);
This was giving me a NPE.
Unfortunately I couldn't really debug because I don't have access to the SAP BW test system anymore. I'll try to get access to it somehow again.
I don't know if it helps to understand SAP BW XML/A but i attached 3 files:
- discover.xml = DISCOVER_DATASOURCES
- discover_catalogs.xml = MDSCHEMA_CUBES
- execute.xml = execution result of an mdx query
Please let me know if you have any suggestions / thoughts on the support of SAP BW XML/A in olap4j
-paul