Baseten
HomeChangelogStatusSupport
Search…
⌃K
Links
Welcome to Baseten!
Getting started
Local development setup
MODELS
Getting started: Models
Deploying models
Managing models
Model versions
Model resources
Model health
Model logs
Tracking model metadata
APPLICATIONS
Getting started: Applications
Views
Worklets
Files
Draft environment
GitHub sync
Publishing your application
DATA
Getting started: Data
Baseten Postgres
Data connections
Query builder
Database access
Connecting to existing databases
Creating and using database tables within Baseten
Querying objects
Creating objects
Updating objects
Deleting objects
Nesting Tables
SETTINGS
Workspace settings
Plans and pricing
Billing
Manage access
Secrets
Integrations
Self-hosting Baseten
Account settings
API keys
TUTORIALS
Build your first app
Stateful UI with Python
APPENDIX
Glossary
Keyboard shortcuts
Using SageMaker
Python packages
Upgrade notes
Powered By GitBook

Nesting Tables

Nest tables with SQLAlchemy.
Add a field to your existing table in the "Data" tab. Link it to an object of another table you have, or a list of those table objects!
# Get classes
Parent = context.classes.Parent
Child = context.classes.Child
​
session = context.session
​
# Create and add objects
parent_obj = Parent(name="the cool parent")
child_obj = Child(parent=parent_obj)
session.add(child_obj)
Learn more about nesting table objects.
Previous
Deleting objects
Next - SETTINGS
Workspace settings
Last modified 10mo ago
Copy link