Skip to content
+1-888-319-3663

COMMUNITY FORUM

CSV/Data import into sql using SmartConnect

Mike Tsui asked 1 year ago
Hi,
I’m working on importing data into sql and eventually into GP,   so doing some validation processing before it hits GP in sql.    I’m able to import & test out running store procedures on the data.   Is there any way to handle error codes from sql error into SmarConnect ?  Thanks
Answers
Patrick Roth Staff answered 1 year ago
So you are reading source data in and then sending to a “stored procedure” as the destination.  Since SC onprem currently only supports one proc as the destination, if you are using multiple then you are using an ‘after document’ task and executing it yourself or possibly using multiple maps.
Again assuming SQL proc dest – not sure how you can really “handle” the errors being returned from your proc.
SmartConnect will log the error for you, but from a SC point of view, you would have fallen into the “after document fail” loop.  So you should be able to get the error back in the GlobalLastError variable.  So at that point, you could use a script or task to do something or run another map.  But for THIS document on the running map, there isn’t any more branches you can take other than the ‘document failed’ task that is executing.
I suppose I would be able to add more if I knew what you wanted to do to “handle” the error codes.

If you would like to submit an answer or comment, please sign in to the eOne portal.