Friday, February 24, 2012

I need help with xmla query

Hi,

I need to do a xmla query for calling more than one prespective. For example:

I have a cube with 4 perspectives, but in the xmla query only need 2 perspectives.

Cube: Censo
Perspectives: Depto.
Pais
Principal
Privado

But i only need
Cube: Censo
Perspectives: Depto
PaisI'm not sure I entirely understand your question, but if you need to reference objects from 2 different prespectives you should be able to just query the underlying cube.|||Sorry if i don't explain well my question... but here put a example.

I have this query:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>MDSCHEMA_CUBES</RequestType>
<Restrictions>
<RestrictionList>
<CUBE_NAME>Depto</CUBE_NAME>
<CUBE_NAME>País</CUBE_NAME>
</RestrictionList>
</Restrictions>
<Properties>
<PropertyList>
<DataSourceInfo>SERVER</DataSourceInfo>
<Catalog>Censo</Catalog>
<Format>Tabular</Format>
<Content>SchemaData</Content>
</PropertyList>
</Properties>
</Discover>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

With this query only show me the País perspective, but i want show me Depto and País perspective because the cube have 4 perspectives.|||

Thanks for the example, now I understand what your are after. :)

Unfortunately I don't think you can have more than one CUBE_NAME element in your restriction list. What I believe is happening is that the value is being overwritten and the last one is the one that is used.

I think you have 2 options

1) fire off 2 separate Discover requests, one for each perspective

2) do not put any restrictions in the request and filter the results on the client side.

No comments:

Post a Comment