<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>select SIFISO</title>
	<atom:link href="http://www.selectsifiso.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.selectsifiso.net</link>
	<description>Hey, let&#039;s DEV IT!</description>
	<lastBuildDate>Sun, 10 Mar 2013 15:21:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Failing to Preview Report in Report Builder</title>
		<link>http://www.selectsifiso.net/?p=640</link>
		<comments>http://www.selectsifiso.net/?p=640#comments</comments>
		<pubDate>Thu, 28 Feb 2013 09:57:39 +0000</pubDate>
		<dc:creator>Sifiso</dc:creator>
				<category><![CDATA[Execute Report Definitions]]></category>
		<category><![CDATA[Permissions]]></category>
		<category><![CDATA[Report Builder]]></category>
		<category><![CDATA[Report Builder 3]]></category>
		<category><![CDATA[Report Manager]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SSRS]]></category>
		<category><![CDATA[System Role]]></category>
		<category><![CDATA[Create System Role]]></category>
		<category><![CDATA[datasets]]></category>
		<category><![CDATA[Report Builder 3.0]]></category>
		<category><![CDATA[Report Manager Configuration]]></category>
		<category><![CDATA[Reporting Services]]></category>
		<category><![CDATA[Role]]></category>
		<category><![CDATA[SSRS 2012]]></category>
		<category><![CDATA[Start SQL Server Management Studio]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://www.selectsifiso.net/?p=640</guid>
		<description><![CDATA[Abstract We recently delivered a SQL Server 2012 Reporting Services solution to a client with an additional capability for client&#8217;s business users to be able to design, develop and publish ad hoc reports using Report Builder 3.0. During unit testing we had one of the Business Analysts (BA) in our team simulate business user experience [...]]]></description>
				<content:encoded><![CDATA[<p><strong>Abstract</strong></p>
<p>We recently delivered a <a title="Reporting Services (SSRS)" href="http://msdn.microsoft.com/en-us/library/ms159106(v=sql.110).aspx" target="_blank">SQL Server 2012 Reporting Services</a> solution to a client with an additional capability for client&#8217;s business users to be able to design, develop and publish ad hoc reports using <a title="Report Builder 3.0" href="http://msdn.microsoft.com/en-us/library/dd207008(v=sql.105).aspx" target="_blank">Report Builder 3.0</a>. During <a title="Unit Testing" href="http://msdn.microsoft.com/en-us/library/aa292197(v=vs.71).aspx" target="_blank">unit testing </a>we had one of the Business Analysts (BA) in our team simulate business user experience by attempting to create reports using Report Builder. Although the BA could connect to <a title="Datasets" href="http://msdn.microsoft.com/en-us/library/ms160324(v=sql.90).aspx" target="_blank">datasets </a>and design a report accordingly, he couldn’t run the newly designed report from Report Builder. The error that he got is as follows &#8211; &#8220;Failed to preview report. The permissions granted to user &#8216;*selectSifiso\Sifiso&#8217; are insufficient for performing this operation&#8221; (for the rest of the article the error will be referred to as &#8216;this error&#8217;). The error basically relates to user permissions. I have gone through the web to find possible workarounds to this error and as it turns out this error is not so uncommon in the world of Business Intelligence. Thus, this article will demonstrate how to resolve such an error should you encounter it too.</p>
<p><em style="font-size: 8pt;">*For obvious security reasons, I replaced the original BA account with my dummy account. </em></p>
<p><strong>Requirements</strong></p>
<ul>
<li><em>Software Requirements:</em>
<ul>
<li><a href="http://www.microsoft.com/en-us/sqlserver/editions.aspx" target="_blank"><em>Microsoft SQL Server 2012</em></a></li>
<li><em>SQL Server Reporting Services</em></li>
<li><em>Report Builder 3.0</em></li>
</ul>
</li>
<li><em>Conceptual Understanding of:</em>
<ul>
<li><em>SQL Server Reporting Services</em></li>
<li><em>Report Builder 3.0</em></li>
<li><a title="Configure Report Manager" href="http://technet.microsoft.com/en-us/library/cc281384.aspx" target="_blank"><em>Report Manager Configuration</em></a></li>
</ul>
</li>
</ul>
<p><em style="font-size: 8pt;">**Please note that the above requirements are only necessary for fixing the user permissions error as it is this article main objective. There are further requirements for developing an SSRS Reporting Solution.</em></p>
<p><strong>Article</strong></p>
<p>According to <a href="http://msdn.microsoft.com/en-us/library/ms403427(v=sql.90).aspx" target="_blank">this msdn article</a>, in Reporting Services there is a task referred to as Execute Report Definitions (ERD) which allows for the processing of a &#8220;report definition that is not currently stored on the report server&#8221;.</p>
<p>Now going back to the issue we are trying to resolve, assigning our BA a role that includes the ERD task would obviously solve our problem.</p>
<p>Unfortunately, or fortunately (depending on your user role in a given report server) the ERD task is available to users assigned to system roles i.e. system administrator and system user.</p>
<p>Therefore, in order to prevent a situation whereby you have all business users assigned to system administrator roles, the best practice would be to setup another system role with only an ERD task.</p>
<p>Thereafter you can merely assign business users, in our example the BA, to the role with an ERD task.</p>
<p>In the following steps we will demonstrate the creation of a system role with ERD task and assigning users to that role.</p>
<p>Step 1: Create System Role</p>
<p>1.1. In an administrator mode, Start SQL Server Management Studio (SSMS) and connect to Reporting Services</p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/reporting_serv.png"><img class="alignnone size-full wp-image-667" alt="reporting_serv" src="http://www.selectsifiso.net/wp-content/uploads/reporting_serv.png" width="436" height="322" /></a><br />
1.2. Navigate to System folder, collapse it, then right click to System Roles sub-folder and choose New System Role&#8230; (If you didnt launch SSMS as an administrator, the option of adding a New System Role would appear greyed-out)</p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/new_sys_role.png"><img class="alignnone size-full wp-image-668" alt="new_sys_role" src="http://www.selectsifiso.net/wp-content/uploads/new_sys_role.png" width="304" height="214" /></a><br />
1.3. In an New System Role dialog box, for the purposes of this exercise let&#8217;s assign <em>RunReportBuilder</em> into the Name textbox. Then check the Execute Report Definitions task.</p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/RunReportBuilder.png"><img class="alignnone size-full wp-image-669" alt="RunReportBuilder" src="http://www.selectsifiso.net/wp-content/uploads/RunReportBuilder.png" width="702" height="434" /></a></p>
<p>Step 2: Assign Users to RunReportBuilder System Role</p>
<p>2.1. Again, preferebly launch your Roport Manager as administrator (in order for that to happen, launch Internet Explorer/preferred browser as administrator)<br />
2.2. Click Site Settings &#8211; usually found at top right side menu in browsers.<br />
2.3. Still in your Site Settings page, click Security tab<br />
2.4. The Security tab will return a list of users/groups with their respective roles, click on <em>New Role Assignment</em></p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/site_settings_after.png"><img class="alignnone size-full wp-image-671" alt="site_settings_after" src="http://www.selectsifiso.net/wp-content/uploads/site_settings_after.png" width="773" height="242" /></a><br />
2.5. After a New Role Assignment page loads, on the Group or user name textbox type the account of the user you would like grant access to the ERD task. Thereafter check the the RunReportBuilder role.</p>
<p><strong>Conclusion</strong></p>
<p>You can now inform the user to test run a report using Report Builder to check that the role assignment have taken effect.</p>
<p>Till next time folks, cheers.</p>
<p>Sifiso.</p>
<div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-6410"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.selectsifiso.net/?feed=rss2&#038;p=640</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compress Dynamic Files Using 7-Zip in SSIS</title>
		<link>http://www.selectsifiso.net/?p=606</link>
		<comments>http://www.selectsifiso.net/?p=606#comments</comments>
		<pubDate>Sun, 30 Dec 2012 09:22:43 +0000</pubDate>
		<dc:creator>Sifiso</dc:creator>
				<category><![CDATA[Execute Process Task]]></category>
		<category><![CDATA[ForEach Loop Container]]></category>
		<category><![CDATA[Script Component]]></category>
		<category><![CDATA[7-Zip]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# programming language]]></category>
		<category><![CDATA[ForEach Loop]]></category>
		<category><![CDATA[ForEachLoop Container]]></category>
		<category><![CDATA[script task]]></category>

		<guid isPermaLink="false">http://www.selectsifiso.net/?p=606</guid>
		<description><![CDATA[Abstract This blog post is in response to a request/comment from Thato in this previous article. Hence, I have taken much of the logic used in the aforementioned article and changed it from static to dynamic file compression. Thus, I am still using SQL Server Integration Services&#8216;s Execute Process Task to compress dynamic files into [...]]]></description>
				<content:encoded><![CDATA[<p><strong>Abstract</strong></p>
<p style="text-align: left;">This blog post is in response to a request/comment from Thato in <a href="http://www.selectsifiso.net/?p=558">this previous article</a>. Hence, I have taken much of the logic used in the aforementioned article and changed it from static to dynamic file compression. Thus, I am still using <a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/ms141026.aspx">SQL Server Integration Services</a>&#8216;s <a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/ms141166.aspx">Execute Process Task</a> to compress dynamic files into a .rar format using <a style="text-decoration: none;" href="http://www.7-zip.org/">7-Zip</a>.</p>
<p><strong>Requirements</strong></p>
<ul>
<li><strong><em><a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/ms950416.aspx">Microsoft Visual Studio 2005 or later</a></em><em> </em></strong></li>
<li><strong><em><a style="text-decoration: none;" href="http://www.7-zip.org/">7-Zip</a></em></strong><em> </em></li>
</ul>
<p><strong>Article</strong></p>
<p>Let&#8217;s begin by launching <em>Microsoft Visual Studio</em> and create a new Integration Services Project which is located under Business Intelligence Projects category. (If you are using <em>SQL Server 2012</em> or later, you will have to launch <em>SQL Server Data Tools</em> &#8211; SSDT).</p>
<p>After you have assigned a project name, lets add some variables that will be used to store the dynamic content. I setup the variables as follows:</p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/main5.png"><img class="alignnone size-full wp-image-612" title="main" alt="" src="http://www.selectsifiso.net/wp-content/uploads/main5.png" width="604" height="123" /></a></p>
<ul>
<li>var_FileName <em>(is of type String and stores file name and extension)</em></li>
<li>var_WorkingDIR<em> (is of type String and stores path for working directory)</em></li>
<li>var_NewFileName<em> (is of type String and stores a derived archive file name)</em></li>
<li>var_Exec <em>(is of type String and stores the path to the executable 7-Zip file)</em></li>
</ul>
<p>Now let&#8217;s click and drag the <em>ForEach Loop Container</em> (FLC) into <em>Control Flow</em> pane from toolbox (<em>SSIS Toolbox</em> in SSDT).</p>
<p>Right click FLC and click on “Edit”. Under the <em>Collection</em> tab, ensure that Enumerator is <em>Foreach File Enumerator</em>. Setup <em>Directory</em> as expression and map it to the <em>var_WorkingDIR</em> variable. Lastly, make sure that <em>Name and extension</em> is checked under the <em>Retrieve file name</em> group box. In summary, the <em>Collection</em> tab should be configured as below:</p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/main4.png"><img class="alignnone size-full wp-image-611" title="main" alt="" src="http://www.selectsifiso.net/wp-content/uploads/main4.png" width="643" height="357" /></a></p>
<p>Still on FLC, under the <em>Variable Mappings</em> tab map variable <em>var_FileName</em> to the first index 0 as shown below:</p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/main2.png"><img class="alignnone size-full wp-image-609" title="main" alt="" src="http://www.selectsifiso.net/wp-content/uploads/main2.png" width="517" height="129" /></a></p>
<p>The next step is to drag a Script Task (ST) into the FLC. The ST will be used to initialize variable <em>var_NewFileName</em>. Under the Script tab of the ST ensure that you have configured the read/write variables as shown below:</p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/main1.png"><img class="alignnone size-full wp-image-608" title="main" alt="" src="http://www.selectsifiso.net/wp-content/uploads/main1.png" width="584" height="124" /></a></p>
<p>Still on ST, click Edit Script. Reference the System namespace as shown below:</p>
<ul>
<li><a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/system.aspx">Using System</a></li>
</ul>
<p>The rest of the code in the Main class should be as follows:</p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/main.png"><img class="alignnone size-full wp-image-607" title="main" alt="" src="http://www.selectsifiso.net/wp-content/uploads/main.png" width="574" height="151" /></a></p>
<p>The final step is to drag and drop the <em>Execute Process Task</em> (EPT) into <em>Control Flow</em> pane from toolbox (<em>SSIS Toolbox</em> in SSDT).</p>
<p>Right click EPT and click on “Edit”</p>
<p>Under the <strong>General Tab</strong>, you can assign relevant <em>Name</em> &amp; <em>Description</em>. In this case I have decided to name the task as &#8220;<strong>EPT &#8211; Compress Dynamic Files</strong>&#8221; whilst <em>Description </em>remains unchanged.</p>
<p>In the <strong>Process Tab</strong>, the EPT properties must be set as follows:</p>
<ul>
<li>RequiredFullFileName : True</li>
<li>FailTaskIfReturnCodeIsNotSuccessValue : True</li>
<li>SuccessValue : 0</li>
<li>Timeout : 0</li>
<li>WindowStyle : Hidden</li>
</ul>
<p>Still on the EPT, we now need to configure expressions. Thus the expression tab should look as follows:</p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/main6.png"><img class="alignnone size-full wp-image-613" title="main" alt="" src="http://www.selectsifiso.net/wp-content/uploads/main6.png" width="699" height="109" /></a></p>
<p>&nbsp;</p>
<p>Basically some of the noticeable things we have done above is to hide the <em>exe</em> window that appears when the file is being compressed. The <em>Executable</em> and <em>WorkingDirectory</em> properties are set via variables. The <em>Arguments</em> property is also set using variables and we have further hard coded the extension of the compressed file to be that of type <em>rar</em>. Luckily <em>7-Zip</em> supports various file compression types, so you can change the <em>rar</em> extension to an extension of your choice. Of course depending on the extension you have provided the size of the new compressed file will vary.</p>
<p>PS: You can download a copy of this package <strong><a href="http://www.selectsifiso.net/wp-content/uploads/sS_CompressFileWithArguements-Copy.rar">here</a></strong>.</p>
<p>It&#8217;s that simple.</p>
<p>Till next time folks, cheers.</p>
<p>Sifiso.</p>
<p><a style="display: none;" href="http://www.codeproject.com" rel="tag">CodeProject</a></p>
<div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-6070"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.selectsifiso.net/?feed=rss2&#038;p=606</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Using REST API in SSIS to Extract Top 100 User Tweets</title>
		<link>http://www.selectsifiso.net/?p=578</link>
		<comments>http://www.selectsifiso.net/?p=578#comments</comments>
		<pubDate>Sat, 24 Nov 2012 06:47:36 +0000</pubDate>
		<dc:creator>Sifiso</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Data Flow Task]]></category>
		<category><![CDATA[HTTP Connection]]></category>
		<category><![CDATA[OLEDB Connection]]></category>
		<category><![CDATA[Script Component]]></category>
		<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[.NET Framework 3.5]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# programming language]]></category>
		<category><![CDATA[Destination Component]]></category>
		<category><![CDATA[Dynamic SSIS Package]]></category>
		<category><![CDATA[HTTP Connection Manager]]></category>
		<category><![CDATA[OLE DB]]></category>
		<category><![CDATA[OLEDB Destination]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[Script Component Source]]></category>
		<category><![CDATA[SQL Server Integration Services]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[SSIS 2012]]></category>
		<category><![CDATA[Tweets]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.selectsifiso.net/?p=578</guid>
		<description><![CDATA[Abstract The growing popularity of the use of social networks by businesses indicate a possible change in ETL requirements. Part of this change is that developers had to revise existing ETL model such that it caters for sourcing of data off the internet in addition to the traditional flat files or OLE/ODBC Connections. In this [...]]]></description>
				<content:encoded><![CDATA[<p><strong>Abstract</strong></p>
<p style="text-align: left;"><em>The growing popularity of the use of social networks by businesses indicate a possible change in ETL requirements. Part of this change is that developers had to revise existing ETL model such that it caters for sourcing of data off the internet in addition to the traditional <strong><a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/ms141716(v=sql.90).aspx">flat files or OLE/ODBC Connections</a></strong>. In this article, I will demonstrate extracting user tweets using <strong><a style="text-decoration: none;" href="https://dev.twitter.com/docs/api/1.1">Twitter&#8217;s REST API</a></strong> inside an <strong><a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/ms137602.aspx">HTTP Connection Manager</a></strong>.</em></p>
<p><strong>Requirements</strong></p>
<ul>
<li><strong><em><a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/ms950416.aspx">Microsoft Visual Studio 2005 or later</a></em><em> </em></strong></li>
<li><strong><em><a style="text-decoration: none;" href="http://www.microsoft.com/sqlserver/en/us/default.aspx">SQL Server 2005 or later</a></em></strong><em> </em></li>
<li><strong><em><a style="text-decoration: none;" href="http://www.microsoft.com/en-za/download/details.aspx?id=21">Microsoft .NET Framework 3.5 or later</a></em></strong><em> </em></li>
<li><strong><em><a style="text-decoration: none;" href="https://twitter.com/">Tweeter User Account that has posted at least 100 tweets</a></em></strong><em> </em></li>
<li><strong><em><a style="text-decoration: none;">An Active Internet Connection</a></em></strong><em> </em></li>
</ul>
<p><strong>Article</strong></p>
<p>Let&#8217;s begin by launching <em>Microsoft Visual Studio</em> and create a new Integration Services Project which is located under Business Intelligence Projects category. (If you are using <em>SQL Server 2012</em> or later, you will have to launch <em>SQL Server Data Tools</em> &#8211; SSDT).</p>
<p>After you have assigned a project name, proceed to click and drag the <em>Data Flow Task</em> (DFT) into <em>Control Flow</em> pane from toolbox (<em>SSIS Toolbox</em> in SSDT). I decided to name my DFT as <em>DFT &#8211; Retrieve Tweets</em></p>
<p>Add the following two connections:</p>
<ul>
<li><em>HTTP Connection Manager</em></li>
<li><em>OLE DB Connection</em></li>
</ul>
<p>I have configured my HTTP Connection as follows:</p>
<ul>
<li><em>Server URL = http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=mafiswana&amp;count=100</em></li>
</ul>
<p>Note that you can replace the value of parameter <em>screen_name</em> with your twitter user account instead of mafiswana.</p>
<p>I have configured my OLE DB Connection as follows:</p>
<ul>
<li><em>Server = Localhost</em></li>
<li><em>Database Name = selectSifiso</em></li>
</ul>
<p>So far the package should look as below:</p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/pull_tweets.png"><img class="alignnone size-full wp-image-592" title="pull_tweets" alt="" src="http://www.selectsifiso.net/wp-content/uploads/pull_tweets.png" width="516" height="484" /></a></p>
<p>Let&#8217;s go back and edit the <em>Data Flow Task</em>.</p>
<p>Add a Script Component (SC) which is located under <em>Data Flow Transformations</em>.</p>
<p>Select Source as a script component type.</p>
<p>Edit the script SC and click on the <em>Connection Managers</em> tab on the left of the <em>Script Transformation Editor</em>. Under the Connection Manager column click to select the <em>HTTP Connection Manager</em> (it should be the only connection available).</p>
<p>Let&#8217;s move on to the <em>Inputs and Outputs</em> tab in the <em>Script Transformation Editor</em>. In here we will configure the source output columns.</p>
<p>Collapse <em>Output 0</em> node and click on <em>Output Columns</em>. Click <em>Add Column</em> and the following columns with properties configured as below:</p>
<ul>
<li><em>Name = sS_Tweets; DataType  = string [DT_STR]; Length = 200</em></li>
<li><em>Name = sS_TwitterDate; DataType  = string [DT_STR]; Length = 200</em></li>
</ul>
<p>Now let&#8217;s move on to the Script tab in the Script Transformation Editor.</p>
<p>In <em>Object Explorer</em>, right click on <em>References</em> and Click <em>Add</em>. Under <em>.NET</em> tab add the following references:</p>
<ul>
<li><em>System.ServiceModel</em></li>
<li><em>System.ServiceModel.Web</em></li>
</ul>
<p>If one or none of above references are not available for selection, please ensure that you have <em>.NET 3.5 Framework</em> selected. You can do that by clicking on <em>Properties &#8211; Application &#8211; Target Framework &#8211; .NET Framework 3.5</em></p>
<p>In addition to the already referenced namespaces, add the following namespaces:</p>
<ul>
<li><em>using System.Xml;</em></li>
<li><em>using System.ServiceModel.Syndication;</em></li>
</ul>
<p>Declare the following variables in the <em>public class ScriptMain : UserComponent</em></p>
<ul>
<li><em>private SyndicationFeed sS_Tweets = null;</em></li>
<li><em>private XmlReader sS_XmlReader = null;</em></li>
</ul>
<p>Under the PreExecute() method, add the following:</p>
<ul>
<li><em>sS_XmlReader = XmlReader.Create(Connections.Connection.ConnectionString);</em></li>
<li><em>sS_Tweets = SyndicationFeed.Load(sS_XmlReader);</em></li>
</ul>
<p>Under the <em>public override void CreateNewOutputRows()</em> method, add the following:<br />
<em>if (sS_Tweets != null)</em></p>
<p><em>{</em></p>
<p><em>           foreach (var item in sS_Tweets.Items)</em></p>
<p><em>                     {</em></p>
<p><em>                             Output0Buffer.AddRow();</em></p>
<p><em>                             Output0Buffer.sS_Tweets= item.Title.Text;</em></p>
<p><em>                             Output0Buffer.sS_TwitterDate= item.PublishDate.ToString();</em></p>
<p><em>                      }</em></p>
<p><em>             Output0Buffer.SetEndOfRowset();</em></p>
<p><em>}</em></p>
<p>The complete script code can be found here &#8211; <a href="http://www.selectsifiso.net/wp-content/uploads/tweets_ssis.zip">tweets_ssis</a></p>
<p>Now that we have configured the <em>Script Component</em> as Source let us add an <em>OLE DB Destination Component</em> (ODD) and connect Script Component to the Destination Component.</p>
<p>I have configured the <em>OLE DB connection manage</em>r of the ODD to use the <em>selectSifiso</em> connection. The data access mode is a <em>Table or view &#8211; fast load</em>. Under <em>Name of the table or the view</em>, click <em>New</em> and create and output table. Click on <em>Mappings</em> tab and ensure that the source-to-destination mappings are correct.</p>
<p>Your complete package data flow task should look as follows:</p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/tweets_dft.png"><img class="alignnone size-full wp-image-601" title="tweets_dft" alt="" src="http://www.selectsifiso.net/wp-content/uploads/tweets_dft.png" width="467" height="489" /></a></p>
<p><strong>Conclusion</strong></p>
<p>All left to do is to run the package and your tweets will be extracted and stored in SQL Server.</p>
<p>It&#8217;s that simple.</p>
<p>Till next time folks, cheers.</p>
<p><em>Sifiso</em></p>
<p><a href="http://www.codeproject.com" style="display:none" rel="tag">CodeProject</a><br />
&nbsp;</p>
<div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-5790"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.selectsifiso.net/?feed=rss2&#038;p=578</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Execute Process Task &#8211; Compress File Using 7-Zip</title>
		<link>http://www.selectsifiso.net/?p=558</link>
		<comments>http://www.selectsifiso.net/?p=558#comments</comments>
		<pubDate>Sun, 11 Nov 2012 12:41:05 +0000</pubDate>
		<dc:creator>Sifiso</dc:creator>
				<category><![CDATA[Creating SSIS Packages]]></category>
		<category><![CDATA[Excel Workbooks]]></category>
		<category><![CDATA[Execute Process Task]]></category>
		<category><![CDATA[Microsoft Visual Studio 2010]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SSIS 2012]]></category>
		<category><![CDATA[7-Zip]]></category>
		<category><![CDATA[Compress]]></category>
		<category><![CDATA[Compress File]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[SQL Server Integration Services]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://www.selectsifiso.net/?p=558</guid>
		<description><![CDATA[Abstract In this blog post I will demonstrate using SQL Server Integration Services&#8216;s Execute Process Task to compress a csv file into a zip format using 7-Zip. Requirements Microsoft Visual Studio 2005 or later 7-Zip SIFISO_Test Article Recently I have been involved in a project whereby I have been required to extract data into csv [...]]]></description>
				<content:encoded><![CDATA[<p><strong>Abstract</strong></p>
<p style="text-align: left;">In this blog post I will demonstrate using <a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/ms141026.aspx">SQL Server Integration Services</a>&#8216;s <a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/ms141166.aspx">Execute Process Task</a> to compress a csv file into a zip format using <a style="text-decoration: none;" href="http://www.7-zip.org/">7-Zip</a>.</p>
<p><strong>Requirements</strong></p>
<ul>
<li><strong><em><a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/ms950416.aspx">Microsoft Visual Studio 2005 or later</a></em><em> </em></strong></li>
<li><strong><em><a style="text-decoration: none;" href="http://www.7-zip.org/">7-Zip</a></em></strong><em> </em></li>
<li><strong><em><br />
<a href="http://www.selectsifiso.net/wp-content/uploads/SIFISO_Test.csv">SIFISO_Test</a></em></strong></li>
</ul>
<p><strong>Article</strong></p>
<p>Recently I have been involved in a project whereby I have been required to extract data into csv files, compress the files into a zip format and email the newly compressed files. This blog post is a first of several posts to come whereby I will be demonstrating how to fulfill such a requirement.</p>
<p>Let&#8217;s begin by launching <em>Microsoft Visual Studio</em> and create a new Integration Services Project which is located under Business Intelligence Projects category. (If you are using <em>SQL Server 2012</em> or later, you will have to launch <em>SQL Server Data Tools</em> &#8211; SSDT).</p>
<p>After you have assigned a project name, proceed to click and drag the <em>Execute Process Task</em> (EPT) into <em>Control Flow</em> pane from toolbox (<em>SSIS Toolbox</em> in SSDT).</p>
<p>Right click EPT and click on “Edit”</p>
<p>Under the <strong>General Tab</strong>, you can assign relevant <em>Name</em> &amp; <em>Description</em>. In this case I have decided to name the task as &#8220;<strong>EPT &#8211; Compress File</strong>&#8221; whilst <em>Description </em>remains unchanged.</p>
<p>In the <strong>Process Tab</strong>, the EPT properties must be set as follows:</p>
<ul>
<li>RequiredFullFileName : True</li>
<li>Executable : C:\Program Files\7-Zip\7zG.exe</li>
<li>Arguments: a &#8220;SIFISO_Test.zip&#8221; &#8220;SIFISO_Test.csv&#8221;</li>
<li>WorkingDirectory: C:\Test\Excel\20120930\</li>
<li>FailTaskIfReturnCodeIsNotSuccessValue : True</li>
<li>SuccessValue : 0</li>
<li>Timeout : 0</li>
<li>WindowStyle : Hidden</li>
</ul>
<p>Basically what we have done above is, among other things, set the Executable property to the .exe location of the compressision software we are using; set the Arguments such that file &#8220;SIFISO_Test.csv&#8221; is compressed into &#8220;SIFISO_Test.zip&#8221;; specified the working directory where the csv file will be located and zip file created; hid the exe window that appears when the file is being compressed.</p>
<p>It&#8217;s that simple.</p>
<p>Till next time folks, cheers.</p>
<p>Sifiso.</p>
<p><a href="http://www.codeproject.com" style="display:none" rel="tag">CodeProject</a></p>
<div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-5590"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.selectsifiso.net/?feed=rss2&#038;p=558</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Programmatically Create and Deploy SSIS 2012 Project into Catalog Using C#</title>
		<link>http://www.selectsifiso.net/?p=510</link>
		<comments>http://www.selectsifiso.net/?p=510#comments</comments>
		<pubDate>Tue, 14 Aug 2012 18:49:04 +0000</pubDate>
		<dc:creator>Sifiso</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Catalog]]></category>
		<category><![CDATA[CatalogFolder]]></category>
		<category><![CDATA[Creating SSIS Packages]]></category>
		<category><![CDATA[Microsoft Visual Studio 2010]]></category>
		<category><![CDATA[SMO Server]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SSIS 2012]]></category>
		<category><![CDATA[C# programming language]]></category>
		<category><![CDATA[Create SSIS Package]]></category>
		<category><![CDATA[Managed Object Model]]></category>
		<category><![CDATA[Microsoft Visual C# 2010]]></category>
		<category><![CDATA[Microsoft.SqlServer.Dts.Runtime]]></category>
		<category><![CDATA[Microsoft.SqlServer.Management.IntegrationServices]]></category>
		<category><![CDATA[Microsoft.SqlServer.Management.Smo]]></category>
		<category><![CDATA[SSIS Catalog]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://www.selectsifiso.net/?p=510</guid>
		<description><![CDATA[Abstract SQL Server Integration Services 2012 comes with a new API for scripting packages which is called MOM &#8211; Managed Object Model. In this article, I will demonstrate the scripting of Integration Services Catalog packages using C#. Requirements Microsoft Visual Studio 2010 or later Article We begin by launching Microsoft Visual Studio and create a [...]]]></description>
				<content:encoded><![CDATA[<p><strong>Abstract</strong></p>
<p style="text-align: left;"><em><strong><a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/ms141026.aspx">SQL Server Integration Services 2012</a></strong> comes with a new API for scripting packages which is called MOM &#8211; Managed Object Model. In this article, I will demonstrate the scripting of<strong> <a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.integrationservices.catalog.aspx">Integration Services Catalog packages</a></strong> using <strong><a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/vstudio/hh388566.aspx">C#</a></strong>.</em></p>
<p><strong>Requirements</strong></p>
<ul>
<li><strong><em><a style="text-decoration: none;" href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions">Microsoft Visual Studio 2010 or later</a></em><em> </em></strong></li>
</ul>
<p><strong>Article</strong></p>
<p>We begin by launching Microsoft Visual Studio and create a new Integration Services Project which is located under Business Intelligence Projects category.</p>
<p>After you have assigned a project name, proceed to click and drag the Script Task into Control Flow pane from toolbox.</p>
<p>Right click the script task and click on “Edit”</p>
<p>Under the Script Task Editor change the “ScriptLanguage” to “Microsoft Visual C# 2010&#8243;.</p>
<p>In Project Explorer, ensure the following references are added:</p>
<ul>
<li><strong><a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/system.aspx">System</a></strong></li>
<li><strong><a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.integrationservices.aspx">Microsoft.SqlServer.Management.IntegrationServices</a></strong></li>
<li><strong><a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.aspx">Microsoft.SqlServer.Management.Smo</a></strong></li>
<li><strong><a style="text-decoration: none;" href="http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.aspx">Microsoft.SqlServer.Dts.Runtime</a></strong></li>
</ul>
<p>It is possible that you might not find the Microsoft.SqlServer.Management.IntegrationServices.dll under .NET references in visual studio, in which case I suggest you <span style="text-decoration: underline;"><a style="text-decoration: none;" href="http://www.selectsifiso.net/?p=479">click here</a></span> for an article on referencing the missing assembly file.</p>
<p>Back to the code window, ensure that the following namespaces are declared:</p>
<ul>
<li>using System;</li>
<li>using Microsoft.SqlServer.Management.IntegrationServices;</li>
<li>using Microsoft.SqlServer.Management.Smo;</li>
<li>using Microsoft.SqlServer.Dts.Runtime;</li>
</ul>
<p>Then under your main class create an instance of SMO Server as well as integration services object as shown below:</p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/11.png"><img class="alignnone size-full wp-image-515" title="11" src="http://www.selectsifiso.net/wp-content/uploads/11.png" alt="" width="603" height="52" /></a></p>
<p>The next part is to create an <em>SSIS Catalog</em> database followed by <em>CatalogFolder</em>, <em>Project</em>, then <em>SSIS packages</em>. It is possible, however, that you might have (or an administrator) created the <em>SSIS Catalog</em>. It is also possible that the <em>CatalogFolder</em> might have been created already. In order to address these possible scenarios, I have created a function with a set of parameters  that can be called based on a particular scenario. The function is called:</p>
<ul>
<li><em>sS_SsisObjCreate(int condition, IntegrationServices sS_Is, Catalog sS_Ct, CatalogFolder sS_Cf)</em></li>
</ul>
<div>Now, add the below code in the main class, just after your declarations of SMO Server and Integration Services object.</div>
<div></div>
<div><a href="http://www.selectsifiso.net/wp-content/uploads/111.png"><img class="alignnone size-full wp-image-518" title="11" src="http://www.selectsifiso.net/wp-content/uploads/111.png" alt="" width="517" height="403" /></a></div>
<div></div>
<div>The rest of the code relates to the function &#8220;<em>sS_SsisObjCreate</em>&#8221; and it looks as follows:</div>
<div></div>
<div><a href="http://www.selectsifiso.net/wp-content/uploads/114.png"><img class="alignnone size-full wp-image-525" title="11" src="http://www.selectsifiso.net/wp-content/uploads/114.png" alt="" width="520" height="309" /></a></div>
<div><a href="http://www.selectsifiso.net/wp-content/uploads/116.png"><img class="alignnone size-full wp-image-530" title="11" src="http://www.selectsifiso.net/wp-content/uploads/116.png" alt="" width="495" height="262" /></a></div>
<div><a href="http://www.selectsifiso.net/wp-content/uploads/117.png"><img class="alignnone size-full wp-image-531" title="11" src="http://www.selectsifiso.net/wp-content/uploads/117.png" alt="" width="535" height="271" /></a></div>
<div></div>
<div><strong>Conclusion</strong></div>
<p>Voilà! Now you can open <strong><a style="text-decoration: none;" title="SQL Server Management Studio" href="http://msdn.microsoft.com/en-us/library/ms174173.aspx">SQL Server Management Studio</a></strong> and connect to the Server you provided in the above and you should find your newly created packages as shown below:</p>
<p><a href="http://www.selectsifiso.net/wp-content/uploads/118.png"><img class="alignnone size-full wp-image-535" title="11" src="http://www.selectsifiso.net/wp-content/uploads/118.png" alt="" width="305" height="215" /></a></p>
<p>Cheers.</p>
<p>Sifiso.</p>
<p><a href="http://www.codeproject.com" style="display:none" rel="tag">CodeProject</a></p>
<div class="rw-left"><div class="rw-ui-container rw-class-blog-post rw-urid-5110"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.selectsifiso.net/?feed=rss2&#038;p=510</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
