Checking for a 1000 separator in the source file

TimVierhout
New Contributor III

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

1 ACCEPTED SOLUTION

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

View solution in original post

5 REPLIES 5

JackLacava
Community Manager
Community Manager

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
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

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

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