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
It would be awesome to specify database schemas using Python objects, such as classes or methods. I believe this approach could enhance the user experience because Python objects are easier to write and can help catch errors more effectively
The text was updated successfully, but these errors were encountered:
I think I can see what you mean. A potential problem with this is that then the schema is only useful within Python...
I guess the way we're doing it now is that you write a JSON-schema, and then we convert that into Pydantic objects. So, I suppose it wouldn't be hard to also allow the other direction: user starts from a Pydantic model. I guess you would just create a ParsedSchema object from a pydantic model. It's probably even easier to do than coming from the JSON-schema.
I think there are then also ways to go from those models to a JSON-schema, in case you need a file-based representation...
And in fact, for pipestat, we do need a file-based representation.
So I think the way to approach this would be to just show people how to do Pydantic-to-JSON-Schema, which should be simple. So then you can write your schema with Python objects, save them to JSON schema, and then pass this to pipestat.
It would be awesome to specify database schemas using Python objects, such as classes or methods. I believe this approach could enhance the user experience because Python objects are easier to write and can help catch errors more effectively
The text was updated successfully, but these errors were encountered: