cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
homol
Advocate I
Advocate I

Dataflow insert: failed to validate keys

I have a table called Investment

It has lookups to 3 different tables: Partner_Internal, Partner_External and InvestmentType

Each of these tables has a key on their name columns.

Here is a view of the Partner_Internal Name Key

Screen Shot 2021-05-14 at 11.19.45 PM.png

 

The Investment table also has a combo key on these same columns.  Here's a snapshot of that:

Screen Shot 2021-05-14 at 11.21.54 PM.png

Everything works fine in power platform.  However, when I try to insert using a dataflow, even though I have unique sets of values for the combo key, I get the following error:

 

Failed to validate keys for crd3c_InternalPartner column targeted entity crd3c_partner_internal. crd3c_partner_internal table's key crd3c_namekey could not be created. Please delete the existing key and create new key for the table and try again. Additional information: The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.crd3c_Partner_InternalBase' and the index name 'ndx_for_entitykey_crd3c_NameKey'. The duplicate key value is <redacted>.

 

I have no idea where to go from here.  Any assistance in even starting to troubleshoot would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisPiasecki
Dual Super User
Dual Super User

Hi @homol,

 

Based on the error message, it seems like your Partner_Internal table has duplicate values that pre-existed before your key was created. You should verify if your Key is actually active. You can switch to the Classic Explorer to see if this is the case. If so, you'll need to clear up any duplicates before you can re-active (or re-create the key). You can create a duplicate detection rule with the same set of columns that your Key composes, then run a duplicate detection job on your table to identify the duplicates

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

3 REPLIES 3
ChrisPiasecki
Dual Super User
Dual Super User

Hi @homol,

 

Based on the error message, it seems like your Partner_Internal table has duplicate values that pre-existed before your key was created. You should verify if your Key is actually active. You can switch to the Classic Explorer to see if this is the case. If so, you'll need to clear up any duplicates before you can re-active (or re-create the key). You can create a duplicate detection rule with the same set of columns that your Key composes, then run a duplicate detection job on your table to identify the duplicates

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

@ChrisPiasecki thank you so much for the help and clarification.  I've been using Power Platform for a good bit but the classic experience is still somewhat foreign to me.  How can I see the keys for tables in classic?

ChrisPiasecki
Dual Super User
Dual Super User

Hi @homol,

 

No problem. Some steps with screenshots are below on how to navigate to the relevant screens.

 

To get to Keys in the classic solution explorer experience:

  • When looking at your table your table in the maker portal, click Switch to Classic at the top command bar.
    ChrisPiasecki_0-1621261091299.png

     

  • A new tab opens in the classic solution explorer with your table. Click Keys on the left hand side, then you will see your key with 2 more columns called Status and System Job. In my example the Key is Active and no system job (this is the database indexing job behind the scenes that runs when first creating/activating the key) because it was activated successfully. If your key is not active, then you'll need to fix the duplicates.
    ChrisPiasecki_3-1621262262420.png

     

 

To get to duplicate detection rules and duplicate detection jobs:

  • Within the maker portal, click the gear icon in the top right and Advanced Settings
  • A new tab opens up with the legacy Dynamics 365 environment. 
  • In the navigation bar, click the down arrow next to Settings, then under System > Data Management
    ChrisPiasecki_1-1621264255727.png

     

  •  The Data Management gets you to both Duplicate Detection Rules and Duplicate Detection Jobs.
    ChrisPiasecki_2-1621264366912.png

     

Hope this helps!

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,075)