Feature request: Parameter for "ON CONFLICT"
See original GitHub issueIs it possible that the transfer from the temporary table into the target table can be (optionally) extended with na ON CONFLICT ... DO NOTHING;
. e.g.
Database.objects.from_csv(path, on_conflict="nothing", on_conflict_keys=["key"])
➡️
INSERT INTO table
SELECT * FROM temp_table
ON CONFLICT (key)
DO NOTHING;
? This would be of great help. Right now I’m using your tool to insert data into a table, except when there are duplicates. To achieve this I’m creating a temporary table with the above SQL command. But this results in two temporary tables, which could be avoided with an option for ON CONFLICT
.
Thanks Oliver
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to handle conflicting HTTP GET param - Stack Overflow
What should I do? Just go with the first value, thus silently ignoring other values (what SO does) or return an error stating...
Read more >Is it possible to change the amount of conflict allowed ... - GitHub
we notice that there are usually quite a few features, although not 100% mutually exclusive, also rarely take nonzero values simultaneously.
Read more >How To Use ON CONFLICT CLAUSE in PostgreSQL
In ON CONFLICT query parameter, we can put the column name or the constraint name or a WHERE clause. First, we need to...
Read more >Can you modify Conflict Checker parameters? - ServiceNow
Hi We want to run the conflict checker based on Cis owned by a third party. We create a blackout window based on...
Read more >View & resolve data conflicts (Merge) - SQL Server
For a list of valid startup parameters, run ConflictViewer.exe -?. In the Select Conflict Table dialog box, select a database, publication, and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Mh. You are right. Right now I don’t need that anymore anyway. But you might need to specify that setting
ignore_conflicts
, one should also setdrop_indexes
anddrop_constraints
toFalse
, otherwise there are no conflicts that this setting might apply to.I didn’t include that because I didn’t see it in the Django implementation. Did I miss it there? Why do you see this as critical?