SlideShare a Scribd company logo
7.Scripts7.Scripts
@copyright 2014 (pramod_singla@yahoo.co.in)
.
Presented by:
Pramod Singla
Pramod_singla@yahoo.co.in
ContentContent
 Recap and Q&A
 Scripting in Integration Services
◦ Demo: Get the list of names from the SSIS package store
 Script Task Configuration
◦ Demo: Configuring a Script Task
◦ Demo: Sending Email using Script task
Log method
◦ Demo: Working with the Log method
 Events
◦ Demo: Working with the Events Member
 Script Components
◦ Demo: Creating a Data Transformation Script Component
 Summary
@copyright 2014
(pramod_singla@yahoo.co.in)
Recap and Q&ARecap and Q&A
 Split and Join Transformations
Demo: Conditional Split
Demo: Multicast
Demo: Union All
Demo: Merge
Demo: Merge Join
Demo: Lookup
Demo: Cache
 Business Intelligence Transformations
Demo: SCD
Demo: Fuzzy Grouping
Demo: Term Extraction
 Auditing Transformations
 Demo: Audit
 Demo: Row count
@copyright 2014
(pramod_singla@yahoo.co.in)
Scripting in Integration ServicesScripting in Integration Services
 Allow to perform administrative tasks programmatically
 Allow to extend existing packages with custom logic using
◦ Script task and
◦ Script component.
 Perform administrative tasks programmatically using following
options:
◦ Use the Integration Services object model to manage Integration Services
packages, folders, and roles.
◦ Use the Integration Services command prompt utilities, dtexec and dtutil, to run
and manage packages.
◦ Use an appropriate task in a package to run a program or batch file.
@copyright 2014
(pramod_singla@yahoo.co.in)
Managing Integration ServicesManaging Integration Services
Objects with the Object Model.Objects with the Object Model.
Use the object model( especially the properties and methods of the
Application class) to perform the following management tasks:
◦ To get a list of packages stored in a particular location
◦ To determine whether an individual package or folder exists, or to manage the
folders in which packages are stored
◦ To get a list of running packages and to stop a running package
◦ To get a list of roles that is available on a server or assigned to a package
@copyright 2014
(pramod_singla@yahoo.co.in)
Command Prompt UtilitiesCommand Prompt Utilities
dtexec utility
◦ Used too run an Integration Services package
◦ The dtexec utility provides access to all the package configuration and execution
features, such as connections, properties, variables, logging, and progress
indicators.
◦ The dtexec utility lets you load packages from three sources: a Microsoft SQL
Server database, the SSIS service, and the file system.
dtutil utility
◦ Can copy, move, delete, or verify the existence of a package.
◦ These actions can be performed on any SSIS package that is stored in one of
three locations: a Microsoft SQL Server database, the SSIS Package Store, and the
file system.
◦ The storage type of the package is identified by the /SQL, /FILE,
and /DTS options.
 C:Userspram>dtutil /DTS MSDBmyFolderconversion /EXISTS
 C:Userspram>dtutil /FILE c:6_2_DataFlowTransformation.dtsx /DestServer comp_4
 /COPY DTS;MSDBdestpkgname
 C:Userspram>dtutil /DTS MSDBdestpkgname /DELETE
@copyright 2014
(pramod_singla@yahoo.co.in)
Script Task ConfigurationScript Task Configuration
 Provides code to perform functions that are not available in the
built-in tasks and transformations.
 If you have to use the script to do the same work for each row of
data in a set, you should use the Script component instead of the
Script task.
 Configuring the Script Task
◦ Specify the script language.
◦ Optionally, provide lists of read-only and read/write variables for use in the script.
◦ Specify the method in the VSTA project that the Integration Services runtime calls
as the entry point into the Script task code.
@copyright 2014
(pramod_singla@yahoo.co.in)
Log Method(Demo)Log Method(Demo)
 The Script task can use the Log method of the Dts object to log
user-defined data.
◦ Enable logging and
◦ select ScriptTaskLogEntry on the Details tab of the Configure SSIS
Logs dialog box to get it working
@copyright 2014
(pramod_singla@yahoo.co.in)
Events(Emo)Events(Emo)
 At run time, executables (packages and Foreach Loop, For Loop, Sequence, and task host containers) raise events
