RowCount Transformation in SSIS 2008R2 Example

225
167311
rowcount

RowCount Transformation :  The RowCount transformation provides a way to track how many rows are flowing through a particular path. You can use this information in logs as diagnostic information or for sending in an email as a notification of the work a package has completed.

Counts the rows flowing through the data flow and writes the final count in a variable. Here we are gonna discuss an example on the same.

In the Control Flow tab, add a variable named “RowCnt.” Ensure that the variable is package-scoped and of type Int32 .

Add a dataflow task and create a connection manager that connects to the AdventureWorksDW database. Add an OLE DB Data Source to the Data Flow design surface. Configure the source to point to your AdventureWorksDW database’s connection manager.

Double Click on the OLE DB Component and Select  SQL Command to write customized sql.

Add a Row Count Transform to the Data Flow.

Open the Advanced Editor and select the variable named “User::RowCnt” as the Variable Name property. Your editor should resemble.

When you edit Row Count Transformation you could see the Input Columns  and Input and Output Properties Tabs  along with Component Properties. Please ignore both of them.

RowCount Transformation has been configured. Now Return to the Control Flow tab and add a Script Task. This task is not really going to perform any action. Instead it will be used to show the conditional ability to perform steps based on the value returned by the Row Count Transform.

Connect the Data Flow Task to the Script Task. Double click on Script Task and  Set up the ReadOnlyVariable as User::RowCnt which was created as package variable and then Edit the script to write  the message box popup code.

Write the piece of script code to show the count value in alert message box.

Now the package is ready to be executed. Go to the Solution Explorer and right click on the package and select “Execute Package”. If all components turn “GREEN”, it means package has run successfully, if there is any error, the component which has failed to execute will be shown in “RED” Color.

Package executed successfully and shows the rows count as in message box. This is it guys !!

Thanks Sushil for the document.

Regards,
Roopesh Babu V

225 COMMENTS

  1. Мы занимаемся вывозом мусора газелями разной модификации от стандартных 6 м3 до больших 14 м3 есть также грузчики, работаем по Московской области. Преимущества вывоза мусора газелью в том, что она самая дешёвая услуга вывоза мусора.
    Эффективный способ вывоза мусора газелью, с минимальными затратами.
    Почему газель идеально подходит для вывоза мусора, которые важно знать.
    Какие материалы можно вывозить газелью, с учетом размеров и веса.
    Минимальные стоимость услуги по вывозу мусора газелью, и сохранить качество проведенных работ.
    Секрет успешного вывоза мусора газелью, соблюдая правила перевозки.
    вывоз старой мебели на свалку вывоз строительного мусора газелью .

  2. Nude models, artistic photography, fine art nudes, body positivity, figure studies, aesthetic nude photography, creative expression, portrait photography, sensual art, modeling portfolio, nude art photography, elegance of the human form

    [url=https://nugrls.com/][b]Click here to see![/b][/url]

  3. Top Earning App in Pakistan|Ideal Earning Option in Pakistan|Innovative Earning Method in Pakistan|Efficient Earning Tool in Pakistan|Profitable Earning App in Pakistan|Trustworthy Earning Platform in Pakistan|Processing App in Pakistan: Proven Tool|New level of income in Pakistan|Pakistan: leader in earning|App that will make it easier to earn in Pakistan Pakistan
    pakistan earn money app top 5 earning app in pakistan .

  4. What’s good?

    I was blown away!

    [url=https://juanhand-review.com/]juanhand review philippines[/url]

    Have a good one!

  5. Ивенты в клубах создадут вам восхитительные незабываемые мгновения. Конкурсы открывают возможность обрести новый опыт. Шоу в динамичной атмосфере расширяют горизонты. Продумывайте до мелочей для захватывающих ивентов с друзьями!
    [url=https://feduk-bilet.ru/]feduk-bilet.ru[/url]

  6. евро в тенге доллар в тенге .

    Наш сайт предоставляет полную информацию о текущих курсах валют и моментальную конвертацию. Будь то тенге, рубли или доллары США – все данные обновляются в режиме реального времени.

  7. Получите максимум удовольствия от вашего дома с программируемым электрокарнизом, который легко устанавливается.
    Превратите свой дом в оазис комфорта с программируемым электрокарнизом, помогает вам расслабиться и отдохнуть.
    Освежите свою обстановку с помощью программируемого электрокарниза, обеспечит вам максимальный комфорт.
    Превратите свою спальню в уютное убежище с программируемым электрокарнизом, который поможет вам легко заснуть и проснуться.
    Регулируйте интенсивность света и тепла с помощью программируемого электрокарниза, поможет вам сэкономить время и энергию.
    умный электрокарниз aqara умный электрокарниз aqara .

  8. Greetings!

    Protect your data and recover access to locked systems with professional hackers. Our services include vulnerability testing, data recovery, and account unlocking. We guarantee secure communication and private handling of all tasks. Choose our platform for fast, reliable, and discreet digital solutions designed to meet your needs.
    https://hackerslist.com/hacker-services/

    Thank you for choosing HackersList!

  9. https://listovke.ru/ В современном бизнесе гибкость – ключ к успеху. Аутсорсинг рабочего персонала – это стратегическое решение, позволяющее компаниям оперативно масштабировать ресурсы, адаптируясь к меняющимся потребностям.

  10. The SVS Ultra Tower speakers are not just speakers; they are the gateway to a new realm of sound. Embrace the power, precision, and passion of high-fidelity audio. With Dreamedia’s expertise at your service, your journey toward sonic perfection is just a step away. Contact us to design your home theater system with the SVS Ultra Tower speakers as its cornerstone, and let the magic of music and movies fill your home. Immerse yourself in an ultra-realistic environment that brings the thrill and challenges of air traffic control right to your fingertips. With our brand-new lighting system based on real-world parameters and an intuitive 2D graphical user interface (GUI), Tower! Simulator 3 sets a new gold standard in ATC simulation. To play any round of Tower X, you must stump up at least $0.10. This low minimum is common among many casino games, so you don’t need to throw in the benjamins to have a good time here. As for the highest wagers, these top out at $5 per round.
    https://pumpyoursound.com/u/user/1478470
    Roblox is now loading. Get ready! Check out the latest codes for PLS DONATE, a Roblox donation game where you can trade real Robux for items. Create your own stand and get playing. To redeem codes in Roblox Tower Defense X, you will just need to follow these steps: Related: Skibidi Tower Defense Codes All Star Tower Defense X is a sequel to All Star Tower Defense. Rather than an update, it’s a whole new title. Try these Anime Tower Defense codes: But if you need more Gold or bonuses in the game, we are here to help you with the latest Bathroom Tower Defense X game codes. If you redeem an incorrect or typo-filled code, then “Code doesn’t exist :(” will be displayed inside the code box. If none of the codes work, then restart Tower Defense X and try redeeming the active codes once again.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

73 + = seventy seven