0

I'm developing some application in SpringBoot2 with GAE and Datastore in Google Cloud Platform. My project is for demonstration for pre-customers.


Every time the production environment is updated, this demo environment will be also updated.
So I'd like to refresh datastore by using kinda seed data when demo environment is updated.

How can I create seed data and use for Cloud Datastore?

I'm looking for similar stuff to rake db:seed in Rails.

1 Answers1

0

We are using Google Cloud dataflow to import data into datastore. We start from a CSV-like text file; convert it on-the-fly into a PCollection of Entities; and finally write them into datastore with a datastore sink.

I guess the csv file is what you look for (the seed data). I dont mean that you need to put your data in a CSV format. Actually you can use any data input source that google cloud dataflow (essentially apache-beam supports). See my answer in this post for more details - How to upload data in bulk to the appengine datastore? Older methods do not work.

Also if you already have your demo data in datastore, you could use the import/export utilities.

greeness
  • 15,956
  • 5
  • 50
  • 80