Load Enterprise Data Using the REST API¶
Enterprise data from external systems can be loaded into your tenant’s PostgreSQL schema using simple REST calls.
You’ll learn how to: - Create schemas tied to tenant identity
- Upload structured (relational) and JSON-based data
- Organize application data using named schemas
Configuration¶
Sample data: Download the DVD-rental sample SQL dump from
PostgreSQL Film Example Database!
Schema Name
Backup File
Sample data: Select the example film data file you downloaded
Step 0 — Drop existing schema¶
Drop existing schema with cascade.
Step 1 — Restore a Database Backup¶
This step sends your local SQL dump to the /restore-backup
endpoint. The schemaName
query parameter controls which PostgreSQL schema the data is loaded into.
Step 2 — Generate ERD (Mermaid)¶
Invoke /create-erd
to produce an entity-relationship diagram in Mermaid format for your restored schema.
Inspect the API: After you restore the database, you can view and test all of your schema’s database endpoints in Swagger:
Step 3 — Drop film_embeddings
table¶
Clears out any old film_embeddings
table so we start fresh.
DB_BASE=""
DB_BASE=""
Step 4 — Create film_embeddings
table¶
Defines a table to store film embeddings.
Step 5 — Create vector index on film_embeddings
¶
Builds a high-performance vector index for fast similarity search.
Step 6 — Retrieve film data¶
Fetches joined film records from the film_list
view.
Step 7 — Generate embeddings & insert into film_embeddings
¶
Embeds each film’s metadata and bulk-inserts the results.