Menu

Your partners array can reverse the buyer relationship
📰

Your partners array can reverse the buyer relationship

DEV Community: typescript·Nimbryxo-studio·about 23 hours ago
#LE4kqTpU
#devtotypescript#devto#dev#profile#dataset
Reading 0:00
15s threshold

Your next dashboard refresh can turn a customer into a sourcing lead.

You're merging importer and supplier profiles into a relationship table. Treating every profile owner as the buyer looks convenient. It also puts the mistake somewhere nobody enjoys debugging: inside otherwise valid rows.

For a US importer, partners contains suppliers; for a supplier, it contains customers. Flattening that field with a fixed owner-to-supplier rule reverses supplier-profile relationships.

The repair starts before the upsert. Preserve the profile context, resolve direction explicitly, and keep unidentified partners out of the graph.

Start with a bounded profile job

Use profile mode when you already know the pages you need. Disable shipment rows here because a profile relationship and a bill of lading need different ingestion contracts.

Install apify-client , zod , and pg .…

Continue reading — create a free account

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