Skip to main content
July 29, 2022
Solved

ClearStageData

  • July 29, 2022
  • 2 replies
  • 0 views

Hi,

I'd like to use the ClearStageData function within a business rule.

I am already successfully using other similar functions like ExecuteParseAndTransform or LoadCube.

This is the sample given within OneStream: Dim objLoadTransformProcessInfo As LoadTransformProcessInfo = BRApi.Import.Process.ClearStageData(si, wfClusterPk, sourceId)

 

The issue I have with the ClearStageData function is that I don't understand what I should pass as sourceId. Can any of you clarify it or point me to any relevant documentation?

Thank you

Best answer by ChristianW

This:

ChristianW_2-1659107749582.png

 

 or

ChristianW_1-1659107669759.png

it is just a string ("All" or "" might work as well, but I didn't try it).

 

2 replies

July 29, 2022

I would recommend reviewing the Source ID concept in the Design and Reference Guide.  The Source ID is determined by the value set in the Data Source and is populated for each data record during the Import process in Stage.   

TonyToniTone_0-1659107127363.png

In most cases, data records loaded to the Staging tables are transformed and validated prior to loading to the Cube. If you clear out the data records in Stage, it doesn't mean that you clear data from the Cube.  You break the link between the data records from the Stage to the Finance Engine.  Therefore, you have data in the Cube but no audit back to the data records in Stage that make up that Cube data.  Not sure how you plan on using this function but something to keep in mind

AndreaFAuthor
August 1, 2022

Thank you for your reply. I plan to use the function as a preliminary step before using the ExecuteParseAndTransform function within an extensibility rule.

July 29, 2022

This:

ChristianW_2-1659107749582.png

 

 or

ChristianW_1-1659107669759.png

it is just a string ("All" or "" might work as well, but I didn't try it).

 

June 7, 2023

HEllo

I can confirm as I try to do the same thing, for SourceID you have to use "" (I'm trying this) or maybe string.empy (not tested) . And it works pretty fine if you have multiple files loaded in you stage aera