Task Errors
I have a task that runs before each document and does a check to make sure the “code” is > 0. If it fails, it doesn’t import, which is good, but how do I get the entire line (data is from a csv file) written out to an error file that I can then put in a directory for someone to check?Is it faster to do checks via a script or SQL command? just thinking about maybe just putting the data in sql first, then run another map that does some validation, writes errors into a file or update the sql table with a code for reporting later….
any suggestions would be greatly appreciated.Thanks, Dan
any suggestions would be greatly appreciated.Thanks, Dan
Answers
Dan,
You could create a Script Task on Document Failure that uses .NET code to write the data out to a file or even insert the data into a SQL table. In the Script Task, you have access to all of the Source Columns so it would just be writing that .NET code to open the file, write a new line and then close the file.
I don’t think there would be a huge difference in writing to a SQL table or file, it would depend on your level of experience of writing the code to do that.
You could create a Script Task on Document Failure that uses .NET code to write the data out to a file or even insert the data into a SQL table. In the Script Task, you have access to all of the Source Columns so it would just be writing that .NET code to open the file, write a new line and then close the file.
I don’t think there would be a huge difference in writing to a SQL table or file, it would depend on your level of experience of writing the code to do that.
are there any examples of this type of script. The 3 examples that come with the smart connect install doesn’t include one to open or create a file, write to it and close it.
how else could I learn some basic scripting to help with smart connect?