Impossible to Incrementally update a cube using DSO !!! -
06-21-2005
, 09:13 PM
Hi,
As A DTS package the Incremental Update works fine. I must use DSO
because we cannot install Analysis Services on the SqlServer platform.
I am using a SourceTableFilter and select only those rows from the fact
table
which exceed the largest ID already stored in the Cube as a measure.
One of my dimensions is a DateTime and I cannot merge the tmp partition
to the actual partition.
This is the error as received from running "cscript
IncrementalUpdate.vbs"
D:\AS\IncrementalUpdate.vbs(56, 5) ~Cloned MyOLAP Data: 0x8004005D
IncrementalUpdate.vbs code Starts here:
Dim dsoServer
Dim dsoDB
Dim dsoCube
Dim dsoPartition
Dim dsoClonePartition
Dim dsoAgg
Dim dsoAggSource
Dim tmpPartition
tmpPartition = "~Cloned MyOLAP Data"
' Create DSO object and Connect to the local server.
Set dsoServer = CreateObject("DSO.Server")
dsoServer.Connect "localhost"
' Set up the MDStore objects:
' database, cube, and partition.
Set dsoDB = dsoServer.MDStores.Item("PMS")
Set dsoCube = dsoDB.MDStores.Item("MyOLAP")
Set dsoPartition = dsoCube.MDStores("MyOLAP")
' Create a temporary partition to store the new data.
' Use the tilde character to indicate to the server
' that the partition is not permanent.
Set dsoClonePartition = dsoCube.MDStores.AddNew(tmpPartition)
' Clone the main partition to the temporary one.
dsoPartition.Clone dsoClonePartition, cloneMinorChildren
' Clone the Aggregations
For Each dsoAggSource In dsoPartition.MDStores
Set dsoAgg =
dsoClonePartition.MDStores.AddNew(dsoAggSource.Nam e,sbclsRegular)
dsoAggSource.Clone dsoAgg
Next
' Set the SourceTableFilter property.
dsoClonePartition.SourceTableFilter = "UpdateID > (SELECT * FROM
OPENQUERY(PMSCUBE,'SELECT Max(Measures.UpdateID) from MyOLAP'))"
dsoClonePartition.ProcessingKeyErrorLogFileName = "d:\AS\error.log"
dsoClonePartition.Process processFull
dsoPartition.Merge tmpPartition '-THIS IS THE LINE THE ERROR
COMPLAINS ON !
' Close the server object and exit the subroutine.
dsoServer.CloseServer
End code here.
thanks
bill |