Errors in the OLAP storage engine: A duplicate attribute key has been found when processing: Table: ‘dbo_DimProduct_test’, Column: ‘ProductKey’, Value: ‘227’.

2852
27995

Friends,

This is my 100th post and hence decided to go with the most useful stuff in this post. n this post we are gonna discuss about the most frequently occurred error in SSAS. The error message looks like below (table and column names may vary).

Errors in the OLAP storage engine: A duplicate attribute key has been found when processing: Table: ‘dbo_DimProduct_test’, Column: ‘ProductKey’, Value: ‘227’.

Firstly let’s see what is this error message and then we can discuss about FIX for the same. If you see the above error message, it is clearly saying that TABLE DimProduct_test ,which is used a as dimension ,has duplicate key and need to be fixed. Here we have to understand couple of things before thinking about fix and lets start with those.

Identifying the Issue – Most of the guys are not aware HOW IT LOOKS when SSAS engine throws an error. It looks like the below given screenshot.

As seen in above pic, you will get 100’s of icons in RED(Saying Error). You don’t waste time by looking at all those. Just concentrate on the LAST one in Yellow which has YELLOW WARNING icon. This will have ACTUAL error. Remaining are just BULL SHIT.

Reason for Issue – Now select the warning message and click on View Details button present at the bottom of the wizard to see the full description of the issue as shown below.

It is pretty clear from the message that the table used to create dimension has DUPLICATE RECORDS in it. As per the functionality of SSAS, It doesn’t support duplicate values in the dimension tables.

Reproduce the Error – If you are not getting this error then you are lucky because the data present in your datawarehouse is pretty good. To know more about this let’s try to reproduce this issue. PFB the steps to be followed.

  • I have taken “Adventure Works DW” database to demonstrate the same. You can download the same from Microsoft site free of cost.
  • Take Dimproduct table and crate a duplicate table with same structure but with out IDENTITY and CONSTRAINTS. PFB the query of the same.

CREATE TABLE [dbo].[DimProduct_test](
[ProductKey] [int] NOT NULL,
[ProductAlternateKey] [nvarchar](25) NULL,
[ProductSubcategoryKey] [int] NULL,
[WeightUnitMeasureCode] [nchar](3) NULL,
[SizeUnitMeasureCode] [nchar](3) NULL,
[EnglishProductName] [nvarchar](50) NOT NULL,
[SpanishProductName] [nvarchar](50) NOT NULL,
[FrenchProductName] [nvarchar](50) NOT NULL,
[StandardCost] [money] NULL,
[FinishedGoodsFlag] [bit] NOT NULL,
[Color] [nvarchar](15) NOT NULL,
[SafetyStockLevel] [smallint] NULL,
[ReorderPoint] [smallint] NULL,
[ListPrice] [money] NULL,
[Size] [nvarchar](50) NULL,
[SizeRange] [nvarchar](50) NULL,
[Weight] [float] NULL,
[DaysToManufacture] [int] NULL,
[ProductLine] [nchar](2) NULL,
[DealerPrice] [money] NULL,
[Class] [nchar](2) NULL,
[Style] [nchar](2) NULL,
[ModelName] [nvarchar](50) NULL,
[LargePhoto] [varbinary](max) NULL,
[EnglishDescription] [nvarchar](400) NULL,
[FrenchDescription] [nvarchar](400) NULL,
[ChineseDescription] [nvarchar](400) NULL,
[ArabicDescription] [nvarchar](400) NULL,
[HebrewDescription] [nvarchar](400) NULL,
[ThaiDescription] [nvarchar](400) NULL,
[StartDate] [datetime] NULL,
[EndDate] [datetime] NULL,
[Status] [nvarchar](7) NULL
)

  • Now load the data from MAIN DimProduct table using the below query.

insert into DimProduct_test select * from DimProduct

  • Execute the above query more than once so that you will get DUPLICATE records into the newly created table.
  • Now add this table to DSV in the SSAS cube solution.

  • Create a dimension with this table ans execute this dimension. You can get the .above given error.

  • Now you have this error in your plate and hence let’s see the FIX now.

