SlideShare una empresa de Scribd logo
1 de 12
[object Object],[object Object],[object Object],Business Intelligence Portfolio SQL Server Integration Services (SSIS)
Table of Contents Chapter Slide Number Overview 3 Data Model 4 Sample Package - Timesheet 5 Sample Package – Timesheet: Control Flow 6 Sample Package – Timesheet: Data Flow 7 Master Package 10 Database Maintenance Package 11 SQL Server Agent Job 12
AllWorks Inc. ,[object Object],[object Object],[object Object],[object Object]
Part 1: Create the Data Model Note:  AllWorks currently allows for only one work order project per invoice. They want to allow a single invoice to cover multiple projects. Additionally, when AllWorks receives payment, they want to track how much was received for each project on each invoice. So with a many-to-many relationship between Projects and Invoices it was necessary to create a cross-reference (or bridge) table between the Project and Invoice tables.
Part 2: Create SSIS packages Create an SSIS package to load each of the above tables (with the exception of MaterialType which is static and currently contains only three valid material types).  Data must be validated as it is loaded and invalid data should be written out to log files.  Success and failure emails should be sent upon the completion of each package. The success emails should contain the number of rows updated, the number of rows inserted, and the number of invalid rows. Sample Package Timesheet The Timesheet package should loop through all the timesheets in the /time folder loading all the data into the Timesheet table.  Once the files are processed they should be moved to the /time/processed folder.
Timesheet Package: Control Flow The first step that executes, cleans up any old log files that may remain from prior runs. Using a ForEach Loop Container, loops through all timesheet files (files have naming convention EmpTime*.csv) and process them one at a time.  Perform script task to accumulate inserted/updated/invalid row totals for all files processed. Send failure/success email with row counts.
Timesheet Package: Data Flow
Timesheet Package: Data Flow The first steps of the data flow is to read in the source file, convert the data to SQL format, then perform a Lookup Task to determine if the records are updates or inserts. Update Logic:  If the source record corresponds to an existing row, use a Conditional Split task to verify that the record contains changed data (we want to avoid unnecessary updates).  Perform a RowCount task to update the UpdatedRows variable (used to accumulate total row counts in control flow).  Finally perform an OLE DB Task to update the EmpTime table.
Timesheet Package: Data Flow Update Logic:  When the incoming records are inserts, validation must be performed on the incoming records.  First a Lookup Task will be performed to validate that the ProjectID is valid, then the EmployeeID must also be validated. The final validation ensures that the WorkDate on the timesheet is prior to the Close Date of the Project and that the Project Closed Flag has not been set to true.  Once validated, count the records to be inserted (and again assign to a variable to be tallied in the control flow) before inserting to the EmpTime table. Invalid records are sent to a log file for inspection.
Master Package The master package pictured to the left, uses a sequence task to execute each individual package in order, based on data dependencies.  Those packages that can run simultaneously have no dependency.  When the sequence completes, it executes the Database Maintenance package.
Timesheet Package: Database Maintenance Package The final package to execute is the Database Maintenance package.  This performs routine cleanup to the database after loading a large number of records.  It shrinks the database, rebuilds indexes, updates statistics, and backs up the database.  This will ensure that the indexes and internal statistics of the database are most up to date when SQL Server determines execution plans in the future.
SQL Server Agent Job Finally: All packages were deployed to SQL Server and a job was created using SQL Server Agent to run the Master Package daily at noon.

Más contenido relacionado

La actualidad más candente

transaction management, concept & State
transaction management, concept & Statetransaction management, concept & State
transaction management, concept & StateSurya Swaroop
 
BACKUP & RECOVERY IN DBMS
BACKUP & RECOVERY IN DBMSBACKUP & RECOVERY IN DBMS
BACKUP & RECOVERY IN DBMSBaivabiNayak
 
DBPLUS Performance Monitor for Oracle
DBPLUS Performance Monitor for OracleDBPLUS Performance Monitor for Oracle
DBPLUS Performance Monitor for OracleDBPLUS
 
A Complex SSIS Package
A Complex SSIS PackageA Complex SSIS Package
A Complex SSIS PackageNitil Dwivedi
 
Oracle 11g to 12c Rolling Upgrade
Oracle 11g to 12c Rolling UpgradeOracle 11g to 12c Rolling Upgrade
Oracle 11g to 12c Rolling UpgradeArun Sharma
 
Sql server lesson9
Sql server lesson9Sql server lesson9
Sql server lesson9Ala Qunaibi
 
Manisha Menon Ssis Portfolio
Manisha Menon Ssis PortfolioManisha Menon Ssis Portfolio
Manisha Menon Ssis Portfoliomenonmanisha
 
Dataguard implementation
Dataguard implementationDataguard implementation
Dataguard implementationRajshekar Patil
 
TPT connection Implementation in Informatica
TPT connection Implementation in InformaticaTPT connection Implementation in Informatica
TPT connection Implementation in InformaticaYagya Sharma
 

