Forum Discussion

TimVierhout's avatar
TimVierhout
New Contributor III
3 years ago

Checking for a 1000 separator in the source file

Hi all,

In our use case, users are uploading data through files into OneStream. Is there a possibility to check if the file have 1000-seperators in the file and block the upload if this is the case? Reason is that within one workflow the 1000 seperators could differ between users and we want to avoid issues in this instance. Ideally we have a parser rule that checks the amount column.

With kind regards,

Tim Vierhout

  • Hello,

    there is webinar recording and pdf in Partner Enablement .

    It covers cool staff for international apps. One is how to use BRString in data sources to dynamically manage separators.

    HTH

  • JackLacava's avatar
    JackLacava
    Honored Contributor

    Set the Logical Operator on your Amount column to Complex Expression, then use the Snippets under Common Parsing -> General - in particular, the "Bypass Importing Lines of Data" one looks like a good candidate to detect unwanted characters.

    I don't know how you'd abort the load completely, you can try with:

     

     Throw new Exception("Bad file")

     

     

  • TimVierhout's avatar
    TimVierhout
    New Contributor III

    Hi Jack,

    in general that would work, however we are checking args.value for the amount column. Once it gets into stage it looks like there the decimal symbol is already removed, so in this case it would not work. Also it could be different based on the user.

    With kind regards,

    Tim

    • franciscoamores's avatar
      franciscoamores
      Contributor II

      Hello,

      there is webinar recording and pdf in Partner Enablement .

      It covers cool staff for international apps. One is how to use BRString in data sources to dynamically manage separators.

      HTH

      • TimVierhout's avatar
        TimVierhout
        New Contributor III

        Hi francisco,

        Yes, this brstring looks very promising! I was not familiar with this functionality. Where would we be able to define such a rule?

         

        With kind regards,

        Tim