You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the GitHub search to find a similar issue and didn't find it.
I searched the SQLModel documentation, with the integrated search.
I already searched in Google "How to X in SQLModel" and didn't find any information.
I already read and followed all the tutorial in the docs and didn't find an answer.
I already checked if it is not related to SQLModel but to Pydantic.
I already checked if it is not related to SQLModel but to SQLAlchemy.
Commit to Help
I commit to help with one of those options 👆
Example Code
# SELECT * FROM XYZ.test_sqlmodel# My table doesnt exit in dbo. It exists in XYZ schemafromtypingimportOptionalfromsqlmodelimportField, Session, SQLModel, create_engine, selectfromsqlalchemyimporteventclasstest_sqlmodel(SQLModel, table=True):
id: Optional[int] =Field(default=None, primary_key=True)
name: strpath='mssql+pymssql://uid:owd@server/db'engine=create_engine(path)
defselect_tbl():
withSession(engine) assession:
statement=select(test_sqlmodel)
results=session.exec(statement)
forrowinresults:
print(row)
select_tbl()
Description
When I run the example code, it works as long as my table test_sqlmodel exists in the default schema. But, how can I create a sql model that points to a different one?
Operating System
Linux
Operating System Details
Red Hat 7
SQLModel Version
0.0.4
Python Version
Python 3.8.10
Additional Context
No response
The text was updated successfully, but these errors were encountered:
First Check
Commit to Help
Example Code
Description
When I run the example code, it works as long as my table
test_sqlmodel
exists in the default schema. But, how can I create a sql model that points to a different one?Operating System
Linux
Operating System Details
Red Hat 7
SQLModel Version
0.0.4
Python Version
Python 3.8.10
Additional Context
No response
The text was updated successfully, but these errors were encountered: