- Access exercises (91)
- C# exercises (79)
- Excel exercises (278)
- Power Apps exercises (13)
- Power Automate exercises (18)
- Power BI exercises (139)
- Power Platform exercises (157)
- Python exercises (28)
- Report Builder exercises (141)
- SQL exercises (198)
- SSAS exercises (51)
- SSIS exercises (46)
- SSRS exercises (99)
- VBA exercises (85)
- Visual Basic exercises (46)
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 | Lookup transforms exercise | Add new genres to a lookup table, then import a list of films
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 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 Management Studio. open the SQL script in the above folder and execute it. This should create two tables:
The aim of the exercise is to import a list of films into the FilmsForLookupExercise table, setting the genre id for each (and adding any new genres which don't exist).
Create a package whose control flow should contain four tasks:
|Part||Type||What it should do|
|1||Execute SQL||Delete any existing rows in the FilmsForLookupExercise table.|
|2||Data flow||Import the films from the workbook in the above folder, matching the genre to the Genre table in SQL Server and adding any new genres found to this table. The resulting of running this part should be to add two new genres to the table, which will automatically be given the numbers 23 and 24 (the next available numbers).|
|3||Data flow||Import the films again, matching the genre to the Genre table (which we now know will work), and returning the genre id. Send the results of this to the FilmsForLookupExercise table.|
|4||Data flow||Import the FilmsForLookupExercise table rows, and use a conditional split to show only those where the genre id is more than 22 (ie films for genres just added). Use a data viewer to show these rows.|
The GenreId column is an identity one, which means that when you add a new genre row the id number will automatically be set to one greater than the previous maximum. Be careful to add only one row for each new genre found!
As well as adding rows to the Genre and FilmsForLookupExercise tables, the package should produce the following data viewer:
There are 3 films in the Software genre, and one in the Dark side genre.
When you've got this package working, close it down!