ig.OlapXmlaDataSource

ig.OlapXmlaDataSource_image
The igOlapXmlaDataSource component handles the communication between a JavaScript client application and a Microsoft® SQL Server Analysis Services (SSAS) server configured with the msmdpump.dll HTTP data provider. It exposes a user-friendly way for obtaining data from Microsoft SQL Server Analysis Services (MS SASS) – you do not have to possess any particular knowledge of Multidimensional Expressions (MDX) or XML for Analysis (XMLA) in order to get the data from an SSAS server. The igOlapXmlaDataSource generates the necessary MDX queries based on the commands it is given. The igOlapXmlaDataSource is usually used with one or more of the Ignite UI widgets capable of visualizing and interacting with OLAP data, e.g. igPivotView™ or igPivotGrid™.

Code Sample

<!doctype html>
<html>
<head>
    <!-- jQuery Core -->
    <script src="js/jquery.js" type="text/javascript"></script>
    <!-- jQuery UI -->
    <script src="js/jquery-ui.js" type="text/javascript"></script>
    <!-- Infragistics Combined Scripts -->
    <script src="js/infragistics.core.js" type="text/javascript"></script>
    <script src="js/infragistics.lob.js" type="text/javascript"></script>
    <script type="text/javascript">
        $.support.cors = true;                
        $(function () {
            var dataSource = new $.ig.OlapXmlaDataSource({
                serverUrl: "http://sampledata.infragistics.com/olap/msmdpump.dll",
                catalog: "Adventure Works DW Standard Edition",
                cube: "Adventure Works",
                rows: "[Date].[Calendar]",
                measures: "[Measures].[Customer Count], [Measures].[Internet Order Count]"
            });
			
            dataSource.initialize().done(function(metadataTree) {
                // do anything with dataSource once it's initialized
                // the result of the pre-loaded rows, columns, filters and measures is evaluated as part of initialization 
                var result = dataSource.result();
            });
        });            
    </script>
</head>
<body>
</body>
</html>    
    

Related Samples

Related Topics

Dependencies

