You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `__usingpk__` field can also be used with an ingress descriptor at any level in the data. The name of this field can be changed to another value with the `--using-pk-field` flag.
451
451
452
+
### Upsert
453
+
454
+
The `upsert` mode allows to insert new rows or update existing ones based on the primary key.
455
+
456
+
```bash
457
+
$ lino push upsert dest < data.jsonl
458
+
```
459
+
460
+
If a row with the same primary key already exists in the destination table, it will be updated with the new values. If it does not exist, it will be inserted.
461
+
462
+
**Note:** This feature is currently supported for PostgreSQL and Oracle databases.
463
+
452
464
### How to recover from error
453
465
454
466
Use options `lino pull --exclude-from-file` (shortcut `-X`) and `lino push --savepoint` combined to handle error recovery. The process will restart where it failed if an error has interrupted it in a previous run.
0 commit comments