SQL Server Integration Services (SSIS) Part 18 - Error handling — Transcript
Full transcript
- 0:00[Music]
- 0:00welcome to the short wisal tutorial on
- 0:03error handling in integration Services
- 0:05here's what we'll cover on the
- 0:07tutorial I'll begin by showing the
- 0:09example we're trying to solve so I'll
- 0:11show what the problem is and then show
- 0:13this proposed
- 0:14solution what we'll then do is look at
- 0:16it recreating the solution in more
- 0:18detail so I'll show how to use error
- 0:20handling to redirect errors and then
- 0:22look at one particular feature of the
- 0:24configure error output dialog box which
- 0:26needs further
- 0:27explanation so let's get started
- 0:30[Music]
- 0:33before we look at error handling let's
- 0:34have a look at the problem I'm trying to
- 0:36solve I've got a table here called TBL
- 0:39Great Britains and if we select the rows
- 0:41in that table you'll see that it
- 0:42contains 10
- 0:44rows there was a series in the UK about
- 0:4710 years ago where people were asked to
- 0:49vote for their greatest Britains and
- 0:51this is a result of the poll there's
- 0:53some quite surprising results I think
- 0:55it's fair to say that few people would
- 0:57think Princess Diana deserved to be the
- 0:59third greatest written of all time I
- 1:01certainly didn't and I'm not sure people
- 1:03like John lenon deserve to be there
- 1:05either and I put the wise how verdict on
- 1:08the right hand
- 1:09side what I want to do is to create a
- 1:11package which will import the data from
- 1:14this SQL Server table but then try
- 1:16truncating this verdict to 25
- 1:19characters six of the records will be
- 1:21fine but four of them won't for example
- 1:25you'll never get the word greatest
- 1:26mathematician ever within 25 characters
- 1:29and what I'm going to do is create a
- 1:30package to handle those errors so let's
- 1:32have a look at
- 1:35that I've got here the final package in
- 1:38a moment we'll create this just to show
- 1:40you where we're trying to go there's a
- 1:42data flow task to import the SQL Server
- 1:45table and then I've got a data
- 1:47conversion tab which will attempt to
- 1:49truncate the characters and what I'm
- 1:51going to do is send the good data down
- 1:53this path and the bow data down this
- 1:55path and if I just run this package to
- 1:57show you the results you'll see this is
- 2:00the first path these are the people
- 2:01where I didn't have to truncate the data
- 2:03because the verdict wasn't 25 characters
- 2:06and if I close down that data view
- 2:08you'll now see the second one you can
- 2:09see Isaac Newt Newton greatest
- 2:11mathematician ever was
- 2:14truncated and you can see in the final
- 2:16output six rows went down the okay data
- 2:19path and four rows went down the
- 2:21truncated data path and what I'm going
- 2:24to do now is show you how we achieved
- 2:28this so two create this package the
- 2:31first thing I need to do is to add a
- 2:33data flow task and if I double click on
- 2:35that within that I'm going to add a
- 2:38source and what the source will do is
- 2:40get its information from the SQL Server
- 2:42table I've got a connection already set
- 2:44up I'll rename it happily I've got
- 2:47something already in my clipboard so
- 2:49it's going to import the allegedly Great
- 2:51Britains I'll configure that and say
- 2:53which table is getting its information
- 2:55from and then what I'm going to do is
- 2:57feed the information from that into a
- 2:58data conversion t task and this is a bit
- 3:01which could go
- 3:03wrong I'll configure the data conversion
- 3:05task to take the wial verdict and what
- 3:08I'm going to do is rename it as
- 3:11truncated
- 3:13verdict and I'm going to try to shorten
- 3:15it to 25
- 3:17characters now the point behind this
- 3:19tutorial is what happens now what I'm
- 3:22going to do is click on this button
- 3:23which is at the bottom left of many of
- 3:25the tasks in ssis and configure my error
- 3:28output there's two types of things I
- 3:30might want to consider one is what
- 3:32happens when there's an error and one is
- 3:34what happens when there's truncation
- 3:36which is considered as a separate error
- 3:39it's probably classified internally as a
- 3:41warning I want to look at truncation and
- 3:43I've got three choices at the moment
- 3:45it's just going to fail I could ignore
- 3:47the fail that sounds a recipe for
- 3:49disaster what I'm going to do instead is
- 3:51to redirect the road on a different
- 3:54pipe I'll look at this bit of the bottom
- 3:56at the end of this
- 3:58tutorial if I then choose okay and okay
- 4:01again I've got a warning there because
- 4:04at the moment it's saying row sent the
- 4:06error output will be lost so I need to
- 4:08put something else in my data
- 4:10flow so what I'm now going to do is to
- 4:13add into this I'll just move that down a
- 4:15bit uh two Union all
- 4:20transforms to mop up the
- 4:22data and then I'll direct the good data
- 4:26the blue arrow into the leftand one and
- 4:29the bad dat data the error data into the
- 4:31right hand one when I do that for some
- 4:34reason it always comes up with this diad
- 4:36box giving me a chance to change my
- 4:38choices but I want to keep what I've got
- 4:39so I'll choose
- 4:41okay what I'll then do is put a data
- 4:43viewer on this right hand path so that
- 4:47when I run the package I'll be able to
- 4:48see what's going down it and you can see
- 4:51there the four rows where the data was
- 4:54truncated so that's how you can
- 4:56configure error handling Within ssis
- 5:00[Music]
- 5:02the last thing I want to do is explain
- 5:04about a feature in the configure error
- 5:06output dial box which I mentioned
- 5:08earlier if I double click on the data
- 5:10conversion task I can then go into the
- 5:13configure error output dialog box and
- 5:16this is a feature I was going to explain
- 5:18not because it's useful just because
- 5:19it's so
- 5:20strange the reason it's there is cuz I
- 5:23could select several different items in
- 5:25this list at the top it would make more
- 5:28sense if I had more columns in in my
- 5:30list and then I could choose for example
- 5:33ignore failure and when I click on the
- 5:35apply button what will happen is it will
- 5:37change all of these selected items to
- 5:40the thing I've chosen down
- 5:41here and that's all that that feature
- 5:44does presumbly somebody and Microsoft
- 5:46decided that this was a useful feature
- 5:48to add but I think it's just plain
- 5:51confusing and that completes this short
- 5:53tutorial on error handling in ssis I
- 5:57hope you've enjoyed this short tutorial
- 5:58on error handling in
- 6:00ssis you can find lore training
- 6:03resources and all things SQL server.net
- 6:05or Microsoft Office at
- 6:08www.wis .co.uk
- 6:11[Music]
About this transcript
This page contains the full transcript of SQL Server Integration Services (SSIS) Part 18 - Error handling by WiseOwlTutorials, generated from the public captions YouTube serves with the video. The transcript has 1,130 words across 166 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.