August 25, 2003 at 5:21 am
i am using DTS lookups to add dimensionid's into fact tables but it doesnt seem to work..i get no errors for this but the column is not being added to the target facttable.what should i do about it
could anyone please help me out.i really really need some guidance.thnx
August 25, 2003 at 8:15 am
Can you explain what your exactly doing?
Are you passing the correct variable to the lookup?
Are you adding the keys to right table?
August 25, 2003 at 12:50 pm
what i am actually doing is that i am using a task to transfer a table from oracle source to an sql DB.
My tables are in the oracle DB but i am making Dimensions and fact tables in a SQL DB .for this purpose i am using an Query builder to make a query.
now what i want is to add dimension id's from the sql DB to be transfered to the SQL DB(this is the same DB as for Dimensions) .so for adding dimension id's i am using lookups..but in the lookup portion i m using the connection to the SQL DB and just selecting a column from the table like e.g Time_id from time Dimension..
but this is not working..i dnt get any errors but the id is not there even
Do u think it is becoz i have the same SQL DB as the target from which i want to get dimensionid's..what should i do about it.i would be very grateful if u help me..
August 26, 2003 at 12:53 pm
Here is an example of a lookup that we use to create the Factory_ID dimension:
SELECT Factory_ID
FROM Factory_Dim
WHERE (FactoryName = ?)
This will return a numeric value from the Factory_Dim table where Factory_ID = 1,2,3,etc) and FactoryName (such as "Germany" returns a numeric value of "1".
The lookup code is then added to the transform connection with the following code:
(note: this transform is via VBScript :
Function Main()
DTSDestination("Factory_ID") =DTSLookups("FactoryDim").Execute(DTSSource("F16").value)
Main = DTSTransformStat_OK
End Function
**F16 is the "source" value to be translated - in this case the value =
"Germany" and the lookup returns "1" for this dimensionID...
Give it a try and see if this example code helps!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply