Skip to main content
Member
Feb 21, 2023 2:44 PM UTC
Solved

Direct Load Automation

Hello Everyone,

We have been using ExecuteFileHarvestBatch to automate our Data Loads. However I could not make it work for Direct Load profiles.

Is anyone aware if we have api support to automate Direct Loads?

hirenAnswer
Member
Feb 22, 2023 3:04 PM UTC

Apologies. 
BRApi.Utilities.ExecuteFileHarvestBatch works for Direct Load as well. The issue was due to a different piece of code that tried to clear stage data for Direct Load Workflow Profile.

Thanks!

9 replies

Member
Feb 21, 2023 6:33 PM UTC

I always try not to use the batch harvester. I've always used the import process API calls to do it. Look at https://community.onestream.com/topic/show?tid=1869&fid=9

 

Contributor
Feb 21, 2023 7:37 PM UTC

Any specific reason to stay away from the batch harvester?

Member
Feb 21, 2023 7:39 PM UTC

Earlier, the files and folders created by the batch harvester cannot be deleted. I guess there is some utility I saw during Wave that can do it. Then there is an issue with file locks and it will not work when there are file locks.

hirenAuthor
Member
Feb 22, 2023 5:07 AM UTC

Thanks for taking the time to respond.

I am indeed searching for Direct Load process API but could not see anything around Direct Load WFP within api viewer,

Screenshot 2023-02-22 at 10.33.04 AM.png

Screenshot 2023-02-22 at 10.28.49 AM.png

 

 

 

 

 

 

 

Do let me know if I am missing something. 

Thanks,
Hiren

Contributor
Feb 22, 2023 8:24 PM UTC

If you look in the link to the other post, this call:
Dim ImportInfo As LoadTransformProcessInfo = BRApi.Import.Process.ExecuteParseAndTransform(si, wFClusterPk, "", Nothing, TransformLoadMethodTypes.Replace, SourceDataOriginTypes.FromDirectConnection, False)

references to use the ".FromDirectConnection" which I believe is the one you're looking for

hirenAuthor
Member
Feb 23, 2023 4:37 AM UTC

Thanks Frank, let me try that one!

hirenAuthorAnswer
Member
Feb 22, 2023 3:04 PM UTC

Apologies. 
BRApi.Utilities.ExecuteFileHarvestBatch works for Direct Load as well. The issue was due to a different piece of code that tried to clear stage data for Direct Load Workflow Profile.

Thanks!