La actualidad más candente (12)

transaction management, concept & State
transaction management, concept & Statetransaction management, concept & State
transaction management, concept & State
 
BACKUP & RECOVERY IN DBMS
BACKUP & RECOVERY IN DBMSBACKUP & RECOVERY IN DBMS
BACKUP & RECOVERY IN DBMS
 
DBPLUS Performance Monitor for Oracle
DBPLUS Performance Monitor for OracleDBPLUS Performance Monitor for Oracle
DBPLUS Performance Monitor for Oracle
 
A Complex SSIS Package
A Complex SSIS PackageA Complex SSIS Package
A Complex SSIS Package
 
Oracle 11g to 12c Rolling Upgrade
Oracle 11g to 12c Rolling UpgradeOracle 11g to 12c Rolling Upgrade
Oracle 11g to 12c Rolling Upgrade
 
Less16 Recovery
Less16 RecoveryLess16 Recovery
Less16 Recovery
 
Aries
AriesAries
Aries
 
Sql server lesson9
Sql server lesson9Sql server lesson9
Sql server lesson9
 
Manisha Menon Ssis Portfolio
Manisha Menon Ssis PortfolioManisha Menon Ssis Portfolio
Manisha Menon Ssis Portfolio
 
SSIS control flow
SSIS control flowSSIS control flow
SSIS control flow
 
Dataguard implementation
Dataguard implementationDataguard implementation
Dataguard implementation
 
TPT connection Implementation in Informatica
TPT connection Implementation in InformaticaTPT connection Implementation in Informatica
TPT connection Implementation in Informatica
 

Similar a David Weston SSIS Portfolio

MMYERS Portfolio
MMYERS PortfolioMMYERS Portfolio
MMYERS PortfolioMike Myers
 
B Woodward Portfolio
B Woodward PortfolioB Woodward Portfolio
B Woodward Portfoliobwoodward
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolioamoffat
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolioguestc38d4b
 
Ssis sql ssrs_sp_hb_li
Ssis sql ssrs_sp_hb_liSsis sql ssrs_sp_hb_li
Ssis sql ssrs_sp_hb_liHong-Bing Li
 
SSIS Project Profile
SSIS Project ProfileSSIS Project Profile
SSIS Project Profiletthompson0421
 
Ssis sql ssas_sps_mdx_hong_bingli
Ssis sql ssas_sps_mdx_hong_bingliSsis sql ssas_sps_mdx_hong_bingli
Ssis sql ssas_sps_mdx_hong_bingliHong-Bing Li
 
Ssis sql ssas_sps_mdx_hong_bingli
Ssis sql ssas_sps_mdx_hong_bingliSsis sql ssas_sps_mdx_hong_bingli
Ssis sql ssas_sps_mdx_hong_bingliHong-Bing Li
 
Ssis2008 120710214348-phpapp02
Ssis2008 120710214348-phpapp02Ssis2008 120710214348-phpapp02
Ssis2008 120710214348-phpapp02sumitkumar3201
 
Ssis ssas sps_mdx_hong_bingli
Ssis ssas sps_mdx_hong_bingliSsis ssas sps_mdx_hong_bingli
Ssis ssas sps_mdx_hong_bingliHong-Bing Li
 
Ssis ssas sps_mdx_hong_bingli
Ssis ssas sps_mdx_hong_bingliSsis ssas sps_mdx_hong_bingli
Ssis ssas sps_mdx_hong_bingliHong-Bing Li
 
A-Project Report- SSIS
A-Project Report- SSISA-Project Report- SSIS
A-Project Report- SSISYubaraj Khanal
 
Introduction of ssis
Introduction of ssisIntroduction of ssis
Introduction of ssisdeepakk073
 
Ssis First Project Word7
Ssis First Project Word7Ssis First Project Word7
Ssis First Project Word7jolisadillard
 
SQL Server 2008 Development for Programmers
SQL Server 2008 Development for ProgrammersSQL Server 2008 Development for Programmers
SQL Server 2008 Development for ProgrammersAdam Hutson
 

Similar a David Weston SSIS Portfolio (20)

MMYERS Portfolio
MMYERS PortfolioMMYERS Portfolio
MMYERS Portfolio
 
B Woodward Portfolio
B Woodward PortfolioB Woodward Portfolio
B Woodward Portfolio
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
Ssis sql ssrs_sp_hb_li
Ssis sql ssrs_sp_hb_liSsis sql ssrs_sp_hb_li
Ssis sql ssrs_sp_hb_li
 
SSIS Project Profile
SSIS Project ProfileSSIS Project Profile
SSIS Project Profile
 
Ssis 2008
Ssis 2008Ssis 2008
Ssis 2008
 
Ssis event handler
Ssis event handlerSsis event handler
Ssis event handler
 
Ssis sql ssas_sps_mdx_hong_bingli
Ssis sql ssas_sps_mdx_hong_bingliSsis sql ssas_sps_mdx_hong_bingli
Ssis sql ssas_sps_mdx_hong_bingli
 