jquery-1.9.1.js
infragistics.util.js
  • options

    Type:
    object
    Default:
    {}

    A javascript object containing the data souce configuration options as properties.

    • catalog

      Type:
      string
      Default:
      null

      The catalog name.

    • columns

      Type:
      string
      Default:
      null

      A list of hierarchy names separated by comma (,). These will be the hierarchies in the columns of the data source.

    • cube

      Type:
      string
      Default:
      null

      The name of the cube in the data source.

    • discoverProperties

      Type:
      object
      Default:
      null

      Additional properties sent with every discover request.
      The object is treated as a key/value store where each property name is used as the key and the property value as the value.

    • enableResultCache

      Type:
      bool
      Default:
      true

      Enables/disables caching of the XMLA result object.

    • executeProperties

      Type:
      object
      Default:
      null

      Additional properties sent with every execute request.
      The object is treated as a key/value store where each property name is used as the key and the property value as the value.

    • filters

      Type:
      string
      Default:
      null

      A list of hierarchy names separated by comma (,). These will be hierarchies in the filters of the data source.

    • mdxSettings

      Type:
      object
      Default:
      {}

      Optional="true" a javascript object containing information about how the request to the xmla server should be processed.

      • addCalculatedMembersOnColumns

        Type:
        bool
        Default:
        true

        Optional="true" a value indicating whether a members' set expressions on COLUMNS axis should be wrapped with AddCalculatedMembers MDX method. Default value is true.

      • addCalculatedMembersOnRows

        Type:
        bool
        Default:
        true

        Optional="true" a value indicating whether a members' set expressions on ROWS axis should be wrapped with AddCalculatedMembers MDX method. Default value is true.

      • dimensionPropertiesOnColumns

        Type:
        array
        Default:
        []
        Elements Type:
        object

        Optional="true" a string array with the names of intrinsic non-context sensitive member properties applied on COLUMNS axis. By defult CHILDREN_CARDINALITY and PARENT_UNIQUE_NAME properties are always added to DIMENSION PROPERTIES.

      • dimensionPropertiesOnRows

        Type:
        array
        Default:
        []
        Elements Type:
        object

        Optional="true" a string array with the names of intrinsic non-context sensitive member properties applied on ROWS axis. By defult CHILDREN_CARDINALITY and PARENT_UNIQUE_NAME properties are always added to DIMENSION PROPERTIES.

      • nonEmptyOnColumns

        Type:
        bool
        Default:
        true

        Optional="true" a value indicating whether a NON EMPTY clause is present on COLUMNS axis. Default value is true.

      • nonEmptyOnRows

        Type:
        bool
        Default:
        true

        Optional="true" a value indicating whether a NON EMPTY clause is present on ROWS axis. Default value is true.

    • measureGroup

      Type:
      string
      Default:
      null

      The name of the measure group in the data source.

    • measures

      Type:
      string
      Default:
      null

      A list of measure names separated by comma (,). These will be the measures of the data source.

    • requestOptions

      Type:
      object
      Default:
      {}

      An object containing information about how the request to the XMLA server should be processed.

      Code Sample

       
      // Initialize
      $.ig.OlapXmlaDataSource({
          requestOptions: {
              // example for setting the credentials for basic authentication
              withCredentials: true,
              beforeSend: function (jqXHR, options, requestOptions) {
                  var xhr = options.xhr();
                  if (requestOptions.withCredentials && "withCredentials" in xhr) {
                      // if the user name is "user123" and the passord is "password123" the value set for the
                      // Authorization header will be "Basic dXNlcjEyMzpwYXNzd29yZDEyMw==" where "dXNlcjEyMzpwYXNzd29yZDEyMw=="
                      // is the Base64 encoded string "user123:password123"
                      jqXHR.setRequestHeader("Authorization", "Basic UserName:PasswordEncodedInBase64");
                  }
              }
          }
      });
      
                
      • beforeSend

        Type:
        function
        Default:
        null

        A callback to be invoked right before the request is send to the server. Extends beforeSend callback of jQuery.ajax's options object.

      • withCredentials

        Type:
        bool
        Default:
        false

        The value is applied to XmlHttpRequest.withCredentials if supported by the user agent.
        Setting this property to true will allow IE8/IE9 to make authenticated cross-origin requests to tusted domains through XmlHttpRequest instead of XDomainRequest
        and will prompt the user for credentials.

    • rows

      Type:
      string
      Default:
      null

      A list of hierarchy names separated by comma (,). These will be the hierarchies in the rows of the data source.

    • serverUrl

      Type:
      string
      Default:
      null

      Optional="false" The URL of the XMLA server.

