Data transfer from Prisma to Spreadsheet

heyo, I'm looking for a quick and dirty way to get my data from the prisma studio interface into like a google sheet or something, does anyone know how to do this easily? I swear I was able to copy paste entire tables before but now I can't figure out how. If this has to be done with the proper export method that prisma describes then thats fine, I was just hoping there was a way to do it more easily than that. Something similar like saving it as a csv or json that can then get easily turned into a google sheet is also fine. Thanks :)
2 Replies
Matvey
Matvey10mo ago
Just connect to your DB with an app like TablePlus or DBeaver and export to csv
Abuzeid
Abuzeid10mo ago
If you are using Prisma you can easily export your data to a JSON or CSV. Here is how I did it with bun and JSON;
await prisma.*model.findMany().then(async (val) => {
await Bun.write("*./file.json", JSON.stringify(val));
});
await prisma.*model.findMany().then(async (val) => {
await Bun.write("*./file.json", JSON.stringify(val));
});
Want results from more Discord servers?
Add your server