Issue Fix – The column what you use as KEY in Dimension creation should not have DUPLICATES and SSAS doesn’t bother about remaining columns. It bother about ONLY the column which you use as KEY and hence the FIX for this issue is to ELIMINATE duplicates from the KEY column. If you have backup of data then you can delete the data in this table and insert only UNIQUE records is one way to fix this issue. Now let me show what will happen when duplicates are removed.

To eliminate the duplicates do the following –

  • Delete the records from the table DimProduct_Test using the below given query.

Truncate table DimProduct_test

  • Insert the data from DimProduct table using the below given query and this time EXECUTE ONLY ONCE as we don’t want duplicates in our table.

insert into DimProduct_test select * from DimProduct

  • Now process the dimension and you can see the dimension executed successfully.

That is it .. This is the reason and we also discussed the FIX. I am pretty sure that this info will be very very helpful to you guys who are new to SSAS. Enjoy Fixing and mind to drop a comment if this helped you !!

Regards,
Roopesh Babu V

2852 COMMENTS

  1. Fantastic goods from you, man. I have understand
    your stuff previous to and you’re just too fantastic.“강남안마”
    I really like what you have acquired here, certainly like what you are
    stating and the way in which you say it. You make it enjoyable and you still take care of to keep it sensible.Thanks for sharing

  2. Here is Sportsmail’s live blog for updates on this year’s Soccer Aid as England and a World XI went head-to-head at the London Stadium. Popular Leagues Ex-Manchester United forward Louis Saha has claimed that Marcus Rashford is the club’s greatest talent since Cristiano Ronaldo. Popular Leagues Take a look back at all the key moments from the year across the whole club Boxing Day 2022 Premier League Action APPADS World Cup Semi-Final Odds, Preview and Tips Find all the results of yesterday’s Football England. And to find out more about the result of a Football match yesterday in England, just click on the link of the match. ISOCountry Code: He’s changed the game since his early introduction. He gave away a penalty before winning one himself and then should score there. Asante, who has also impressed since coming on, finds Chunkz who turns away from his marker and unleashes a shot that whistles past Petr Cech’s left post. 
    https://huzzaz.com/collection/tottenham-hotspur-league-table
    Willie Miller has gushed over the stunning goal Liverpool gem Leighton Clarkson scored for Aberdeen against Rangers. The Reds loanee netted during the Dons’ 3-2 loss on Tuesday. But, even if ‘five to seven minutes’ really was a third of 25 minutes, would it really be such a waste of valuable time? Are they really seconds and minutes better devoted to the wisdom of Steven Gerrard or Marco Silva? Admittedly, we had a nervy few minutes as we found our feet, but in reality, once we got going, there was only ever going to be one winner. Or maybe it’s not. The Japanese international was well known to have played that position, and well, for his old club Kawasaki Frontale but Ange saw him as a missing piece of our midfield jigsaw when he signed him on Hogmanay last year.

  3. Народные средства все же относятся к не совсем доказанным средствам, тем более что возможны побочные эффекты в виде аллергической реакции. Поэтому использование специализированных средств дает более быстрый и значительный эффект. Насчет полночи и тыквы – конечно ничто не вечно и со временем, если перестать пользоваться Дрилашем, состояние ресниц ухудшится. Только зачем, совсем переставать пользоваться? Чтобы ресницы хорошо росли, помоги им с питанием. Тем более, что сегодня тебе в этом помогут различные домашние средства для роста ресниц и куча аптечных и профессиональных средств из магазинов косметики. Хороши народные средства для роста ресниц. Сыворотки, масла, маски – все это поможет сделать взгляд красивым, выразительным. Если сомневаетесь, проконсультируйтесь с косметологом. Он порекомендует специальные средства конкретно под Вашу проблему, расскажет, как пользоваться, даст советы относительно питания, косметики, образа жизни.
    http://agape.ijesus.net/bbs/board.php?bo_table=free&wr_id=59096
    Как утверждают в отзывах девушки, средство Levrana имеет самую удобную щеточку из всех, опробованных ими. Она мягкая и эргономичная, позволяет аккуратно нанести масло на брови и ресницы, а также гарантирует экономичный расход. Продукт идеально подходит для ежедневного применения, его не нужно смывать и можно применять перед сном. Рекомендуем попробовать Levrana всем, кто мечтает о густых натуральных бровях. Однако даже самые эффективные составы для роста не смогут сделать твои ресницы здоровыми и красивыми, если ты нарушаешь несколько правил: Продукт  для питания ресниц Pierre Rene тоже брендовое средство. Оно совсем не дорогое, но действенное и эффективное. Масло идеально питает луковицы, восстанавливает их длину. Страна производства данного средства – Польша. Ряд растительных масел как нельзя лучше подходит для ухода за волосками и кожей бровей. Эффективность их доказана клиническими исследованиями, протестирована большим количеством довольных потребителей. Среди этих масел особого внимания заслуживают средства:

  4. [url=https://www.yeezyadidas.de/]Yeezy[/url]
    [url=https://www.yeezys.co/]Yeezys[/url]
    [url=https://www.nikeairvapormax.us/]Nike Air Vapormax[/url]
    [url=https://www.jordan-1.org/]Jordan 1[/url]
    [url=https://www.air-jordan1.com/]Air Jordan 1[/url]
    [url=https://www.nikejordan1.com/]Nike Jordan 1[/url]
    [url=https://www.jordan-1s.com/]Jordan 1S[/url]
    [url=https://www.jordan1.uk.com/]Jordan 1[/url]
    [url=https://www.pandoracharms.uk.com/]Pandora Charms [/url]
    [url=https://www.jordans-shoes.com/]Jordan Shoes[/url]
    [url=https://www.nikejordan1.us/]Nike Jordan 1[/url]
    [url=https://www.jordans-1.us/]Jordan 1[/url]
    [url=https://www.jordan-shoes.us.com/]Jordan Shoes[/url]
    [url=https://www.nikeuk.uk.com/]Nike UK[/url]
    [url=https://www.yeezy-450.com/]Yeezy 450[/url]
    [url=https://www.jordanretro4.com/]Jordan Retro 4[/url]
    [url=https://www.nikeoutletstoreonlineshopping.us/]Nike Outlet Store Online Shopping[/url]
    [url=https://www.yeezy.uk.com/]YEEZY[/url]
    [url=https://www.adidasyeezyofficialwebsite.com/]Adidas Yeezy Official Website[/url]
    [url=https://www.yeezy350.uk.com/]Yeezy 350[/url]
    [url=https://www.air-jordan4.com/]Air Jordan 4[/url]
    [url=https://www.yeezy-supply.com/]Yeezy Supply[/url]
    [url=https://www.yeezyfoam-runner.com/]Yeezy Foam Runner[/url]
    [url=https://www.yeezysofficialsite.com/]Yeezys Official Site[/url]
    [url=https://www.yeezyslides.us.com/]YEEZY SLIDES[/url]
    [url=https://www.ray-ban-glasses.us.com/]Ray Ban Glasses[/url]
    [url=https://www.adidasuk.uk.com/]Adidas UK[/url]
    [url=https://www.nflshopofficialonlinestore.com/]NFL Shop Official Online Store[/url]
    [url=https://www.yeezys-slides.us.com/]Yeezy Slides[/url]
    [url=https://www.yeezyadidass.us.com/]Adidas Yeezy[/url]
    [url=https://www.350yeezy.us.com/]Yeezy 350[/url]
    [url=https://www.yeezyy.us.com/]Yeezy[/url]
    [url=https://www.yeezy350s.us.com/]Yeezy 350[/url]
    [url=https://www.shoesyeezys.us.com/]Yeezy Shoes[/url]
    [url=https://www.yeezys.uk.com/]Yeezys[/url]
    [url=https://raybansales.us/]Ray Ban[/url]
    [url=https://www.adidasyeezy.uk.com/]Adidas Yeezy[/url]
    [url=https://www.yzyshoes.us.com/]Yeezy Shoes[/url]
    [url=https://www.yeezy-slides.org/]Yeezy Slides[/url]
    [url=https://www.yeezy-shoes.us.com/]Yeezy Shoes[/url]
    [url=https://www.yeezy-700.us.com/]Yeezy 700[/url]
    [url=https://www.yeezyadidas.de/]Adidas Yeezy[/url]
    [url=https://www.yeezys.co/]Yeezy[/url]
    [url=https://www.nikeairvapormax.us/]Air Vapormax[/url]
    [url=https://www.jordan-1.org/]Nike Jordan 1[/url]
    [url=https://www.air-jordan1.com/]Jordan 1[/url]
    [url=https://www.nikejordan1.com/]Jordan 1[/url]
    [url=https://www.jordan-1s.com/]Jordan 1[/url]
    [url=https://www.jordan1.uk.com/]Jordan UK[/url]
    [url=https://www.pandoracharms.uk.com/]Pandora UK[/url]
    [url=https://www.jordans-shoes.com/]Jordans Shoes[/url]
    [url=https://www.nikejordan1.us/]Jordan 1[/url]
    [url=https://www.jordans-1.us/]Jordans 1[/url]
    [url=https://www.jordan-shoes.us.com/]Jordan[/url]
    [url=https://www.nikeuk.uk.com/]Nike[/url]
    [url=https://www.yeezy-450.com/]Yeezy[/url]
    [url=https://www.jordanretro4.com/]Jordan 4[/url]
    [url=https://www.nikeoutletstoreonlineshopping.us/]Nike Outlet[/url]
    [url=https://www.yeezy.uk.com/]YEEZY UK[/url]
    [url=https://www.adidasyeezyofficialwebsite.com/]Adidas Yeezy[/url]
    [url=https://www.yeezy350.uk.com/]Yeezy uk[/url]
    [url=https://www.air-jordan4.com/]Jordan 4[/url]
    [url=https://www.yeezy-supply.com/]Yeezys Supply[/url]
    [url=https://www.yeezyfoam-runner.com/]Yeezy[/url]
    [url=https://www.yeezysofficialsite.com/]Yeezys[/url]
    [url=https://www.yeezyslides.us.com/]YEEZY[/url]
    [url=https://www.ray-ban-glasses.us.com/]Ray Bans Sunglasses[/url]
    [url=https://www.adidasuk.uk.com/]Adidas[/url]
    [url=https://www.nflshopofficialonlinestore.com/]NFL Shop[/url]
    [url=https://www.yeezys-slides.us.com/]Yeezys[/url]
    [url=https://www.yeezyadidass.us.com/]Adidas Yeezys[/url]
    [url=https://www.350yeezy.us.com/]Yeezy 350 V2[/url]
    [url=https://www.yeezyy.us.com/]Yeezys[/url]
    [url=https://www.yeezy350s.us.com/]Yeezy Boost 350[/url]
    [url=https://www.shoesyeezys.us.com/]Yeezys Shoes[/url]
    [url=https://www.yeezys.uk.com/]Yeezy[/url]
    [url=https://raybansales.us/]Ray Bans[/url]
    [url=https://www.adidasyeezy.uk.com/]Yeezy[/url]
    [url=https://www.yzyshoes.us.com/]Yeezys[/url]
    [url=https://www.yeezy-slides.org/]Adidas Yeezy Slides [/url]
    [url=https://www.yeezy-shoes.us.com/]Yeezy[/url]
    [url=https://www.yeezy-700.us.com/]Yeezy[/url]

  5. buy finasteride no prescription [url=https://fenosteride.online/]finasteride 1mg over the counter[/url] finasteride over the counter

  6. online pharmacy australia [url=https://dynamicpharmacyhealth.online/]online pharmacy delivery[/url] canada pharmacy not requiring prescription

  7. pharmacies in canada that ship to the us [url=https://canadianpharm.pro/#]certified online pharmacy canada[/url] canadian pharmacy world

  8. birth control pills cost [url=http://birthcontrolpills.pro/#]birth control pills delivery[/url] buy birth control over the counter

  9. indian pharmacy online [url=http://indiapharmacy.world/#]online pharmacy india[/url] online pharmacy india

  10. non prescription ed drugs [url=http://edpills24.pro/#]best otc ed pills[/url] natural remedies for ed

  11. reputable mexican pharmacies online [url=http://mexicanpharmacy.life/#]mexican online pharmacies prescription drugs[/url] mexican online pharmacies prescription drugs

  12. mail order pharmacy india [url=https://indiapharmacy.world/#]indianpharmacy com[/url] cheapest online pharmacy india

  13. ed pills that really work [url=https://edpills24.pro/#]online ed medications[/url] treatment of ed

  14. [url=https://canadianpharmacy.legal/#]canadian pharmacy ship to the US[/url] best rated canadian pharmacy

  15. my canadian pharmacy review [url=https://certifiedpharmacycanada.pro/#]canadadrugpharmacy com[/url] reputable canadian online pharmacy

  16. india pharmacy [url=http://indiapharmacy.bid/#]top online pharmacy india[/url] india online pharmacy

  17. mexican rx online [url=http://mexicanpharmacy.ink/#]mexican rx online[/url] reputable mexican pharmacies online

  18. Zeus includes a very lucrative free games feature and it won’t be an overstatement if we called it one of the primary reasons why Zeus has enjoyed such a huge popularity in the field of slot games. This Zeus free spin bonus is triggered when you get three or more scatter symbols (lightning thunderbolt) on any of the active paylines. Depending on the number of lightning thunderbolt symbols that appear on your screen you are awarded a certain number of free spins. As under-whelming as it may sound, Slotomania’s free online slot games use a random number generator – so everything just boils down to luck! Spinning slots is a game of possibilities. However, having a broad knowledge about different free casino slot games and their rules will certainly help you understand your chances better. Just hit the SPIN button and find out the answer to the burning question: What Will Today Spin?
    https://starity.hu/profil/370142-virtualpokerwit/uzenofal/
    There are online video slots, 3D slots, and jackpot slots, as well as the popular classic slot machine games that you can play at Cafe Casino right now. MansionCasino app tries to look generous from the first step by offering to double your first deposit. But only up to 200 GBP which looks somewhat greedy. The casino is available on both iOS and Android and offers slots, Blackjack, Roulette and Live Casino games. It is easy to deposit and access the games. But the players are unhappy with “KYC on withdrawal” system as the casino can be quite stubborn on continuously asking for various kinds of ID proofs and papers, rejecting them and asking for new ones. Otherwise, a fairly decent app. To do this, you’ll either need to opt for instant play games, which can be played via your browser, with no need to download, or you can download your favorite online casino’s app. Either option will enable you to play free slots on the go, so you can enjoy the excitement of online slots wherever you happen to be.

  19. india pharmacy mail order [url=https://indiapharmacy.bid/#]indian pharmacy online[/url] indian pharmacy online

  20. New post, y20212 replied to Weekly Winners for June 12th Limitless Casino – Exclusive No Deposit Bonus Play Cool Cat casino slots on mobile device with a $100 no deposit mobile casino bonus. Biggest no deposit bonus codes from Cool Cat casino! Plus, you can win $100 real cash. Slots Heaven has a great game selection and a convenient mobile app. While they don’t offer a no deposit bonus, new members can use the generous bonus offer. After your first deposit of up to C$100, you will receive a 100% deposit match and up to 200 free spins on eligible games. A no-deposit bonus is a bonus that certain casinos offer their players just for signing up – even before they’ve made a deposit with the said casino. That’s right, you can start getting benefits from a casino before you’ve put any money into your casino account. All they ask from you is your registration information – the typical information you have to fill in when signing up at any casino website.
    http://www.arbormed.com/en/bbs/board.php?bo_table=free&wr_id=84518
    In online casinos, no deposit bonuses are offered to attract new players. No deposit bonuses allow players to win real money prizes without having to risk their own money. In addition to getting to know the casino and its games, you can also win real money prizes and explore different options. Europa Casino presents a generous offer of R375 Free No Deposit Bonus exclusively for new players who register on their platform. It serves as an excellent opportunity to explore the site’s features and gameplay before committing to a deposit. To avail yourself of the R375 Free No Deposit Bonus, simply complete the registration process. No deposit bonuses are a rare occurrence. Only a handful of OK-friendly casino sites offer these generous gifts. There are selected free slots on reputed online casinos that pay real money. There are offers and deposit bonuses available at these casinos to reward players for their loyalty too. While you can expect to win money without a deposit, you can also decide to add funds and get over 100 free spins as part of deposit bonuses.

  21. buy cytotec over the counter [url=https://cytotec.ink/#]Misoprostol 200 mg buy online[/url] Abortion pills online

  22. buy cytotec online fast delivery [url=http://cytotec.ink/#]buy cytotec pills[/url] buy cytotec over the counter

  23. In addition to the classics, you can play the double ball version of American roulette and several other roulette games with unconventional rules.  One of the best things about Multi-Player Roulette is that you can choose an avatar and an alias and afterward set yourself up at any of the roulette tables. With these kinds of multiplayer live casinos, there are almost too many options to list. WELCOME TO RENTO The best monopoly board game With this free roulette simulator you can try out and understand the aspects of probability, logic, the rules and strategies of roulette. Of course without financial risk. We serve all this free roulette games for fun and research only. * Choose a restaurant to go to lunch Add the people you play with as friends. Chat with them, invite them to games. Donate items and items from collections.
    https://camp-fire.jp/profile/freepokernetwor
    Bally Blazing 7’s Five Reel Progressive S9000 Slot Machine With Top Monitor Sign up to our online casino (18+, please gamble responsibly) and you’re immediately part of our Ruby Red Loyalty Scheme. As you accumulate Red Rubies, this can be exchanged for casino chips and other rewards. Reach platinum level, and you receive a special invitation to Club Rouge where even greater rewards await! Machine Dimensions: This machine is 52 inches high. The width is 22 inches and 23 inches deep. The weight is approximately 250 pounds. Slot Machine Cash-Out Ticket Printer Paper – Four Packs Blazing 7 is a Bally S9000 title. We sell refurbished slot machines for your home entertainment. Please allow 3 – 4 weeks for refurbishment before shipping on slot machine purchases. Dismiss You can now deposit your funds into a safe and convenient account and withdraw your money at any time for game play on either slots or table games.

  24. Εντελώς διαφορετικό από τα συνήθη ιστολόγια αθλητικών στοιχημάτων, αλλά ξεκάθαρα ένα από τα πιο κατατοπιστικά. Το ιστολόγιο παρέχει λεπτομερή ενημέρωση για αθλητικά στοιχήματα και ασχολείται κυρίως με στατιστικά. Το Green All Over επικαιροποιείται αρκετές φορές την εβδομάδα και το λεπτό χιούμορ του συντάκτη εν ονόματι Cassini, εκτός από ενημερωτικό, το καθιστά επίσης πραγματικά διασκεδαστικό. Sizzling Hot Quatro Καλύτερο μπόνους καζίνο Ελλάδα 2023
    https://greenhomeguide.com/users/niro-evans
    Απελευθερώνεται έτσι πλέον μια σημαντική αναπτυξιακή και επενδυτική πρωτοβουλία που θα αναβαθμίσει την περιοχή του Αμαρουσίου, με μετρήσιμα οφέλη για την ευρύτερη περιοχή των βόρειων προαστίων της Αθήνας. Απελευθερώνεται έτσι πλέον μια σημαντική αναπτυξιακή και επενδυτική πρωτοβουλία που θα αναβαθμίσει την περιοχή του Αμαρουσίου, με μετρήσιμα οφέλη για την ευρύτερη περιοχή των βόρειων προαστίων της Αθήνας. Μέρος του Novibet Poker Series #2 αποτελεί μια σειρά από τουρνουά και satellites που θα πραγματοποιηθούν από τις 7 έως τις 12 Μαρτίου στο Vergina Theatro του Regency Casino Thessaloniki.

  25. buying mobic without rx [url=https://mobic.store/#]where buy cheap mobic without insurance[/url] where to buy mobic pill

  26. top 10 pharmacies in india [url=http://indiamedicine.world/#]online shopping pharmacy india[/url] indianpharmacy com