Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
id: 2442e32be2
question: When should I use merge instead of append?
sort_order: 60
---

Use `merge` when existing data can be updated. If a record with the same primary key already exists, it will be updated. If it does not exist, it will be inserted.

Common use cases:
- Order status updates
- User profile changes
- CDC-based data processing

```yaml
materialization:
type: merge
primary_key: order_id
```

If data never changes, use `append`.
If data can change, use `merge`.