Week 13: Importing Relational Data into a Workspace

In Tip of the Week 10, we share how schemas can be exported/imported from backend workspaces. What we didn’t tell you is that with those schemas you can import dummy data and seed data!

After exporting a workspace schema, you’ll get a JSON file that defines all the tables and their relationships between them. Add a key called data to that JSON file to start to specify import data – highlighted below :point_down:!

Importing relational data into a Workspace

In the example above, we can see that our schema has two tables; Restaurants and Reviews. Along with those tables are our first two database records and the association between them. All you need to do is create a pseudo ID for the records to create these associations using $id.

Check out the docs on CLI Commands to learn more and if you have any questions about this, definitely ask them in the 8base Community (https://community.8base.com)!