Hi,
Thanks for replying.
Yes I've found and read your article just after editing my post. From memory I had tried a similar solution last year and although it loads only once, it failed loading in memory millions of data.
The aim here is the following, maybe there is a better way of doing it ?
"Staging_tbl_Temp_Mouvement" contains all yesterday's shop transactions, which is really a detail of all the products sold. It usually contains between 200k and 500k of records.
"dwh_D_Produit" is our main product reference database and contains about 7.5M of records (for now).
The trouble is that the shops don't always use our main product reference table to create the products on their retail database. Therefore the daily transactions come with all kind of identification for the same product.
I'm trying to match that product the best I can from different maners in this job.
First step with tMap1 is to match the product from the transaction with the main table using the barre code 1. If match is found then that product goes into a temp table, otherwise it goes into tMap2 where I try matching with barre code 2. If that also fails the I try in tMap3 to match with brand, product reference, color and size.
While writing this reply I was trying out 2 solutions based on your article, see pictures attached. They both failed because they're loading once in the tHashOutputs and again in the tHashInputs, the memory usage keeps increasing during these loads and eventuall crashes before even trying to read the transaction table!