Francismiko
Francismiko2y ago

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
ian
ian2y ago
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?
Francismiko
FrancismikoOP2y ago
something like this: This document is invalid, fix any errors to continue
ian
ian2y ago
Is this on the dashboard or CLI output?
Francismiko
FrancismikoOP2y ago
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
Francismiko
FrancismikoOP2y ago
In the dashboard, I try to add the json array directly to the error
ari
ari2y ago
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!

Did you find this page helpful?