realm-browser-osx
realm-browser-osx copied to clipboard
Import/Export different data formats
Import Formats
- JSON
- CSV
- SQLite
- Excel
- SQL (Create and Insert)
Export Formats
- JSON
- CSV
+1. Really need it . Especially when we want to deliver app with db files.
Thanks for that!
Are there any particular formats there you're interested in? I'm still wondering which ones to prioritize.
@TimOliver Thanks! Actually I was trying to use some CSV data and found that Realm Browser does not support it now. Really appreciate it.
Is there a workaround to export the Realm data as CSV/JSON/whatever until the Realm Browser supports this?
@muenchdo until the Realm browser supports this natively, you could write an app to convert the data using a Realm binding (Realm Cocoa or Realm Java).
We badly need this. Any kind of structured export would be better than nothing - CSV or JSON sound sensible to me, whatever is easier to implement.
I've tried writing a CSV export app in Java with realm-java, but hit issues with Android dependencies. I'll give it another go this evening and share if I get anywhere.
In the meanwhile, because all our data is stored as JSON as strings in our Realm databases anyway, I've just been using a little bash script to pull out anything in curly braces and dump it in a file...
cat REALM_DATABASE_FILENAME | grep -aoE '\{..+?\}' | split -l 1 - realmdata;
for file in realmdata*
do
cat $file | sed 's/\\//g' > $file.txt;
rm $file;
done
Seems like it's only possible to import one table only. Importing another CSV file to create/populate another table overwrites the previous database.
The XSLX is able to create multiple tables, but doesn't populate any of them.
Also, no way to specify the schema? It creates all columns as strings.
Am I missing something or is this almost useful?
Hi @basememara!
Thanks for the feedback! The importing/exporting components of the Browser are actually maintained in a separate project named the Realm Converter.
The converter is still heavily under construction (Each format is at varying levels right now), so if there's any particular feature/fix you'd like, please file them as issues over in that repo. :)
Thanks a lot!
What is the timeline for building this? There have been a few react-native users asking for JSON import support.
A primitive version of this should be super easy to build, I don't know why it's been pushed off for so long. I'm assigning myself to this.
a json importer was added in realm/realm-cocoa-converter#16. we can keep this open until an exporter is also added, and of course, until these are integrated into the browser.
any updates on this feature?