Forum Discussion

Kashinath's avatar
Kashinath
New Contributor II
11 months ago

Load Excel File from FileShare to Cube through a Workflow Profile

Hi,

I have a (.csv) file in my File Share Folder that I want to read and load into the cube using a Workflow Profile. I have written an extensibility rule for getting that file and reading the file contents and creating a Data Table. now what should I do next? Is this the right approach or is there any other way to accomplish this? Below is the code of the Extensibility rule.

Thanks

  • JackLacava's avatar
    JackLacava
    Honored Contributor

    Look at the "Connector Rule" section in this page https://documentation.onestream.com/release_8.1/Content/Design%20and%20Reference/Application%20Tools/Business%20Rule%20Types.html

    As mentioned by MarcusH  though, this is not a great approach for the simple case. I'd try to set it up as a Delimited File source instead, and use Batch Processing to automate the actual collection. Connectors are really for situations where Delimited/Fixed/Matrix file loads are not possible - e.g. direct db or ERP connections.

  • MarcusH's avatar
    MarcusH
    Contributor III

    You want to load the data directly to the Cube rather than go through Staging which means that your choices are limited. The standard route for loading data into the Cube is via Excel either using the add-in with XFSet or one of the template options. I think the XFF template is probably closest to what you want but you will probably have to set up a form as a target for the template. You will also need to convert your csv file into an XLS somehow. And then add a named range for the data. That is not easy but there might other options I don't know about.

    I would avoid the load direct to the cube. I would load the csv into the stage and automatically process that into the cube. OneStream has plenty of options for an automatic load and process. The work you will need to do is create the Data Source and Maps but they are straightforward. Then you just automate the load - GolfStream has examples.

    HTH

  • Steven's avatar
    Steven
    Contributor II

    Kashinath - You can use the "api.Parser.ProcessDataTable(si, dataTable, true, processInfo)" method to load a datatable into a workflow within a connector business rule that is referenced from your datasource.