All documentation
  • API Reference for older versions
  • getXMLACubes

    getXMLACubes(proxyURL: String, dataSourceInfo: String, catalog: String, callbackHandler: Function, username: String, password: String)

    [starting from version: 1.5]

    One of four API calls of OLAP/XMLA connectivity diagnostics.

    Obtains a list of all available cubes on a given data source by proxyURL, dataSourceInfo and catalog. Returns an Array of cube names.

    Note that getXMLACubes has an async equivalent — getXMLACubesAsync.

    Parameters

    Parameter/TypeDescription
    proxyUrl
    String
    The path to proxy URL to Microsoft Analysis Services.
    dataSourceInfo
    String
    The service info of the OLAP data source.
    catalog
    String
    The data source catalog name of the OLAP data source.
    callbackHandler
    Function
    A JS function which will be called when the component obtains a list of all available cubes.
    username
    String
    optional The name of the user account at the server. This parameter is necessary to complete the authentication process.
    password
    String
    optional The password to the user account at the server. This parameter is necessary to complete the authentication process.

    Example

    OLAP/XMLA connectivity step by step. First, getXMLADataSources() obtains a list of all data sources by given URL (for example: 'https://olap.flexmonster.com/olap/msmdpump.dll') and getXMLAProviderName() returns type. Second, getXMLACatalogs() gets all available catalogs for the first data source from the list of available data sources. Then getXMLACubes() obtains a list of all cubes for the first catalog of the list of available catalogs. Finally, connectTo()uses all the information about data source to connect to it:

    var proxyUrl = 'https://olap.flexmonster.com/olap/msmdpump.dll'; 
    var dataSourceInfo = '';
    var type = '';
    var catalog = '';
    var cube = '';

    function diagnostic() {
     getDataSources();
    }

    function getDataSources() {
      pivot.getXMLADataSources(proxyUrl, onDataSourceLoaded);
    }

    function onDataSourceLoaded(result) {
      dataSourceInfo = result[0];
      type = pivot.getXMLAProviderName(proxyUrl);
      pivot.getXMLACatalogs(proxyUrl, dataSourceInfo, onCatalogsLoaded);
    }

    function onCatalogsLoaded(result) {
      catalog = result[0];
      pivot.getXMLACubes(proxyUrl, dataSourceInfo, catalog, onCubesLoaded);
    }

    function onCubesLoaded(result) {
      cube = result[0];
      pivot.connectTo({
      type: type,
      proxyUrl: proxyUrl,
       dataSourceInfo: dataSourceInfo,
       catalog: catalog,
       cube: cube
     });
    }

    diagnostic();

    Check out on JSFiddle.

    See also

    getXMLACubesAsync
    getXMLADataSources
    getXMLAProviderName
    getXMLACatalogs