“I tried to retrieve data using UiPath, but I encountered the error: ‘Run Query: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.’ However, the same query successfully retrieves data for a specific date when executed in pgAdmin.”
Hi @Sajjan_Pandey,
Could you please share more details about:
- the version of the Database package; have you already tried the latest 1.10.0 version?
- what database type are you trying to access?
- some more details about the query you are running and the valid results (it shouldn’t contain any sensitive data, but a mockup to showcase it would be great).
Hey @Sajjan_Pandey The error message suggests that one or more rows in the result set are violating non-null constraints. Try modifying your query to exclude rows with null values using IS NOT NULL in the WHERE clause for columns with non-null constraints.
(SELECT * FROM your_table WHERE your_column IS NOT NULL. )
The error message may also indicate that some rows violate unique or foreign key constraints.
Review whether your query retrieves rows where certain primary key or foreign key relationships are broken or duplicated. You might be retrieving data that violates these constraints, leading to the error when trying to process it in UiPath.
Hi @Sajjan_Pandey,
Please show us the query used and Let us know what all keys are added to the table
Thanks