SSIS Integration Services | Variables in script exercise | Use a Script Task to check if too many bake-off series exist

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 if you attend one of more of the courses listed below!

Software ==> SSIS Integration Services  (46 exercises)
Version ==> SSIS 2012 and later
Topic ==> Variables in script  (1 exercise)
Level ==> Average difficulty
Courses ==> Fast track SSIS  /  Advanced SSIS
Before you can do this exercise, you'll need to download and unzip this file (if you have any problems doing this, click here for help).

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 a new package called Stop Baking, and add a variable to it:

New variable

This variable will hold the number of GBBO series.

 

Add a data flow task to read in the rows from the workbook in the above folder, and count them using a Row Count transform:

Counting rows

Count how many series there have been, and store the results in your NumberSeries variable.

 

Now add a script task to check the value of this variable:

Script task

You'll need to pass the NumberSeries variable to your script task.

 

The script task should display one of the following two messages, depending on whether the total number of series made is up to 10 or more than 10:

Up to 10 series More than 10 series

Add another row to your workbook and check that you then get a different message, then close your package down.

You can unzip this file to see the answers to this exercise, although please remember this is for your personal use only.
This page has 0 threads Add post