The current widget has no events.
  • addColumnItem

    .addColumnItem( columnItem:object );

    Adds a hierarchy to the columns of the pivot grid.

    • columnItem
    • Type:object
    • An object of type $.ig.Hierarchy which is the hierarchy to add in the pivot grid columns.
  • addFilterItem

    .addFilterItem( filterItem:object );

    Adds a hierarchy to the filter axis of the pivot grid.

    • filterItem
    • Type:object
    • An object of type $.ig.Hierarchy which is the hierarchy to add.
  • addFilterMember

    .addFilterMember( hierarchyUniqueName:string, memberUniqueName:string );

    Adds a member to list of filter members that will be present in result.
    If a member of given hierarchy is added to this filter list then only those members which are present in this filter list will be present for that hierarchy in the result.

    • hierarchyUniqueName
    • Type:string
    • The unique name of the hierarchy this member belongs to.
    • memberUniqueName
    • Type:string
    • The unique name of the member to be added.
  • addMeasureItem

    .addMeasureItem( measureItem:object );

    Adds a measure to the measures of the pivot grid.

    • measureItem
    • Type:object
    • An object of type $.ig.Measure which is the measure to add.
  • addRowItem

    .addRowItem( rowItem:object );

    Adds a hierarchy to the rows of the pivot grid.

    • rowItem
    • Type:object
    • An object of type $.ig.Hierarchy which is the hierarchy to add in the pivot grid rows.
  • catalog

    .catalog( );
    Return Type:
    object
    Return Type Description:
    An object of type $.ig.Catalog which is the currect catalog.

    Retrieves the current catalog in the data source.

  • catalogs

    .catalogs( );
    Return Type:
    array
    Return Type Description:
    An array of $.ig.Catalog objects.

    Retrieves the currently loaded catalogs in the data source.

  • clearPendingChanges

    .clearPendingChanges( );

    Clears all pending changes since last time the update() method is called.

  • collapseTupleMember

    .collapseTupleMember( axisName:string, tupleIndex:number, memberIndex:number );

    Sets a tuple member to be collapsed next time the update() method is called.
    Calling this method on an already collapsed member does nothing.

    • axisName
    • Type:string
    • The name of the axis for the tuple.
    • tupleIndex
    • Type:number
    • The index of the tuple in the axis.
    • memberIndex
    • Type:number
    • The index of the member in the tuple.
  • columnAxis

    .columnAxis( );
    Return Type:
    array
    Return Type Description:
    An array of objects of type $.ig.Hierarchy or $.ig.MeasureList.

    Returns the items in the column axis.

  • cube

    .cube( );
    Return Type:
    object
    Return Type Description:
    An object of type $.ig.Cube which is the currect cube.

    Retrieves the current cube in the data source.

  • cubes

    .cubes( );
    Return Type:
    array
    Return Type Description:
    A array of $.ig.Cube objects.

    Retrieves the currently loaded cubes in the data source.

  • expandTupleMember

    .expandTupleMember( axisName:string, tupleIndex:number, memberIndex:number );

    Sets a tuple member to be expanded next time the update() method is called.
    Calling this method on an already expanded member does nothing.

    • axisName
    • Type:string
    • The name of the axis for the tuple.
    • tupleIndex
    • Type:number
    • The index of the tuple in the axis.
    • memberIndex
    • Type:number
    • The index of the member in the tuple.
  • filters

    .filters( );
    Return Type:
    array
    Return Type Description:
    An array of objects of type $.ig.Hierarchy.

    Returns the items in the filter axis.

  • getCoreElement

    .getCoreElement( predicate:function, elementType:object );
    Return Type:
    object
    Return Type Description:
    A $.ig.ICoreOlapElement of specified type or null.

    Gets the first element of the specified elementType which matches the specified predicate or null if there is no such element found.

    • predicate
    • Type:function
    • A predicate callback invoked against each core element of the specified type. It has to return true when the element has matched the serach criteria, otherwise - false.
    • elementType
    • Type:object
    • An object specified by $.ig.ICoreOlapElement.prototype.$type property. Valid types which prototype can be examined are: $.ig.Dimension, $.ig.Hierarchy, $.ig.Level, $.ig.Measure and $.ig.MeasureList.
  • getCoreElements

    .getCoreElements( predicate:function, elementType:object );
    Return Type:
    object
    Return Type Description:
    An array of $.ig.ICoreOlapElement objects of specified type or empty array.

    Gets an array with elements of the specified elementType which match the specified predicate or empty array if there is no such element found.

    • predicate
    • Type:function
    • A predicate callback invoked against each core element of the specified type. It has to return true when the element has matched the serach criteria, otherwise - false.
    • elementType
    • Type:object
    • An object specified by $.ig.ICoreOlapElement.prototype.$type property. Valid types which prototype can be examined are: $.ig.Dimension, $.ig.Hierarchy, $.ig.Level, $.ig.Measure and $.ig.MeasureList.
  • getDimension

    .getDimension( dimensionUniqueName:string );
    Return Type:
    object
    Return Type Description:
    A $.ig.Dimension object or null.

    Returns $.ig.Dimension object for the specified unique name.

    • dimensionUniqueName
    • Type:string
    • The unique name of the searched dimension object.
  • getFilterMemberNames

    .getFilterMemberNames( hierarchyUniqueName:string );
    Return Type:
    array
    Return Type Description:
    An array of string objects.

    Returns an array of strings with the unique names of selected for given hierarchy filter members.

    • hierarchyUniqueName
    • Type:string
    • The unique name of the hierarchy whose active filter members are returned.
  • getHierarchy

    .getHierarchy( hierarchyUniqueName:string );
    Return Type:
    object
    Return Type Description:
    A $.ig.Hierarchy object or null.

    Returns $.ig.Hierarchy object for the specified unique name.

    • hierarchyUniqueName
    • Type:string
    • The unique name of the searched hierarchy object.
  • getLevel

    .getLevel( levelUniqueName:string );
    Return Type:
    object
    Return Type Description:
    A $.ig.Level object or null.

    Returns $.ig.Level object for the specified unique name.

    • levelUniqueName
    • Type:string
    • The unique name of the searched level object.
  • getMeasure

    .getMeasure( measureUniqueName:string );
    Return Type:
    object
    Return Type Description:
    A $.ig.Measure object or null.

    Returns $.ig.Measure object for the specified unique name.

    • measureUniqueName
    • Type:string
    • The unique name of the searched measure object.
  • getMeasureList

    .getMeasureList( );
    Return Type:
    object
    Return Type Description:
    A $.ig.MeasureList object or null.

    Returns $.ig.MeasureList object available when operates with more than one $.ig.Measure object.

  • getMembersOfHierarchy

    .getMembersOfHierarchy( hierarchyUniqueName:string );

    Returns Promise which on completion provides an array of $.ig.OlapResultAxisMember objects of selected for given hierarchy filter member.

    • hierarchyUniqueName
    • Type:string
    • The unique name of the member whose active filter members are returned.
  • getMembersOfLevel

    .getMembersOfLevel( levelUniqueName:string );

    Returns Promise which on completion provides an array of $.ig.OlapResultAxisMember objects of selected for given level filter member.

    • levelUniqueName
    • Type:string
    • The unique name of the member whose active filter members are returned.
  • getMembersOfMember

    .getMembersOfMember( memberUniqueName:string );

    Returns Promise which on completion provides an array of $.ig.OlapResultAxisMember objects that are children of the current member.

    • memberUniqueName
    • Type:string
    • The unique name of the member whose active filter members are returned.
  • initialize

    .initialize( );

    Initializes the data source and returns a promise that will be resolved once the data source is initialized.
    The promise's result will be the metadata tree for the catalog/cube/measureGroup specified in the settings or null if the settings do not provide a valid cube initialization data.
    The data source is not functional until it has been initialized and all other methods other than initialize() will throw an error if isInitialized() returns false.

  • isInitialized

    .isInitialized( );
    Return Type:
    bool
    Return Type Description:
    True if the data source has been initialized, otherwise - false.

    Retrieves the initialization state of the data source.

  • isModified

    .isModified( );
    Return Type:
    bool
    Return Type Description:
    True if the data source has been modified since last time update() methos is called, otherwise false.

    Indicates whether the data source is modified.

  • isUpdating

    .isUpdating( );
    Return Type:
    bool
    Return Type Description:
    True if the update() method execution is in progress, otherwise false.

    Indicates whether the update() method execution is in progress.

  • measureGroup

    .measureGroup( );
    Return Type:
    object
    Return Type Description:
    An object of type $.ig.MeasureGroup which is the currect measure group.

    Retrieves the current measureGroup in the data source.

  • measureGroups

    .measureGroups( );
    Return Type:
    array
    Return Type Description:
    An array of $.ig.MeasureGroup objects.

    Retrieves the currently loaded measure groups in the data source.

  • measures

    .measures( );
    Return Type:
    array
    Return Type Description:
    An array of objects of type $.ig.Measure.

    Returns the items in the measures axis.

  • metadataTree

    .metadataTree( );
    Return Type:
    object
    Return Type Description:
    An object of type $.ig.OlapMetadataTreeItem which is the root node of the metadata tree.

    Returns the fully loaded metadata tree.

  • removeAllFilterMembers

    .removeAllFilterMembers( hierarchyUniqueName:string );

    Removes all members from the list of filter members and the filter for the specified hierarchy is cleared.

    • hierarchyUniqueName
    • Type:string
    • The unique name of the hierarchy which filter members to be cleared.
  • removeColumnItem

    .removeColumnItem( columnItem:object );

    Removes a hierarchy or the measure list from the columns of the pivot grid.

    • columnItem
    • Type:object
    • An object of type $.ig.Hierarchy or $.ig.MeasureList which is the hierarchy to remove or the measure list if there are more than one measures added and the measure list location is set to "columns".
  • removeFilterItem

    .removeFilterItem( filterItem:object );

    Removes a hierarchy from the filter axis of the pivot grid.

    • filterItem
    • Type:object
    • An object of type $.ig.Hierarchy which is the hierarchy to remove.
  • removeFilterMember

    .removeFilterMember( hierarchyUniqueName:string, memberUniqueName:string );

    Removes a member from the list of filter members that will be present in result.

    • hierarchyUniqueName
    • Type:string
    • The unique name of the hierarchy this member belongs to.
    • memberUniqueName
    • Type:string
    • The unique name of the member to be removed.
  • removeMeasureItem

    .removeMeasureItem( measureItem:object );

    Removes a measure from the measures of the pivot grid.

    • measureItem
    • Type:object
    • An object of type $.ig.Measure which is the measure to remove.
  • removeRowItem

    .removeRowItem( rowItem:object );

    Removes a hierarchy or the measure list from the rows of the pivot grid.

    • rowItem
    • Type:object
    • An object of type $.ig.Hierarchy or $.ig.MeasureList which is the hierarchy to remove or the measure list if there are more than one measures added and the measure list location is set to "rows".
  • result

    .result( );
    Return Type:
    object
    Return Type Description:
    An object of type $.ig.OlapResult which represents the result returned by XMLA service.

    Returns the result from the last update or null if the last update was unsuccessful.

  • rowAxis

    .rowAxis( );
    Return Type:
    array
    Return Type Description:
    An array of objects of type $.ig.Hierarchy or $.ig.MeasureList.

    Returns the items in the row axis.

  • setCatalog

    .setCatalog( catalogName:string );

    Sets the current catalog for the data source and updates the cubes() and catalog() properties.

    • catalogName
    • Type:string
    • The name of the catalog.
  • setCube

    .setCube( cubeName:string );

    Sets the current cube for the data source and updates the cube(), measureGroup() and metadataTree() properties.

    • cubeName
    • Type:string
    • The name of the cube.
  • setMeasureGroup

    .setMeasureGroup( measureGroupName:string );

    Sets the current measure group for the data source and updates the measureGroup() and metadataTree() properties.
    Even though the catalogs/cubes/measureGroups items are cascading(e.g. in order to load the cubes a catalog has to be set) in order to construct the metadata tree a measure group is not required as it just filters the resulting metadata.
    Once setCube(cubeName) is called the metadata tree would be loaded and the measureGroup() property would be filled with the default '(All)' measure group which indicates that no measure group is selected.

    • measureGroupName
    • Type:string
    • The name of the measure group.
  • setMeasureListIndex

    .setMeasureListIndex( index:number );

    Sets the index at which the measure list will be positioned in the rows/columns it resides.

    • index
    • Type:number
    • The index where measure list to appear.
  • setMeasureListLocation

    .setMeasureListLocation( location:object );

    Sets the location of the measure list.

    • location
    • Type:object
    • Accepted values are 'rows' and 'columns'.
  • update

    .update( );

    Performs an update with the list of pending changes and updates the data source result.

Copyright © 1996 - 2024 Infragistics, Inc. All rights reserved.

#