Using OLAP4J with MS Analysis Service - can not execute MDX like 'SELECT * FROM [DimCustomer].CONTENT'

i have Using OLAP4J connect to   MS Analysis Service and i can execute

' SELECT FLATTENED PredictAssociation([Dim CustomerQWE].[Total Children],INCLUDE_STATISTICS,3) FROM [Dim CustomerQWE]'

but i want get the mining model message , like execute '  SELECT *  FROM [DimCustomer].CONTENT ',

 who can tell me why? or the sql have error ?

June 25th, 2015 7:14am

Hello,

You can query data from a dimension directly, but not in SQL way, you have to use MDX with it's syntax. This MDX gets the data from dimension "Date" of example cube "AdventureWorks":

SELECT {} ON 0
       ,
       {[Date].[Date].Members} ON 1
FROM $Date

Free Windows Admin Tool Kit Click here and download it now
June 25th, 2015 8:07am

thanks! i have another question ,  i can use loap4j query DMX?  I want query data from mining model,but i did not know th way! can i user loap4j to query data from mining model with DMX?

June 25th, 2015 9:14am

I don't know; create a little test project to see if it works.
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2015 9:54am

 ok! very thanks!!

I  create a test project , but it can not works.

when i test it, it  resutn '  rror (data mining) : the result of the request format for DMX query is invalid '

i go to the olap4j  official website see that
Core packages

The core packages in olap4j-1.0 are as follows.

org.olap4j.driver.xmla : Generic XML/A driver

org.olap4j.mdx : Core objects of the MDX model

org.olap4j.mdx.parser : Parser for the MDX query language

org.olap4j.type : System for the core MDX object model and the metadata package
    
    
Experimental packages

The following packages are considered experimental and are subject to change.


org.olap4j.query    Programmatic Query Model
org.olap4j.transform    Core MDX object model transformation utilities
org.olap4j.layout    Utility classes to display CellSets
org.olap4j.CellSetListenerand associated classes    Event-based system for real time updates of CellSet objects
org.olap4j.Scenario and associated classes    Statistical simulations module

so i think olap4j can not query DMX
June 25th, 2015 10:38am

Hi,

According to your description, you want to execute DMX query in JAVA code. Right?

In this scenario, since this package is from OLAP4J, I suggest you ask your question on their forum to see if they support DMX query. And I notice that they have a package for parsing XMLA. You can try to execute the DMX command within XMLA. 

Here is another related thread;

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/12f73c69-213f-4839-801a-bac9f9d8d916/dmx-from-java?forum=sqldatamining

Regards,

Free Windows Admin Tool Kit Click here and download it now
June 28th, 2015 11:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics