Results 1 to 7 of 7

Thread: Dynamic Outputs (Creating multiple dynamic output files from one data source)

  1. #1

    Default Dynamic Outputs (Creating multiple dynamic output files from one data source)

    Hi All,

    For a long time many of the customers I have engaged with have asked is it possible to create multiple output files from one data source dynamically, without having to explicitly define the outputs.

    NB This following example is specific to the desktop version of LAE, this issue can be solved using the Execute BRX Node on the server Version

    So for example we have a set of results that are defined by "Region" eg North, South, East, West. In the past we have had to define four outputs for each one of these regions. If a new region suddenly appeard, eg. Central, the graph would have to be changed to cope with the extra output.

    We now have a solution to this problem due to the introduction of the Do While and Do While Conditional nodes. The Do While nodes execute user defined BrainScript and passes the result to an optional sub-graph, looping while the specified condition is met.

    I have developed three nodes to show how we can achieve Dynamic outputs. Both nodes will output multiple excel spreadsheets base on the parameters entered;

    Node 1 (Output To Multiple Excel Files By Record Count) accepts a value determining the number of files the user wishes to output. The node calulates the total number of records and then determines how many records should be allotted to each of the output files. The output file names will be based on the Root File Name parameter, with a file number appended to the file name

    For a file containing 1000 records (such as seen in the attached graph) and a user specified Root File Name of c:\files\customer_data.xlsx, and a number of files specified as 10,
    10 files will be out put with the file names ranging from c:\files\customer_data_1.xlsx to c:\files\customer_data_10.xlsx each containing 100 records.

    Node 2 (Output To Multiple Excel Files By Group) accepts a Group (one or more field(s)) that the files should be segmented by. The output files will be based on the Root File Name parameter, with the values of the group fields appended to the file name.

    eg for data to be grouped by "Region" eg North, South, East, West, 4 files will be output with the filenames c:\files\customer_data_North.xlsx, c:\files\customer_data_South.xlsx etc. each containing the records pertaining to that particular region.

    Node 3 is Node 2 but with emailing capabilities. Each group must have an associated valid email address, as can be seen in the static data node

    These nodes are a work in progress please feel free to put them through there paces and suggest any additional functionality you believe may be useful.
    Attached Files Attached Files
    Last edited by Michael.Slowey@lavastorm.; 12-05-2014 at 07:03 PM.

  2. #2



    can please provide the library also because when i 'm opening the graph in the composite some nodes are not valid - for eg do while node
    Last edited by gabygyy; 07-27-2015 at 07:54 AM.

  3. #3
    Lavastorm Employee
    Join Date
    Apr 2014
    Boston, MA


    Are you on 5.0? The 'Do While' node was introduced in 5.1 (part of the core library).

  4. #4


    i'm using 4.6.1, this is the reason for node mising.

  5. #5


    Old thread - bumping with questions!

    Can this be converted to work with a multi tab excel? the excel in the attached grp seems to be custom?

    Im looking at the code (and being new) I dont understand it lol
    Id LOVE to figure out how this works!

  6. #6
    Lavastorm Employee stonysmith's Avatar
    Join Date
    Nov 2006
    Grapevine Tx


    In a word, yes, but.. it's going to take some work to accomplish it.

    Inside of that loop, the node "Select Records For File" probably needs to change to using the LOOKUP node against each of your input streams to select the proper output records, and then feed those multiple streams into the (tabs) of the ExcelOutput.
    It can be done, but as I said, it's going to take some work.

  7. #7


    ok, let me know when you have finished it...


    im first trying to just isolate the ability to pass in a variable from the data...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts