This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have a requirement. When a row is being written to a database table and right truncation error occurs, Alteryx pops out the message that right truncation has occurred. I want to capture which particular field in that row is causing the truncation error. Is that possible??
Read in that table as an input in that same workflow. Then, use a field info on it. This will tell you the field length of each field.You can then do the same with the other stream that loads to the database. Join the two field info tools together on name and length, then you will find the difference.
Like @Inactive User said, alteryx gives you the error whenever you exceed the designated field lenght. It also tells you which column has the error.
A way to overcome this is to use the select tool and change the length value.
But if you want to know which row has the error it won't tell it to you. A trick to get to know it would be to use the 'Record ID' tool and add it to the specific field (first the ID then the record). That way you will be able to tell the specific rows that are affected.
Thanks everyone for your inputs. That sounds good. Next step, is there any way that I can softly handle the error rows i.e re-route them to a file without having to write that into database so that the error does not occur at all. I need to capture if any non null fields are null, if any field exceeds its designated length etc.
I would suggest you to use for those cases a filter function (or many). For example, use the first filter for null values < IF IsNull([Field1])..... >, the second to check the length < len([Field1]) <= 'X' > etc. That would be the easiest way.