Menu

Your upsert can preserve an offer that never existed
📰

Your upsert can preserve an offer that never existed

DEV Community: postgres·Nimbryxo-studio·3 days ago
#1vPqSWn9
#devtopostgresql#devto#dev#const#observation
Reading 0:00
15s threshold

Your retry stops creating duplicate rows. Now you need to decide whether a missing price should erase the previous one.

Keeping it feels responsible. But this source drops empty and null fields before publishing each record. A missing field carries no instruction to preserve an earlier value.

Merging sparse observations can assemble an offer you never observed. A retained price, a different seller, and fresh availability can look perfectly respectable together. Your database has become creative.

Define the destination before defining the key

You're building a product monitor for your own business. Its current row should answer: what did the latest observation actually contain?

Start with explicit product URLs.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.