Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making field required if there are empty/null cells bring the application to inconsistent state #552

Closed
3 tasks done
roll opened this issue Sep 19, 2024 · 0 comments · Fixed by #572
Closed
3 tasks done
Assignees
Labels
bug Something isn't working

Comments

@roll
Copy link
Collaborator

roll commented Sep 19, 2024

Overview

Screenshot from 2024-09-19 14-29-57

sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) NOT NULL constraint failed: players.Golden Balls
[SQL: INSERT INTO players ("_rowNumber", "_rowValid", "Name", "Golden Balls") VALUES (?, ?, ?, ?)]
[parameters: [(2, 1, 'Lionel Messi', 6), (3, 1, 'Cristiano Ronaldo', 5), (4, 1, 'Franz Beckenbauer', 2), (5, 1, 'Michel Platini', 1), (6, 1, 'Johan Cruyff', 1), (7, 1, 'Marco van Basten', 1), (8, 1, 'Ronaldo Nazario', 2), (9, 1, 'Zinedine Zidane', 1), (10, 1, 'Ronaldo', 2), (11, 0, 'Ronaldinho', None)]]
(Background on this error at: https://sqlalche.me/e/20/gkpj)

Plan

  • PR frictionless-py to have a flag for the index function that will tell the library not to create NOT NULL constraint on any fields (even though it's required by the Table Schema constraints) (see the mapper)
  • update frictionless-py dependency
  • use this flag in the file/index endpoint
@roll roll changed the title Making field required if there are empty cells bring the application to inconsistent state Making field required if there are empty/null cells bring the application to inconsistent state Sep 19, 2024
@roll roll added the bug Something isn't working label Sep 19, 2024
roll added a commit to frictionlessdata/frictionless-py that referenced this issue Sep 28, 2024
- Open Data Editor needs a way to create [flexible database
tables](okfn/opendataeditor#552) that can have
some constraint violations for further fixing. So here is a new
`Indexer.without_constraints` flag to achieve this goal.

---

@pierrecamilleri 
can you please take a look?
@roll roll closed this as completed in #572 Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant