Agile BI Community

Community site for agile business intelligence developers
Welcome to Agile BI Community Sign in | Join | Help
in Search

Browse by Tags

All Tags » SSIS » Script
  • Calculating a Running Total Part 2

    To finish up the topic that I started in my previous post, I wanted to post a more complex example of running total calculations. This is based off a request on the MSDN forums, for a running total calculation that would “slide” along as additional rows were processed. In the poster’s example, the running total needed to reflect the total for the ...
    Posted to BI Thoughts and Theories (Weblog) by jwelch on June 11, 2008
  • Calculating a Running Total In SSIS

    Running totals are a common calculation for reporting, and are occasionally needed in ETL processes to populate aggregate tables. One way to accomplish this in SSIS, if you are retrieving data from a relational database, is to do the running total in the SELECT statement. There are a number of resources on the Internet that illustrate how to ...
    Posted to BI Thoughts and Theories (Weblog) by jwelch on June 8, 2008
  • See if a File is Locked

    A question that comes up occasionally on the forums is how to determine if a file is being written to by another process. It can cause issues if a file is partially written when a source component starts extracting data from it. There is a way to check this through a Script Task. The script below attempts to lock the file for writing. If the file ...
    Posted to BI Thoughts and Theories (Weblog) by jwelch on May 12, 2008
  • Sending an Alert if a Package Runs Too Long

    A question that has come up in a few different situations recently is how to send someone an alert if your package is taking too long to execute. For example, you might have a package that loads a large number rows from a source system to a destination on a nightly basis. There are a number of other packages that depend on this one to complete ...
    Posted to BI Thoughts and Theories (Weblog) by jwelch on April 20, 2008
  • Importing Files Using SSIS

    A topic that has come up a few times recently is the idea of loading a set of files into a database using SSIS. One of the data flow components in SSIS is the Import Column transform, which allows you to load files into a binary column. There is a great video by Brian Knight that shows how to use it, and I recommend viewing that. If you are ...
    Posted to BI Thoughts and Theories (Weblog) by jwelch on February 2, 2008
  • Checking for the Existence of a File

    The File System Task in SSIS doesn't support checking to see if a file exists. You can work around this easily with a script task. Create a new script task and add a Imports statement referencing the System.IO namespace to the top of the script.Imports System.IO Then add the following to the Main method:If ...
    Posted to BI Thoughts and Theories (Weblog) by jwelch on October 31, 2007
  • Address Columns Generically In a Script Component

    When writing script components in SSIS, it's often useful to be able to process the columns without knowing exactly what they are. For example, you may want to loop through all the columns to check for a conditional, like NULL values in the columns. Or you may want to take a set of columns and concatenate them into a single string for output, or ...
    Posted to BI Thoughts and Theories (Weblog) by jwelch on October 20, 2007
  • Dynamically Pivoting Rows to Columns

    Previously, I posted about dynamically un-pivoting columns to rows. In this post, we'll look at the reverse scenario. Suppose that you have a list of sales orders, in this format: Sales Order Number Product SO-001 Hammer SO-001 Table Saw SO-001 Cordless Screwdriver SO-002 Table ...
    Posted to BI Thoughts and Theories (Weblog) by jwelch on September 13, 2007
  • Using the WMI Data Reader in SSIS

    A recent post on the MSDN forums was asking about using the WMI Data Reader Task to retrieve information and send it to a SQL Server destination. I wasn't very familiar with the task, so I decided to try it out. I wasn't expecting much, given some of my experiences with the WMI Event Watcher (which I have found fairly difficult to get working ...
    Posted to BI Thoughts and Theories (Weblog) by jwelch on September 4, 2007
Powered by Community Server (Personal Edition), by Telligent Systems