Data import
Hi team, is there any way to manually add multiple pieces of data to the database? I tried adding a json file, but it doesn't seem to conform to the format (adding a single piece of data complies with type checking)
6 Replies
Have you seen
cvx convex import
yet? The cli lets you upload json (array of objects) or jsonl (one line per object)
What type error are you seeing?something like this: This document is invalid, fix any errors to continue
Is this on the dashboard or CLI output?
Oye, I found this relevant documentation entry, thank you!https://docs.convex.dev/cli#import-a-file-into-convex
CLI | Convex Developer Hub
The Convex command-line interface (CLI) is your interface for managing Convex
In the dashboard, I try to add the json array directly to the error
Agh sorry the dashboard gave you such an unhelpful error! Right now the dashboard doesn't allow you to add an array of documents at once, you have to add one at a time, but we have some plans (with no timeline right now) to support for bulk-add. Letting you paste an array in would be quite nice, though!