First Check
Commit to Help
Example Code
from sqlalchemy import func
selectable = people.tablesample(
func.bernoulli(1),
name='alias',
seed=func.random())
stmt = select(selectable.c.people_id)
Description
I'm trying to use the tablesample method defined in SQLAlchemy, but I can't seem to understand how to migrate it's structure from the sample code into SQLModel code.
For more context, I'm trying to get a random sample from a simple select query (with two wheres) and would prefere to do everything in the query instead of having to sample the resulting data (cause the table is really large)
Operating System
macOS
Operating System Details
No response
SQLModel Version
0.0.4
Python Version
3.9.7
Additional Context
No response
First Check
Commit to Help
Example Code
Description
I'm trying to use the tablesample method defined in SQLAlchemy, but I can't seem to understand how to migrate it's structure from the sample code into SQLModel code.
For more context, I'm trying to get a random sample from a simple select query (with two wheres) and would prefere to do everything in the query instead of having to sample the resulting data (cause the table is really large)
Operating System
macOS
Operating System Details
No response
SQLModel Version
0.0.4
Python Version
3.9.7
Additional Context
No response