databricks-sql-python icon indicating copy to clipboard operation
databricks-sql-python copied to clipboard

Added Json type to the sqlalchemy parser

Open jprakash-db opened this issue 1 year ago • 1 comments

Description

Added the Json type in the sqlalchemy types file to handle the compilation of Json to string

jprakash-db avatar Sep 03 '24 16:09 jprakash-db

@jprakash-db Generally the idea you implemented looks correct - in Databricks, JSON values are stored as strings, so we have to give SQLAlchemy a hint about it. However, it would be nice to have tests to check that data are actually serialized correctly (as JSON-encoded string in this case). Currently we only have tests that verify it the type is mapped properly, but IMHO it's not enough. Can you please check if we have any tests to check that all our customized data types are actually properly serialized, and add JSON values to it? If we don't have such test suite - can you please create it, and it least check for JSON, Enum ans UUID types being properly serialized?

kravets-levko avatar Sep 04 '24 17:09 kravets-levko