Import data from one table into another environment that has the same table

Hello :wave:

Feature(s) impacted

Collection, Import

Expected behavior

We currently have a table named “Covers” in the Preprod environment which contains data, and we would like to export this data and import it into the Staging environment which contains the same “Covers” table. Is there a feature to do this?

Context

  • Project name: Nostrum Care v2
  • Team name: Dev
  • Environment name: Staging
  • Agent (forest package) name & version: “forest-express-sequelize”: “^8.0.0”
  • Database type: Postgres

Thanks in advance

Hello @jacques_liao ,

There is a feature to export data from a table, but importing the data will require you to either:

  • Setup the data directly in your agent code, seed the DB of the Staging environment with data from Preprod with SQL queries or whatever method suits you.
  • If your table is not to big, you can implement a custom action to create rows based on the csv data you can get using the native export feature of forest admin.

Hello @jacques_liao

Is my answer good enough to be marked as solution to close the topic ?
Feel free to ask if you still have questions/issues.

Hello @Enki,
Sorry, I completely forgot to reply. But yes, as soon as I’m on it and I have more questions, I’ll create another topic.
Thank you for your reply :pray: