ALL SOFTWARE EXERCISES
- EXERCISES HOME PAGE (955)
- Access 2010 (66)
- Access VBA Macros (17)
- Advanced VBA (29)
- DAX (0)
- Excel (50)
- Excel 2010 (83)
- Excel 2013 (10)
- Excel VBA Macros (49)
- Power BI - Excel 2013 (25)
- Power BI - Excel 2016 (24)
- Power BI Desktop (26)
- PowerPivot 2010 (26)
- Report Builder (42)
- SQL (192)
- SSAS - multidimensional (21)
- SSAS - tabular (29)
- SSIS Integration Services (40)
- SSRS 2012 (53)
- SSRS 2016 (43)
- Visual Basic (45)
- Visual C Sharp (65)
- WPF - Visual C# (20)
SSIS INTEGRATION SERVICES EXERCISES
Exercise: Loop over file names in object variable rows to import them
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.
The answer to the exercise will be included and explained if you attend the course listed below!
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.
In SQL Server Management Studio, open the SQL file in the above folder and execute it to create this table:
The first table is the one you need to populate. The second table specifies which of the four Excel files in the above folder you want to import. You're welcome to change the letters if you like (but only use A, B, C or D).
Create a new package called Exploitative TV, and within this create two variables:
|Variable||What it will hold|
|Letters||The recordset returned from the table BushtuckerImports.|
|Letter||Each letter in turn as you loop through this recordset.|
Create two Execute SQL tasks - one to get rid of any old rows in the BushtuckerData table, and the other to read the letters in the BushtuckerImports table into your object variable - as well as a loop task as explained below:
The bottom task should loop over the rows in the Letters object variable, reading the import letter for each into your Letter variable.
Within the loop, create a data flow task to read a fixed Excel workbook's data (choose trial A, for example) into your bushtucker data table:
What the data flow task could look like.
Now make the Excel file path for your Excel workbook connection string into an expression, so that when you run your package it imports data only for the letters you've specified:
What you'd get for letters A, B and D (although not necessarily in this order).
Close your package down!