@copyright 2014
(pramod_singla@yahoo.co.in)
Event handler Event
OnError The event handler for the OnError event. This event is raised by an executable when an error occurs.
OnExecStatusChange
d
The event handler for the OnExecStatusChanged event. This event is raised by an executable when
its execution status changes.
OnInformation The event handler for the OnInformation event. This event is raised during the validation and
execution of an executable to report information.
OnPostExecute The event handler for the OnPostExecute event.
OnPostValidate The event handler for the OnPostValidate event. This event is raised by an executable when its
validation is finished.
OnPreExecute The event handler for the OnPreExecute event.
OnPreValidate The event handler for the OnPreValidate event.
OnProgress The event handler for the OnProgress event. This event is raised by an executable when measurable
progress is made by the executable.
OnQueryCancel The event handler for the OnQueryCancel event. This event is raised by an executable to determine
whether it should stop running.
OnTaskFailed The event handler for the OnTaskFailed event. This event is raised by a task when it fails.
OnVariableValueChan
ged
The event handler for the OnVariableValueChanged event. This event is raised by an executable
when the value of a variable changes.
OnWarning The event handler for the OnWarning event. This event is raised by an executable when a warning
occurs.
Script Components(Demo)Script Components(Demo)
 The Script component can be used as a
◦ source,
◦ a transformation,
◦ or a destination
 You can use the Script component in packages for the following
purposes:
◦ Apply multiple transformations to data instead of using multiple transformations in
the data flow
◦ Access business rules in an existing .NET assembly. For example, a script can
apply a business rule that specifies the range of values that are valid in
an Income column.
◦ Use custom formulas and functions
◦ Validate column data and skip records that contain invalid data
If the Script component contains a script that tries to read the
value of a column that is NULL, the Script component fails when
you run the package
@copyright 2014
(pramod_singla@yahoo.co.in)
SummarySummary
 Scripting in Integration Services
◦ Demo: Get the list of names from the SSIS package store
 Script Task Configuration
◦ Demo: Configuring a Script Task
◦ Demo: Sending Email using Script task
Log method
◦ Demo: Working with the Log method
 Events
◦ Demo: Working with the Events Member
 Script Components
◦ Demo: Creating a Data Transformation Script Component
@copyright 2014
(pramod_singla@yahoo.co.in)
DEMO
7_Scripts.dtsx 7_SSIS_DailyEmail.dtsx
@copyright 2014
(pramod_singla@yahoo.co.in)
Resources & QuestionsResources & Questions
Contact me :
◦ Pramod_singla@yahoo.co.in
◦ http://pramodsingla.wordpress.com/
Microsoft Resources:
◦ http://technet.microsoft.com/en-us/library/bb522546(v=sql.105).aspx
◦ http://www.sqlsafety.com/?p=268
@copyright 2014
(pramod_singla@yahoo.co.in)

More Related Content

What's hot

6.1\9 SSIS 2008R2_Training - DataFlow Transformations
6.1\9 SSIS 2008R2_Training - DataFlow Transformations6.1\9 SSIS 2008R2_Training - DataFlow Transformations
6.1\9 SSIS 2008R2_Training - DataFlow Transformations
Pramod Singla
 
Redux training
Redux trainingRedux training
Redux training
dasersoft
 
React state managmenet with Redux
React state managmenet with ReduxReact state managmenet with Redux
React state managmenet with Redux
Vedran Blaženka
 
React & redux
React & reduxReact & redux
React & redux
Cédric Hartland
 
React JS and Redux
React JS and ReduxReact JS and Redux
React JS and Redux
Glib Kechyn
 
React.js and Redux overview
React.js and Redux overviewReact.js and Redux overview
React.js and Redux overview
Alex Bachuk
 
Intro to Redux | DreamLab Academy #3
Intro to Redux | DreamLab Academy #3 Intro to Redux | DreamLab Academy #3
Intro to Redux | DreamLab Academy #3
DreamLab
 
React & Redux
React & ReduxReact & Redux
React & Redux
Federico Bond
 
