I have been working with the Sql Server 2008 R2 SSIS Tutorial at
https://msdn.microsoft.com/en-us/library/ms170419(v=sql.105).aspx
--specifically -- Lesson 1. I have been having some problems with this lesson where the source data from the samples download doesn’t exactly match the data described in the tutorial, and the tables in the tutorial are different from what is contained in AdventureWorksDW (tutorial refers to DimTime – AdventureWorksDW contains DimDate and no DimTime). So, after futzing in BI with this tutorial so that I can at least get it to run in Debug – it errors out on the 2<sup>nd</sup> LookUp object.
Rather than looking for a fix to the problem(s) that I am having between the tutorial and the stuff I downloaded in the samples -- I want “Adapt” the tutorial so I can use the stuff I downloaded and hopefully learn how to use SSIS with the elements (source data and tables) that are present on my workstation. Here is a description of what is going on for me – which I really don’t understand what is going on in BI – based on the images below – like what columns (from what tables) are they associating to in the OleDB Destination? Note: the sql in the LookUps here is the sql that I copied from the tutorial. I probably need to modify these sql statements – so -- the help I am requesting is to make the required modifications/changes so that I can adapt this tutorial with the stuff that’s on my workstation.
I downloaded the samples and the AdventureWorksDW mdf for Sql Server 2008 R2. It turns out that in the tutorial it wants me to select a DimTime table, but the version of the AdventureWorksDW db does not contain a DimTime table. Instead, it contains a DimDate table. So I tried adapting DimDate for the tutorial. Additionally, the sample data file -- SampleCurrencyData.txt -- has slightly different data types than the types described in the tutorial, so I selected data types for the columns in the datasource text file that would work in BI would to connect column from source data file to the table.
After finishing all the steps for Lesson 1 -- when I tried debugging the package – and it error'd out on the 2<sup>nd</sup> Lookup object whichwent red. I edited the lookups and the sample Ole DB Destination to "ignore on fail” and I did all green but the FactCurrencyRate table is not being populated -- as described in the tutorial, so I reset the on error back to default (Fail on error option). And based on this tutorial -- I believe FactCurrencyRate table is the table which is supposed to be populated with the data from SampleCurrencyData.txt?
In the sample data file that downloaded with all the samples I removed all the data from the text file except for 6 rows, so instead of the original 1100 or so rows, I have only 6 rows of data in the source data file (just to keep things simple for debugging for now). I did not modify the data itself. Here is what the (raw) data contained in SampleCurrencyData.txt looks like (from the samples that I downloaded from codeplex) – it’s supposed to be 4 columns of data – float, nvarchar, datetime, float:
0.281690141 USD 6/26/2004 0:00 0.281713948
0.281690141 USD 6/27/2004 0:00 0.281642539
0.281690141 USD 6/28/2004 0:00 0.281761573
0.283286119 USD 6/29/2004 0:00 0.283221933
0.283286119 USD 6/30/2004 0:00 0.283358363
0.281690141 USD 7/1/2004 0:00 0.281682206
Below are images of my BI Layout for Lesson 1 from this tutorial -- the FlatFile and configurations for On Fail Error, A Flow task, the 2 LookUps (CurrencyKey and DataKey), the OleDB Destination configuration, the Design view of the associated tables and the Debug Run of Lesson 1, and the following error messages. My goal is to figure out what is going on in BI for this tutorial.
Error: 0xC020901E at Extract Sample Currency Data, Lookup Datakey [51]: Row yielded no match during lookup.
Error: 0xC0209029 at Extract Sample Currency Data, Lookup Datakey [51]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "Lookup Datakey" (51)" failed because error code 0xC020901E occurred, and the error row disposition on "output "Lookup Match Output" (53)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
Error: 0xC0047022 at Extract Sample Currency Data, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Lookup Datakey" (51) failed with error code 0xC0209029 while processing input "Lookup Input" (52). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
--this is the flat file -- SampleCurrencyData.txt (which only contains 6 data rows for my purposes)
--and here is where I assign the data types for the colums of -- SampleCurrencyData.txt
This is the first LookUp Object -- LookUp Currency Key – The DB contains DimCurrency table. I copied the sql from the tutorial here.
I actually have a DimCurrency table in my copy of AdventureWorksDW. Here’s the design view of DimCurrency and a sample of the data contained in DimCurrency and the On Fail configuration
------------------------------------------
I actually have a DimCurrency table in my copy of AdventureWorksDW. Here’s the design view of DimCurrency and a sample of the data contained in DimCurrency and the On Fail configuration
--Here is what the data looks like in the DimCurrency table
---------------------------------------------
--2<sup>nd</sup> LookUp object -- LookUp Data Key – this is the LookUp where BI errors out on Debug
--it appears this lookup is referencing the DimDate table – which I DO have in the DB.
--I can’t find the following sql in the tutorial, so I suppose BI added the sql (did it?)
--Here's how I configured for On Error
--Here is DimDate table in Design view
--Here is a sample of the original data contained in DimData
-------------------------------------------
OleDB Destination
--Here is where I get lost a bit – what is going on in the destination here?
--Here's my On Error configuraino
--and here is the FactCurrencyRate table
--and here is a sample of the data contained in FactCurrencyRate
Rich P