Menu
Download Free Trial
Table of contents

getXMLAProviderName

getXMLAProviderName(proxyURL:String, callbackHandler:String, username:String, password:String):String

[starting from version: 1.5]

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

Returns dataSourceType for given proxyUrl. dataSourceType is a type of data source. For OLAP/XMLA connectivity it can be one of the following types: "microsoft analysis services", "mondrian", "iccube".

If getXMLADataSources() is called for proxyUrl first and then getXMLAProviderName() is called for the same proxyURL, getXMLAProviderName() will be ready to return dataSourceType immediately. Otherwise callbackHandler is needed to get dataSourceType.

Parameters

  • proxyUrl – the path to proxy URL to the OLAP data source, such as Microsoft Analysis Services, Mondrian, icCube.
  • callbackHandler (optional) – JS function which will be called when the component is ready to give dataSourceType.
  • username (optional) – the name of user account at server. This parameter is necessary to complete authentication process.
  • password (optional) – the password to user account at server. This parameter is necessary to complete authentication process.

Example

OLAP/XMLA connectivity step by step. First, getXMLADataSources() obtains a list of all data sources by given URL (for example: 'http://olap.flexmonster.com/olap/msmdpump.dll') and getXMLAProviderName() returns dataSourceType. 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 = 'http://olap.flexmonster.com/olap/msmdpump.dll';
var dataSourceInfo = '';
var dataSourceType = '';
var catalog = '';
var cube = '';

function diagnostic() {
  getDataSources();
}

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

function onDataSourceLoaded(result) {
  dataSourceInfo = result[0];
  dataSourceType = flexmonster.getXMLAProviderName(proxyUrl);
  flexmonster.getXMLACatalogs(proxyUrl, dataSourceInfo, 'onCatalogsLoaded');
}

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

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

diagnostic();

See also

getXMLADataSources
getXMLACatalogs
getXMLACubes