cube

Gets or sets the current cube name.

Parameters

name String

The name of the cube.

Returns

String—The current cube name.

Example - set the cube

<script>
var dataSource = new kendo.data.PivotDataSource({
  type: "xmla",
  columns: ["[Date].[Calendar]"],
  transport: {
    connection: {
        catalog: "Adventure Works DW 2008R2"
    },
    read: "https://demos.telerik.com/olap/msmdpump.dll"
  },
  schema: {
    type: "xmla"
  }
});

dataSource.cube("Adventure Works");

dataSource.fetch();
</script>

Example - get the cube name

<script>
var dataSource = new kendo.data.PivotDataSource({
  type: "xmla",
  columns: ["[Date].[Calendar]"],
  transport: {
    connection: {
        catalog: "Adventure Works DW 2008R2",
        cube: "Adventure Works"
    },
    read: "https://demos.telerik.com/olap/msmdpump.dll"
  },
  schema: {
    type: "xmla"
  }
});

var cubeName = dataSource.cube();
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(cubeName);// prints "Adventure Works"
</script>
In this article