singer_sdk.connectors.sql.JSONSchemaToSQL¶
- class singer_sdk.connectors.sql.JSONSchemaToSQL[source]¶
A configurable mapper for converting JSON Schema types to SQLAlchemy types.
This class provides a mapping from JSON Schema types to SQLAlchemy types.
Added in version 0.42.0.
- __init__(*, max_varchar_length=None)[source]¶
Initialize the mapper with default type mappings.
- Parameters:
max_varchar_length (int | None) – The absolute maximum length for VARCHAR columns that the database supports.
- Return type:
None
- handle_raw_string(schema)[source]¶
Handle a string type generically.
- Parameters:
schema (dict) – The JSON Schema object.
- Returns:
Appropriate SQLAlchemy type.
- Return type:
TypeEngine