0.1.1 • Published 5 years ago

gcloud-datastore-exporter v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Gcloud Datastore exporter

Export your google datastore data to csv or json

Install

npm install gcloud-datastore-exporter --save

Usage

const Datastore = require('@google-cloud/datastore');
const DataStoreExporter = require('gcloud-datastore-exporter')
const projectId = 'project-example';
const datastore = new Datastore({ projectId });

const datastoreExporter = new DataStoreExporter(datastore)
datastoreExporter.csv("User", "users.csv")

Api

fetchDatastoreEntity

ArgumentTypeDescription
entityNameStringdatastore entity name
filePathStringfile path to save the

csv

This method use json2csv npm package

ArgumentTypeDescription
entityNameStringdatastore entity name
filePathStringfile path to save the csv
csvOptionsObjectoptions to parse data see more

json

ArgumentTypeDescription
entityNameStringdatastore entity name
filePathStringfile path to save the json

Why?

Following this guide Datastore can be exporter to a GCP bucket and import to Bigquery for download in csv.

If you don't have access to GCP bucket or Bigquery this package help you to export data to csv or json files.