File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -317,8 +317,7 @@ def _conform_max_length(jsonschema_type): # noqa: ANN205, ANN001
317
317
jsonschema_type ["maxLength" ] = SNOWFLAKE_MAX_STRING_LENGTH
318
318
return jsonschema_type
319
319
320
- @staticmethod
321
- def to_sql_type (jsonschema_type : dict ) -> sqlalchemy .types .TypeEngine :
320
+ def to_sql_type (self , jsonschema_type : dict ) -> sqlalchemy .types .TypeEngine :
322
321
"""Return a JSON Schema representation of the provided type.
323
322
324
323
Uses custom Snowflake types from [snowflake-sqlalchemy](https://github.com/snowflakedb/snowflake-sqlalchemy/blob/main/src/snowflake/sqlalchemy/custom_types.py)
@@ -331,7 +330,7 @@ def to_sql_type(jsonschema_type: dict) -> sqlalchemy.types.TypeEngine:
331
330
"""
332
331
# start with default implementation
333
332
jsonschema_type = SnowflakeConnector ._conform_max_length (jsonschema_type )
334
- target_type = SQLConnector .to_sql_type (jsonschema_type )
333
+ target_type = self .to_sql_type (jsonschema_type )
335
334
# snowflake max and default varchar length
336
335
# https://docs.snowflake.com/en/sql-reference/intro-summary-data-types.html
337
336
maxlength = jsonschema_type .get ("maxLength" , SNOWFLAKE_MAX_STRING_LENGTH )
You can’t perform that action at this time.
0 commit comments