React, Redux, ES2015 by Max Petruck
React, Redux, ES2015   by Max PetruckReact, Redux, ES2015   by Max Petruck
React, Redux, ES2015 by Max Petruck
Maksym Petruk
 
Academy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & ToolingAcademy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & Tooling
Binary Studio
 
React и redux
React и reduxReact и redux
Testing database content with DBUnit. My experience.
Testing database content with DBUnit. My experience.Testing database content with DBUnit. My experience.
Testing database content with DBUnit. My experience.
Serhii Kartashov
 
React redux
React reduxReact redux
React redux
Michel Perez
 
Quick start with React | DreamLab Academy #2
Quick start with React | DreamLab Academy #2Quick start with React | DreamLab Academy #2
Quick start with React | DreamLab Academy #2
DreamLab
 
React + Redux. Best practices
React + Redux.  Best practicesReact + Redux.  Best practices
React + Redux. Best practices
Clickky
 
React with Redux
React with ReduxReact with Redux
React with Redux
Stanimir Todorov
 
Redux workshop
Redux workshopRedux workshop
Redux workshop
Imran Sayed
 
ReactJS
ReactJSReactJS
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Advance Sql Server Store procedure Presentation
Advance Sql Server Store procedure PresentationAdvance Sql Server Store procedure Presentation
Advance Sql Server Store procedure PresentationAmin Uddin
 

What's hot (20)

6.1\9 SSIS 2008R2_Training - DataFlow Transformations
6.1\9 SSIS 2008R2_Training - DataFlow Transformations6.1\9 SSIS 2008R2_Training - DataFlow Transformations
6.1\9 SSIS 2008R2_Training - DataFlow Transformations
 
Redux training
Redux trainingRedux training
Redux training
 
React state managmenet with Redux
React state managmenet with ReduxReact state managmenet with Redux
React state managmenet with Redux
 
React & redux
React & reduxReact & redux
React & redux
 
React JS and Redux
React JS and ReduxReact JS and Redux
React JS and Redux
 
React.js and Redux overview
React.js and Redux overviewReact.js and Redux overview
React.js and Redux overview
 
Intro to Redux | DreamLab Academy #3
Intro to Redux | DreamLab Academy #3 Intro to Redux | DreamLab Academy #3
Intro to Redux | DreamLab Academy #3
 
React & Redux
React & ReduxReact & Redux
React & Redux
 
React, Redux, ES2015 by Max Petruck
React, Redux, ES2015   by Max PetruckReact, Redux, ES2015   by Max Petruck
React, Redux, ES2015 by Max Petruck
 
Academy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & ToolingAcademy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & Tooling
 
React и redux
React и reduxReact и redux
React и redux
 
Testing database content with DBUnit. My experience.
Testing database content with DBUnit. My experience.Testing database content with DBUnit. My experience.
Testing database content with DBUnit. My experience.
 
React redux
React reduxReact redux
React redux
 
Quick start with React | DreamLab Academy #2
Quick start with React | DreamLab Academy #2Quick start with React | DreamLab Academy #2
Quick start with React | DreamLab Academy #2
 
React + Redux. Best practices
React + Redux.  Best practicesReact + Redux.  Best practices
React + Redux. Best practices
 
React with Redux
React with ReduxReact with Redux
React with Redux
 
Redux workshop
Redux workshopRedux workshop
Redux workshop
 
ReactJS
ReactJSReactJS
ReactJS
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Advance Sql Server Store procedure Presentation
Advance Sql Server Store procedure PresentationAdvance Sql Server Store procedure Presentation
Advance Sql Server Store procedure Presentation
 

Similar to 7\9 SSIS 2008R2_Training - Script Task

Ssis2008 120710214348-phpapp02
Ssis2008 120710214348-phpapp02Ssis2008 120710214348-phpapp02
Ssis2008 120710214348-phpapp02
sumitkumar3201
 
Pyramid patterns
Pyramid patternsPyramid patterns
Pyramid patterns
Carlos de la Guardia
 
Unit Testing DFC
Unit Testing DFCUnit Testing DFC
Unit Testing DFC
BlueFish
 