Ssis sql hb_li
Ssis sql hb_liSsis sql hb_li
Ssis sql hb_li
 
Ssis sql ssas_sps_mdx_hong_bingli
Ssis sql ssas_sps_mdx_hong_bingliSsis sql ssas_sps_mdx_hong_bingli
Ssis sql ssas_sps_mdx_hong_bingli
 
Ssis2008 120710214348-phpapp02
Ssis2008 120710214348-phpapp02Ssis2008 120710214348-phpapp02
Ssis2008 120710214348-phpapp02
 
Ssis ssas sps_mdx_hong_bingli
Ssis ssas sps_mdx_hong_bingliSsis ssas sps_mdx_hong_bingli
Ssis ssas sps_mdx_hong_bingli
 
Ssis ssas sps_mdx_hong_bingli
Ssis ssas sps_mdx_hong_bingliSsis ssas sps_mdx_hong_bingli
Ssis ssas sps_mdx_hong_bingli
 
A-Project Report- SSIS
A-Project Report- SSISA-Project Report- SSIS
A-Project Report- SSIS
 
Introduction of ssis
Introduction of ssisIntroduction of ssis
Introduction of ssis
 
Ssis First Project Word7
Ssis First Project Word7Ssis First Project Word7
Ssis First Project Word7
 
SQL Server 2008 Development for Programmers
SQL Server 2008 Development for ProgrammersSQL Server 2008 Development for Programmers
SQL Server 2008 Development for Programmers
 
Abstract.DOCX
Abstract.DOCXAbstract.DOCX
Abstract.DOCX
 
Preparing Import Files
Preparing Import FilesPreparing Import Files
Preparing Import Files
 

Último

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Último (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

David Weston SSIS Portfolio

  • 1.
  • 2. Table of Contents Chapter Slide Number Overview 3 Data Model 4 Sample Package - Timesheet 5 Sample Package – Timesheet: Control Flow 6 Sample Package – Timesheet: Data Flow 7 Master Package 10 Database Maintenance Package 11 SQL Server Agent Job 12
  • 3.
  • 4. Part 1: Create the Data Model Note: AllWorks currently allows for only one work order project per invoice. They want to allow a single invoice to cover multiple projects. Additionally, when AllWorks receives payment, they want to track how much was received for each project on each invoice. So with a many-to-many relationship between Projects and Invoices it was necessary to create a cross-reference (or bridge) table between the Project and Invoice tables.
  • 5. Part 2: Create SSIS packages Create an SSIS package to load each of the above tables (with the exception of MaterialType which is static and currently contains only three valid material types). Data must be validated as it is loaded and invalid data should be written out to log files. Success and failure emails should be sent upon the completion of each package. The success emails should contain the number of rows updated, the number of rows inserted, and the number of invalid rows. Sample Package Timesheet The Timesheet package should loop through all the timesheets in the /time folder loading all the data into the Timesheet table. Once the files are processed they should be moved to the /time/processed folder.
  • 6. Timesheet Package: Control Flow The first step that executes, cleans up any old log files that may remain from prior runs. Using a ForEach Loop Container, loops through all timesheet files (files have naming convention EmpTime*.csv) and process them one at a time. Perform script task to accumulate inserted/updated/invalid row totals for all files processed. Send failure/success email with row counts.
  • 8. Timesheet Package: Data Flow The first steps of the data flow is to read in the source file, convert the data to SQL format, then perform a Lookup Task to determine if the records are updates or inserts. Update Logic: If the source record corresponds to an existing row, use a Conditional Split task to verify that the record contains changed data (we want to avoid unnecessary updates). Perform a RowCount task to update the UpdatedRows variable (used to accumulate total row counts in control flow). Finally perform an OLE DB Task to update the EmpTime table.
  • 9. Timesheet Package: Data Flow Update Logic: When the incoming records are inserts, validation must be performed on the incoming records. First a Lookup Task will be performed to validate that the ProjectID is valid, then the EmployeeID must also be validated. The final validation ensures that the WorkDate on the timesheet is prior to the Close Date of the Project and that the Project Closed Flag has not been set to true. Once validated, count the records to be inserted (and again assign to a variable to be tallied in the control flow) before inserting to the EmpTime table. Invalid records are sent to a log file for inspection.
  • 10. Master Package The master package pictured to the left, uses a sequence task to execute each individual package in order, based on data dependencies. Those packages that can run simultaneously have no dependency. When the sequence completes, it executes the Database Maintenance package.
  • 11. Timesheet Package: Database Maintenance Package The final package to execute is the Database Maintenance package. This performs routine cleanup to the database after loading a large number of records. It shrinks the database, rebuilds indexes, updates statistics, and backs up the database. This will ensure that the indexes and internal statistics of the database are most up to date when SQL Server determines execution plans in the future.
  • 12. SQL Server Agent Job Finally: All packages were deployed to SQL Server and a job was created using SQL Server Agent to run the Master Package daily at noon.