Forum Discussion
One or more rows contain values violating non-null, unique, or foreign-key constraints
Hi,
This is happening for me as well. I would like to give more color on this topic:
- PBI Desktop version: Nov 2018.
- MySQL 8.0.13. Default values for collation and charset.
I did an A/B test. I have 2 MySQL instances. For the MySQL5.7 instance, I'm able to connect to this without error.
The other instance MySQL 8.0.13 throws the below error when I'm attempting to connect.
"DataSource.Error: An error happened while reading data from the provider: 'Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.'"
This happens when trying to Get Data.
The table does not seem to matter. Here's a test table anyway
CREATE TABLE `tmp_test_pbi` (
`col_a` text
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Testing PBI connectivity issue.';
INSERT INTO tmp_test_pbi VALUES('a'), ('b'), ('c')
I having this issue as well