<?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>BI Monkey &#187; Data Types</title>
	<atom:link href="http://www.bimonkey.com/tag/data-types/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bimonkey.com</link>
	<description>James Beresford on Microsoft BI and Consulting in Sydney, Australia</description>
	<lastBuildDate>Mon, 06 Sep 2010 00:59:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flat File Sources and the Decimal Data Type</title>
		<link>http://www.bimonkey.com/2009/07/flat-file-sources-and-the-decimal-data-type/</link>
		<comments>http://www.bimonkey.com/2009/07/flat-file-sources-and-the-decimal-data-type/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 00:55:46 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[Data Types]]></category>
		<category><![CDATA[Flat File]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=498</guid>
		<description><![CDATA[Question: What Data Type should you use for importing a column in Flat File containing Decimal data?
Answer: numeric [DT_NUMERIC]
You cannot use the decimal [DT_DECIMAL] type, because in the Advanced Editor of the Flat File connection, the decimal type for some reason only allows you to set the Scale (the number of digits after the decimal [...]]]></description>
			<content:encoded><![CDATA[<p>Question: What Data Type should you use for importing a column in Flat File containing <strong>Decimal</strong> data?</p>
<p>Answer: <strong>numeric [DT_NUMERIC]</strong></p>
<p>You cannot use the <strong>decimal</strong> [DT_DECIMAL] type, because in the Advanced Editor of the Flat File connection, the <strong>decimal</strong> type for some reason only allows you to set the Scale (the number of digits after the decimal point) &#8211; the Precision is greyed out (precision is the total number of digits). The <strong>numeric</strong> data type allows the setting of both values.</p>
<p>Fortunately the SSIS <strong>numeric</strong> type maps to SQL Server <strong>decimal</strong> columns without complaint, so you don&#8217;t have to add a <a title="SQL Server SSIS Data Conversion Transformation | BI Monkey" href="http://www.bimonkey.com/2009/06/the-data-conversion-transformation/">Data Conversion </a>to change numeric to decimal before using it. I have <a title="SSIS Flat File Connection Manager: Cannot set precision for Decimal columns" href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=477262">raised a bug on Connect</a> &#8211; please vote it up if you consider this worth fixing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2009/07/flat-file-sources-and-the-decimal-data-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Data Conversion Transformation</title>
		<link>http://www.bimonkey.com/2009/06/the-data-conversion-transformation/</link>
		<comments>http://www.bimonkey.com/2009/06/the-data-conversion-transformation/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 01:03:09 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[Data Conversion]]></category>
		<category><![CDATA[Data Types]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=335</guid>
		<description><![CDATA[In this post I will be covering the Data Conversion Transformation. The sample package can be found here for 2005 and guidelines on use are here.
What does the Data Conversion do?
The transformation takes input columns and creates a copy of that column with a new data type. This is a vital component in SSIS because SSIS [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 235px"><img title="The Data Conversion Transformation" src="http://www.bimonkey.com/uploads/componentreview/dataconversion1.jpg" alt="b" width="225" height="66" /><p class="wp-caption-text">Fig 1: The Data Conversion Transformation</p></div>
<p>In this post I will be covering the Data Conversion Transformation. The sample package can be found <a title="SQL 2005 SSIS Data Conversion Sample (Right Click, Save As)" href="http://www.bimonkey.com/uploads/componentreview/Data%20Conversion%20Transformation%20Basics%202005.zip">here for 2005</a> and guidelines on use are <a title="Using samples from BI Monkey" href="http://www.bimonkey.com/support/using-ssis-samples-from-this-site/">here</a>.</p>
<h2>What does the Data Conversion do?</h2>
<p>The transformation takes input columns and creates a <em>copy </em>of that column with a new data type. This is a vital component in SSIS because SSIS is very fussy about Data Types &#8211; you cannot force an integer typed column into a string destination. It should go &#8211; in theory &#8211; but this strictness prevents sloppy errors and more importantly allows SSIS to be truly platform independent by ensuring its internal data types can be reliably matched to the target.</p>
<p>Configuring the component is pretty simple &#8211; you pick your input column, set the name of the output and pick the target data type. Depending on the target data type you may have other configuration options such as precision, scale, length or code page. The snapshot below is taken from the sample package.</p>
<div class="wp-caption alignnone" style="width: 694px"><img title="Configuring the Data Conversion Transformation" src="http://www.bimonkey.com/uploads/componentreview/dataconversion2.jpg" alt="b" width="684" height="99" /><p class="wp-caption-text">Fig 2: Configuring the Data Conversion Transformation</p></div>
<p>An important thing to be aware of is how the Data Conversion transform handles missing data. A blank field will return an error when you try to convert it to pretty much anything but a string &#8211; if you have missing values that you want to sail through this component, you must convert them to NULLs first, as a NULL can be converted (to the appropriate NULL) but a blank string is technically a value, and one that cannot be validly converted. It would be good if there was an option to treat blanks as nulls, but for now there isn&#8217;t, so be careful. There is a demonstration of this in the sample package in Data Flow 2.</p>
<h2>When would you convert Data to a new Type?</h2>
<p>The need for this kind of change is manifold &#8211; two of my most common uses would be converting data from text files to the correct types &#8211; from strings into dates, numbers, currency etc. &#8211; and when moving data between relational systems. While an ADO .NET source may give you data as one general type &#8211; say an int, you may want to put it in a different type field for an SQL Server database, such as a tinyint.</p>
<p>MSDN Documentation for the Data Conversion Transformation can be found here for <a title="SQL 2008 Data Conversion Transformation Documentation on MSDN" href="http://msdn.microsoft.com/en-us/library/ms141706.aspx">2008</a> and here for <a title="SQL 2005 Data Conversion Transformation Documentation on MSDN" href="http://msdn.microsoft.com/en-us/library/ms141706(SQL.90).aspx">2005</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2009/06/the-data-conversion-transformation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SSIS Data Types</title>
		<link>http://www.bimonkey.com/2008/05/ssis-data-types/</link>
		<comments>http://www.bimonkey.com/2008/05/ssis-data-types/#comments</comments>
		<pubDate>Mon, 05 May 2008 04:29:53 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[Data Types]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=19</guid>
		<description><![CDATA[This is a useful guide on MSDN for mapping SSIS Data Types to that of various databases.
http://msdn.microsoft.com/en-us/library/ms141036.aspx
The top part is an explanation of each SSIS data type. Further down is a mapping of various databases (notably SQL Server, Oracle and DB2) data types to SSIS types.
Brian Knight has a nice grid mapping SSIS Types to [...]]]></description>
			<content:encoded><![CDATA[<p>This is a useful guide on MSDN for mapping SSIS Data Types to that of various databases.</p>
<p><a title="SSIS Data Type Mapping" href="http://msdn.microsoft.com/en-us/library/ms141036.aspx">http://msdn.microsoft.com/en-us/library/ms141036.aspx</a></p>
<p>The top part is an explanation of each SSIS data type. Further down is a mapping of various databases (notably SQL Server, Oracle and DB2) data types to SSIS types.</p>
<p>Brian Knight has a <a title="SSIS Connection Manager Data Types Mapping to SQL Server Data Types " href="http://pragmaticworks.com/community/blogs/brianknight/archive/2008/02/16/ssis-connection-manager-data-types-mapping-to-sql-server-data-types.aspx">nice grid mapping SSIS Types to SQL Server</a> which is a little easier to read for those working in a pure SQL Server environment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2008/05/ssis-data-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
