Error
Import error
Duplicate key column row data found in table
Duplicate key column row data found in attempted import
Cause
A column marked as "key" in your dimension table contains a duplicate row. This is usually detected when a connection is refreshed.
Note: Key columns can only contain unique values.
Solution
You will need to delete the duplicate row from your dataset; unfortunately, the exact location of the duplicate key isn't given.
There are two ways to locate the duplicate row in Workiva:
- Manually scan your source data.
- Create a new query that joins the dimension table to the dataset you're trying to load to the key field. When you filter on Sheet.account Is Not Null, the results will be the values that are already in the "key" column.
Note: This solution works best when dealing with single key columns and string data. Casting may be required for other data types.
You can also scan for duplicates using Microsoft Excel:
- Create a new query in Workiva that pulls all data from the dimension table, and export it to Excel as a CSV. Separately, copy all rows of the dataset being imported (i.e., the dataset that's failing) and paste those rows to the CSV file. This creates a full table of your data -- including the duplicates that are triggering the error. You'll next create a new column whose values are CONCATENATEd of all the key columns and conditionally format it to highlight duplicates.
Note: You can sort the column by cell color to move all duplicate rows to the top.