Skip to content
This repository has been archived by the owner on Jun 6, 2020. It is now read-only.
/ realm-exporter Public archive

Export a Realm database into a more traditional format (e.g. CSV)

License

Notifications You must be signed in to change notification settings

diogoosorio/realm-exporter

Repository files navigation

Build Status npm version

Realm Exporter

A command line tool to quickly export your Realm database into a more "user-friendly" format.

Disclaimer

This tool (and myself) has no assocation with Realm (the company), the project wasn't developed nor is maintained by their team - this was a personal weekend project of mine, brought to existence by my personal necessity.

Installation

You need to install NodeJS. Realm javascript SDK doesn't support node 10 yet, so you'll need to have an older version installed.

You can give a look at nvm if you have node 10 installed in your system.

After you have node installed, simply install the npm package:

$ npm install -g realm-exporter

If the installation was successful, you should be able to use the realm-exporter command:

$ realm-exporter --help

Usage

Commands

$ realm-exporter objects    # list all objects available on a .realm database file
$ realm-exporter export     # export all records of an object type

Basic usage

Let's retrieve all the available objects on our .realm database, using the objects command:

$ realm-exporter objects db.realm
Cartoon
Location

And dump all the Cartoon objects on the database into a CSV file, using the export command:

$ realm-exporter export db.realm Cartoons > cartoons.csv
$ cat cartoons.csv
"1","Fred Flinstone","30"
"2","Johnny Bravo","22"

About

Export a Realm database into a more traditional format (e.g. CSV)

Resources

License

Stars

Watchers

Forks

Packages

No packages published