2 weeks ago
Is there a way I can check my source records before importing data into a stage? If I am in a workflow for Import, Validate and Load, Even before the data is imported, I would like to check my source record for a condition like if it is less than a particular value. Only if the condition satisfies, I need to proceed to import else stop the workflow.
If someone has done it, can you share the setup and code for the same.
Appreciate your help!
a week ago
Hi, you can write a Parser Rule, it will run when you Import data. You create your rule and you call it in the Data Source like this:
a week ago
Thanks! I will try it. Is there a way that we can also write error email function in parser rule or call an extender rule from parser rule? I need to send an error email if source condition does not satisfy. Would really appreciate your help
a week ago
Yes, you can send an email. I see 2 options
I posted a blog on how to log with a file and send the file via email, I hope it helps!
Log like a champ with OneStream - OneStream Community (onestreamsoftware.com)
a week ago
Is this a file load or a direct connect import?
It sounds to me that you are asking for a check before import to evaluate if it should even bother with the import at all
So, if using a file based import a parser rule is good for such a thing, a parser rule is a rule that will run on a record by record basis and is already part of the import, so your import would have already started when it runs, and it will evaluate each record on its own merit. This works fine if the evaluation you want to perform is on the first line, but for anything else it will likely import some items and some not using this method.
If you are using a direct connect method, you can evaluate the dataset you are wanting to import before even initiating the import at all, and you would need to do this in the connector business rule. Alternatively, if its connector based you could even make it a requirement for the data to even be returned at all if the criteria is not satisfied (saving the time needed to even transfer any data in the first place) by using a where clause (for SQL) or parameter if using an API.
Joakim