LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Spliting data into many outputs

    Employee
    Posted 07-25-2010 22:51

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: TheBishop

    Hi,

    I am trying to find a better way of spliting outputs, currently I have
    output "outputname1" {
    emit *
    where outputName == "outputname1"
    }
    ...
    output "outputname50" {
    emit *
    where outputName = "outputname50"
    }

    which works fine however it does take a very long time to run.
    I have tried a two alternatives that I haven't been able to get working

    while not(lastInGroup)
    {
    do output outputName
    {
    emit *
    }
    execCount = execCount + 1
    }

    or

    outputName.switch(
    "outputname1", do output "outputname1" { emit * },
    ...
    "outputname49", do output "outputname49" { emit * },
    do output "outputname50" { emit * })

    Is there any way to split the data in 50 or so outputs based the data in the field "outputName"? (The number and names of the outputs are fixed)


  • 2.  RE: Spliting data into many outputs

    Employee
    Posted 07-26-2010 14:13

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: mmarinelli

    Before I answer your question, could you provide some more context as to why you have a node with so many outputs? I ask because the solution to your problem differs depending on the use case. For example, generating 50 output files requires a different solution from generating 50 random subsets of a data stream. Thanks.


  • 3.  RE: Spliting data into many outputs

    Employee
    Posted 07-26-2010 14:22

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: TheBishop

    I have 50 Networks each with different pricing methodologies so the data needs to be split from a combined output in our systems.


  • 4.  RE: Spliting data into many outputs

    Employee
    Posted 07-26-2010 15:57

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: mmarinelli

    If you're trying to split the source data into multiple output streams based upon some field value within the data, then you are employing the only technique available within BRAINscript. While it would seem that the "do output" construct would allow you to emit a record on a variable output, this statement requires that the output name/index be a static value, so it cannot be used this way.


  • 5.  RE: Spliting data into many outputs

    Employee
    Posted 07-26-2010 18:14

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: TheBishop

    Thanks for letting me know, I'll stop looking for a more effective way.