Quantcast
Viewing all articles
Browse latest Browse all 16689

Update cell value into database and cube cache

There is very simple task - change cell value in fact table and cube cache.
I try by this code

OlapConnection olapConnection = getConnection();
olapConnection.setScenario(olapConnection.createScenario());
OlapStatement olapStatement = olapConnection.createStatement();
try
{
CellSet cell = olapStatement.executeOlapQuery(select [Measures].[m1] on 0 from [
Cube] where CrossJoin([Countries].[Countries.Name].[0], [Time].[Time.Hierarchy].[1997]));
Cell c = cell.getCell(0);
c.setValue(666, AllocationPolicy.EQUAL_INCREMENT);
}
finally
{
olapStatement.close();
}



olapStatement = olapConnection.createStatement();

CellSet cell = olapStatement.executeOlapQuery(select [Measures].[m1] on 0 from [Cube] where CrossJoin([Countries].[Countries.Name].[0], [Time].[Time.Hierarchy].[1997]));
Cell c = cell.getCell(0);


=> this cell return the old value and there are no changes to the database((.

How to change cell value ?

Viewing all articles
Browse latest Browse all 16689

Trending Articles