Domanda

So I'm loading a fact table from another table. I'm doing this through a series of lookups. So all the records I want loaded in the fact table. Even the ones that don't match I turn into a 0 and reinsert. So my fact table ends with a 1 to 1 mapping of the source. If I have 50,000 records in the source 50,000 records are inserted into the FACT Table.

The problem I have arising is when I implement an error table to handle the no matched records. Now when I load the error table I don't get a 1 to 1 mapping. In fact sometimes the error table is quite greater than the source/fact table.

What would a solution be to get a 1 to 1 mapping?

È stato utile?

Soluzione

If you do have each no match look up hooked to the error table then you would end up with multiple rows. Instead you can go back to setting the looked up value as 0 for the lookups and before your final insert have a conditional split to check if lookup1 value = 0 OR lookup2 value = 0 or lookup4 value = 0 etc and route this to the error destination and the default where all lookups worked routed to the original table destination. Again if your looked up value can be 0 then you might want to set unsuccessful lookups to something else (-1 perhaps).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top