Unit Testing Documentum Foundation Classes Code
Unit Testing Documentum Foundation Classes CodeUnit Testing Documentum Foundation Classes Code
Unit Testing Documentum Foundation Classes Code
BlueFish
 
Multi-tenancy with Rails
Multi-tenancy with RailsMulti-tenancy with Rails
Multi-tenancy with Rails
Paul Gallagher
 
Enterprise Library 2.0
Enterprise Library 2.0Enterprise Library 2.0
Enterprise Library 2.0
Raju Permandla
 
Taming Deployment With Smart Frog
Taming Deployment With Smart FrogTaming Deployment With Smart Frog
Taming Deployment With Smart FrogSteve Loughran
 
Qtp Presentation
Qtp PresentationQtp Presentation
Qtp Presentationtechgajanan
 
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Brian Brazil
 
Journey to containers by Chet Lintz - AWS Chicago Jan 17,2018 user group on C...
Journey to containers by Chet Lintz - AWS Chicago Jan 17,2018 user group on C...Journey to containers by Chet Lintz - AWS Chicago Jan 17,2018 user group on C...
Journey to containers by Chet Lintz - AWS Chicago Jan 17,2018 user group on C...
AWS Chicago
 
Ssis Best Practices Israel Bi U Ser Group Itay Braun
Ssis Best Practices   Israel Bi U Ser Group   Itay BraunSsis Best Practices   Israel Bi U Ser Group   Itay Braun
Ssis Best Practices Israel Bi U Ser Group Itay Braunsqlserver.co.il
 
WSO2 Complex Event Processor - Product Overview
WSO2 Complex Event Processor - Product OverviewWSO2 Complex Event Processor - Product Overview
WSO2 Complex Event Processor - Product Overview
WSO2
 
Performance tesing coding standards & best practice guidelines v1
Performance tesing coding standards & best practice guidelines v1Performance tesing coding standards & best practice guidelines v1
Performance tesing coding standards & best practice guidelines v1
Argos
 
performancetestingjmeter-121109061704-phpapp02 (1)
performancetestingjmeter-121109061704-phpapp02 (1)performancetestingjmeter-121109061704-phpapp02 (1)
performancetestingjmeter-121109061704-phpapp02 (1)QA Programmer
 
performancetestingjmeter-121109061704-phpapp02
performancetestingjmeter-121109061704-phpapp02performancetestingjmeter-121109061704-phpapp02
performancetestingjmeter-121109061704-phpapp02Gopi Raghavendra
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083
Divyam Pateriya
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance Schema
Mark Leith
 
Struts Interview Questions
Struts Interview QuestionsStruts Interview Questions
Struts Interview Questions
jbashask
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questionsRamu Palanki
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questionsRamu Palanki
 

Similar to 7\9 SSIS 2008R2_Training - Script Task (20)

Ssis2008 120710214348-phpapp02
Ssis2008 120710214348-phpapp02Ssis2008 120710214348-phpapp02
Ssis2008 120710214348-phpapp02
 
Pyramid patterns
Pyramid patternsPyramid patterns
Pyramid patterns
 
Unit Testing DFC
Unit Testing DFCUnit Testing DFC
Unit Testing DFC
 
Unit Testing Documentum Foundation Classes Code
Unit Testing Documentum Foundation Classes CodeUnit Testing Documentum Foundation Classes Code
Unit Testing Documentum Foundation Classes Code
 
Multi-tenancy with Rails
Multi-tenancy with RailsMulti-tenancy with Rails
Multi-tenancy with Rails
 
Enterprise Library 2.0
Enterprise Library 2.0Enterprise Library 2.0
Enterprise Library 2.0
 
Taming Deployment With Smart Frog
Taming Deployment With Smart FrogTaming Deployment With Smart Frog
Taming Deployment With Smart Frog
 
Qtp Presentation
Qtp PresentationQtp Presentation
Qtp Presentation
 
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
 
Journey to containers by Chet Lintz - AWS Chicago Jan 17,2018 user group on C...
Journey to containers by Chet Lintz - AWS Chicago Jan 17,2018 user group on C...Journey to containers by Chet Lintz - AWS Chicago Jan 17,2018 user group on C...
Journey to containers by Chet Lintz - AWS Chicago Jan 17,2018 user group on C...
 
Ssis Best Practices Israel Bi U Ser Group Itay Braun
Ssis Best Practices   Israel Bi U Ser Group   Itay BraunSsis Best Practices   Israel Bi U Ser Group   Itay Braun
Ssis Best Practices Israel Bi U Ser Group Itay Braun
 
WSO2 Complex Event Processor - Product Overview
WSO2 Complex Event Processor - Product OverviewWSO2 Complex Event Processor - Product Overview
WSO2 Complex Event Processor - Product Overview
 
Performance tesing coding standards & best practice guidelines v1
Performance tesing coding standards & best practice guidelines v1Performance tesing coding standards & best practice guidelines v1
Performance tesing coding standards & best practice guidelines v1
 
performancetestingjmeter-121109061704-phpapp02 (1)
performancetestingjmeter-121109061704-phpapp02 (1)performancetestingjmeter-121109061704-phpapp02 (1)
performancetestingjmeter-121109061704-phpapp02 (1)
 
performancetestingjmeter-121109061704-phpapp02
performancetestingjmeter-121109061704-phpapp02performancetestingjmeter-121109061704-phpapp02
performancetestingjmeter-121109061704-phpapp02
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance Schema
 
Struts Interview Questions
Struts Interview QuestionsStruts Interview Questions
Struts Interview Questions
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questions
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questions
 

Recently uploaded

一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
balafet
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Boston Institute of Analytics
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
vcaxypu
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 

Recently uploaded (20)

一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 

