The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
OSAdmin
OneStream Employee
6 years agohas anyone done data import/validate/load automation using the connector business rule?
Originally posted by Ashok Amresh
We are loading data using SQL connector business rule and it works fine manually. looking for a way to load it automatically using a extender business rule and then calling from DM step. has any one done this? can you share sample code if possible?
5 Replies
- OSAdmin
OneStream Employee
Originally posted by Frank Dossinghi Ashok,
you can trigger a workflow load by using the BRApi method as below:
If BRApi.Import.Process.ExecuteParseAndTransform(si, wfUnitClusterPk,Nothing,Nothing,TransformLoadMethodTypes.Replace,sourceDataOriginTypes.FromDirectConnection,False).Status = WorkflowStatusTypes.Completed ThenThere are methods for import, validate and load.
So setup a function that triggers a specific workflow, then you can call that function from a DM.
- OSAdmin
OneStream Employee
Originally posted by Krishna SrinivasanThanks. I am new to OS and could you please explain what is wfUnitClusterPk ? how to pass the values. If you have an example that would be great.
Krishna
- OSAdmin
OneStream Employee
Originally posted by Krishna SrinivasanThanks. I am new to OS and could you please explain what is wfUnitClusterPk ? how to pass the values. If you have an example that would be great.
Krishna
- OSAdmin
OneStream Employee
Originally posted by Krishna SrinivasanI am new to OS and I was able to find how to call the Execute & Transform using si.WorkflowClusterPk this will work. To start with you can use this code but I am working on dynamically selecting the values. The below code will give you an idea.
Dim SourceDataOrginTypes As String = sourceDataOriginTypes.FromDirectConnection
Dim TransformLoadMethodTypes1 = TransformLoadMethodTypes.ReplaceAllTime
Dim objLoadTransformProcessInfo As LoadTransformProcessInfo = BRApi.Import.Process.ExecuteParseAndTransform(si,si.WorkflowClusterPk,Nothing,Nothing,TransformLoadMethodTypes1,SourceDataOrginTypes,False)
Krishna
- kbonNew Contributor
Hello,
am trying to use this code above for my dev (same objective : automate the import workflow ) but doesn't work for me ... it seems like the system doesn't recognize the wfclusterpk and doesn't launch the import process and finish by failing )Dim wfClusterPk As WorkflowUnitClusterPk = api.SI.WorkflowClusterPk
Dim SourceDataOrginTypes1 As String = sourceDataOriginTypes.FromDirectConnectionDim TransformLoadMethodTypes1 = TransformLoadMethodTypes.ReplaceAllTime
Dim objTaskActivityItem As TaskActivityItem = BRApi.Utilities.ExecuteDataMgmtSequence(si, "Test_Import", Nothing)
Dim objLoadTransformProcessInfo As LoadTransformProcessInfo = BRApi.Import.Process.ExecuteParseAndTransform(si, WfClusterPk,Nothing,Nothing,TransformLoadMethodTypes.Replace,SourceDataOrginTypes1,False)
If objLoadTransformProcessInfo.Status = WorkflowStatusTypes.Completed Then
Return objTaskActivityItem
End If
can you please check the code above and help ? thank youalso should we add it on the extender BR or finance module ?
Related Content
- 9 months ago
- 15 days ago