WISE OWL EXERCISES
SSIS INTEGRATION SERVICES EXERCISES
- Data flow tasks (4)
- Basic data transforms (1)
- Data conversion transforms (2)
- Conditional split transforms (5)
- Lookup transforms (4)
- Looping over files (3)
- Looping over rows (2)
- Merge joins (1)
- Previous versions (18)
- Script tasks (1)
- Variables in script (1)
- Script components (2)
- Accessing file attributes (2)
SSIS Integration Services | Script components exercise | Create a script component to filter films into acceptable or not
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
You can learn how to do this exercise on the relevant Wise Owl classroom training course (sadly for the moment only in the UK).
You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
Create the following data flow task to read films in from the above workbook, and set a flag called IfAcceptable to divide them into into two groups:
If you're successful you should get 34 unacceptable films. Notes follow below!
To determine whether a film is successful or not, use a script component to set the value of a boolean column called IfAcceptable according to the following rules:
|Column||Not acceptable if ...|
|RunTimeMinutes||The length of the film is more than 240 minutes (4 hours).|
|Genre||The genre is Horror.|
|Title||The film title contains the words Twilight Saga.|
The thinking behind this is that overlong, horror or Twilight films should never be made ...
Here's a fragment of code to nudge you on your way (for conducting the third test). The ToLower() function ensures that we won't have any case-sensitivity problems:
// if Twilight Saga, reject
When you've finished, close your package down.