Drogulus
Drogulus6d ago

Masterdata import/export

Im trying to export/import some masterdata from dev to prod. Ive made the exports, and have the jsonl files ready. im using the following command PS C:\Users\Niels\test\Project> npx convex import >> --url https://gr*******************.convex.cloud >> --table masterdata_brands >> "$env:USERPROFILE\Desktop\convex\masterdata_brands\documents.jsonl" >> --replace --prod but keep getting errors that ID's have conflicts with existing other tables (that are empty by the way) and have no connection with each other in the schema. How can i fix this and import anyway? I rather not remove the ID's because they are nested 3 levels deep (brand -> familie -> product) in de export.
2 Replies
Convex Bot
Convex Bot6d ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
Drogulus
DrogulusOP6d ago
The error: Import change summary: table | create | delete | ------------------------------------- masterdata_brands | 167 | 0 of 0 | Once the import has started, it will run in the background. Interrupting npx convex import will not cancel it. ✖ Importing data from "C:\Users\Niels\Desktop\convex\masterdata_brands\documents.jsonl" to table "masterdata_brands" in your prod deployment failed Hit an error while importing: New table masterdata_brands has IDs that conflict with existing table marketplaceTransactions removing all the _id and letting convex run new onces, fixed it. Better create my own primary_keys than.

Did you find this page helpful?