Download Table data as a CSV from Convex Dashboard
Wanted to know if there is a way I can export my database table to a csv or something?
Would be nice if it was in the popover in the attached image
5 Replies
Hey Hosna! There are two ways to export data right now:
- Select documents in the UI (with the checkbox). Then right click inside of the table and press "Copy Documents". This will copy them into your clipboard as JSON. This does not work if you have 1000s of documents.
- Use a snapshot export (can be done from the dashboard or the command line) https://docs.convex.dev/database/import-export/export
It's common enough for developers to look for an export button in that drop-down menu. I'm filing an issue for us to at least have a link to snapshot export there 🙂
Awesome yes was looking for snapshot export, thank you @ari !
@ari is there a way to also export the items in the Files tab?
Absolutely! On the snapshot export page, you can click the "Include files" checkbox, and the export will include all of your files
oh duh 🤦♀️
thank you
one more question @ari 😅
so the included files have the name of the id in the db, is the original name of the files not preserved? I noticed when you initially uploaded the images its there under the id but when you refresh in the page they go away. and I don't see the original names of the images in the documents.jsonl file
Yeah, that's right, the original file name is not preserved once they are uploaded. If you want to keep track of the file names, you can add a new table with records like