Forum Discussion

AndreaF's avatar
AndreaF
Contributor III
3 years ago

ClearStageData

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

  • This:

     

     or

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

     

  • 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.   

    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

    • AndreaF's avatar
      AndreaF
      Contributor III

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

  • ChristianW's avatar
    ChristianW
    Valued Contributor

    This:

     

     or

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

     

    • EricM's avatar
      EricM
      New Contributor II

      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