IDataCubeServiceBuildDataWarehouseAsync Method

Starts the build of the data warehouse for the specified data cube.

Namespace:  Dundas.BI.Entities.DataCubes
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.4.0.1000)
Syntax
Task BuildDataWarehouseAsync(
	Guid dataCubeId
)

Parameters

dataCubeId
Type: SystemGuid
The data cube ID.

Return Value

Type: Task
A task representing the asynchronous operation.
Exceptions
ExceptionCondition
ArgumentExceptiondataCubeId is Empty.
NotFoundExceptionThe data cube could not be found.
NoPrivilegeException None of the following conditions have been met:
  1. The caller has Write access to the data cube and the caller's seat kind is Developer.
  2. The caller is a system administrator.
  3. The caller is a tenant administrator for the tenant associated with the data cube.
  4. The caller is a project administrator for the data cube's project.
InvalidSessionExceptionThe caller context is not associated with a valid session.
Examples

This example demonstrates how to get a data cube, set the data cube storage to "warehouse", and then build the data warehouse for the data cube.

C#
using Dundas.BI;
using Dundas.BI.AccountServices;
using Dundas.BI.Entities.DataCubes;
using Dundas.BI.FileSystem;
using Dundas.BI.Services;
using Dundas.BI.Scheduling;

using System.Threading.Tasks;
using System.Collections.ObjectModel;

   ...

/*
// Note:
// This example assumes that the Dundas BI Engine already has started, and the calling user has logged on.*/


// The data cube ID.
Guid dataCubeId = new Guid("be130c8d-88b1-4332-a373-a3a0dd7b0485");

// Get the data cube service.
IDataCubeService dataCubeService = Engine.Current.GetService<IDataCubeService>();
// Get the file system service.
IFileSystemService fileSystemService = Engine.Current.GetService<IFileSystemService>();
// Get the job service.
IJobService jobService = Engine.Current.GetService<IJobService>();

// Check out the data cube.
CheckOutResult checkOutResult = fileSystemService.CheckOut(dataCubeId);

// Get the data cube.
var dataCube = dataCubeService.Get(dataCubeId);
// Change the storage type to data warehouse.
dataCube.Storage = StorageType.DataWarehouse;
// Save the data cube.
dataCubeService.Save(dataCube);

// Check-in the data cube.
fileSystemService.CheckIn(dataCubeId, "My CheckInComment");

// Build the data warehouse for the data cube.
Task dataCubeBuildTask = dataCubeService.BuildDataWarehouseAsync(dataCubeId);
See Also