7\9 SSIS 2008R2_Training - Script Task

  • 2. ContentContent  Recap and Q&A  Scripting in Integration Services ◦ Demo: Get the list of names from the SSIS package store  Script Task Configuration ◦ Demo: Configuring a Script Task ◦ Demo: Sending Email using Script task Log method ◦ Demo: Working with the Log method  Events ◦ Demo: Working with the Events Member  Script Components ◦ Demo: Creating a Data Transformation Script Component  Summary @copyright 2014 (pramod_singla@yahoo.co.in)
  • 3. Recap and Q&ARecap and Q&A  Split and Join Transformations Demo: Conditional Split Demo: Multicast Demo: Union All Demo: Merge Demo: Merge Join Demo: Lookup Demo: Cache  Business Intelligence Transformations Demo: SCD Demo: Fuzzy Grouping Demo: Term Extraction  Auditing Transformations  Demo: Audit  Demo: Row count @copyright 2014 (pramod_singla@yahoo.co.in)
  • 4. Scripting in Integration ServicesScripting in Integration Services  Allow to perform administrative tasks programmatically  Allow to extend existing packages with custom logic using ◦ Script task and ◦ Script component.  Perform administrative tasks programmatically using following options: ◦ Use the Integration Services object model to manage Integration Services packages, folders, and roles. ◦ Use the Integration Services command prompt utilities, dtexec and dtutil, to run and manage packages. ◦ Use an appropriate task in a package to run a program or batch file. @copyright 2014 (pramod_singla@yahoo.co.in)
  • 5. Managing Integration ServicesManaging Integration Services Objects with the Object Model.Objects with the Object Model. Use the object model( especially the properties and methods of the Application class) to perform the following management tasks: ◦ To get a list of packages stored in a particular location ◦ To determine whether an individual package or folder exists, or to manage the folders in which packages are stored ◦ To get a list of running packages and to stop a running package ◦ To get a list of roles that is available on a server or assigned to a package @copyright 2014 (pramod_singla@yahoo.co.in)
  • 6. Command Prompt UtilitiesCommand Prompt Utilities dtexec utility ◦ Used too run an Integration Services package ◦ The dtexec utility provides access to all the package configuration and execution features, such as connections, properties, variables, logging, and progress indicators. ◦ The dtexec utility lets you load packages from three sources: a Microsoft SQL Server database, the SSIS service, and the file system. dtutil utility ◦ Can copy, move, delete, or verify the existence of a package. ◦ These actions can be performed on any SSIS package that is stored in one of three locations: a Microsoft SQL Server database, the SSIS Package Store, and the file system. ◦ The storage type of the package is identified by the /SQL, /FILE, and /DTS options.  C:Userspram>dtutil /DTS MSDBmyFolderconversion /EXISTS  C:Userspram>dtutil /FILE c:6_2_DataFlowTransformation.dtsx /DestServer comp_4  /COPY DTS;MSDBdestpkgname  C:Userspram>dtutil /DTS MSDBdestpkgname /DELETE @copyright 2014 (pramod_singla@yahoo.co.in)
  • 7. Script Task ConfigurationScript Task Configuration  Provides code to perform functions that are not available in the built-in tasks and transformations.  If you have to use the script to do the same work for each row of data in a set, you should use the Script component instead of the Script task.  Configuring the Script Task ◦ Specify the script language. ◦ Optionally, provide lists of read-only and read/write variables for use in the script. ◦ Specify the method in the VSTA project that the Integration Services runtime calls as the entry point into the Script task code. @copyright 2014 (pramod_singla@yahoo.co.in)
  • 8. Log Method(Demo)Log Method(Demo)  The Script task can use the Log method of the Dts object to log user-defined data. ◦ Enable logging and ◦ select ScriptTaskLogEntry on the Details tab of the Configure SSIS Logs dialog box to get it working @copyright 2014 (pramod_singla@yahoo.co.in)
  • 9. Events(Emo)Events(Emo)  At run time, executables (packages and Foreach Loop, For Loop, Sequence, and task host containers) raise events @copyright 2014 (pramod_singla@yahoo.co.in) Event handler Event OnError The event handler for the OnError event. This event is raised by an executable when an error occurs. OnExecStatusChange d The event handler for the OnExecStatusChanged event. This event is raised by an executable when its execution status changes. OnInformation The event handler for the OnInformation event. This event is raised during the validation and execution of an executable to report information. OnPostExecute The event handler for the OnPostExecute event. OnPostValidate The event handler for the OnPostValidate event. This event is raised by an executable when its validation is finished. OnPreExecute The event handler for the OnPreExecute event. OnPreValidate The event handler for the OnPreValidate event. OnProgress The event handler for the OnProgress event. This event is raised by an executable when measurable progress is made by the executable. OnQueryCancel The event handler for the OnQueryCancel event. This event is raised by an executable to determine whether it should stop running. OnTaskFailed The event handler for the OnTaskFailed event. This event is raised by a task when it fails. OnVariableValueChan ged The event handler for the OnVariableValueChanged event. This event is raised by an executable when the value of a variable changes. OnWarning The event handler for the OnWarning event. This event is raised by an executable when a warning occurs.
  • 10. Script Components(Demo)Script Components(Demo)  The Script component can be used as a ◦ source, ◦ a transformation, ◦ or a destination  You can use the Script component in packages for the following purposes: ◦ Apply multiple transformations to data instead of using multiple transformations in the data flow ◦ Access business rules in an existing .NET assembly. For example, a script can apply a business rule that specifies the range of values that are valid in an Income column. ◦ Use custom formulas and functions ◦ Validate column data and skip records that contain invalid data If the Script component contains a script that tries to read the value of a column that is NULL, the Script component fails when you run the package @copyright 2014 (pramod_singla@yahoo.co.in)
  • 11. SummarySummary  Scripting in Integration Services ◦ Demo: Get the list of names from the SSIS package store  Script Task Configuration ◦ Demo: Configuring a Script Task ◦ Demo: Sending Email using Script task Log method ◦ Demo: Working with the Log method  Events ◦ Demo: Working with the Events Member  Script Components ◦ Demo: Creating a Data Transformation Script Component @copyright 2014 (pramod_singla@yahoo.co.in)
  • 14. Resources & QuestionsResources & Questions Contact me : ◦ Pramod_singla@yahoo.co.in ◦ http://pramodsingla.wordpress.com/ Microsoft Resources: ◦ http://technet.microsoft.com/en-us/library/bb522546(v=sql.105).aspx ◦ http://www.sqlsafety.com/?p=268 @copyright 2014 (pramod_singla@yahoo.co.in)