<@U04SE163WC8> Is it possible to retain the origin...
# ask-ai
m
@kapa.ai Is it possible to retain the original datatypes in the catalog returned by a connector’s discover method?
u
Based on the provided knowledge sources, it appears that retaining the original datatypes in the catalog returned by a connector's discover method is not directly possible in Airbyte. Here's why: 1. The discover method returns an AirbyteCatalog, which declares the streams and their schemas output by a connector. This catalog uses a standardized format for describing data types [Documentation > Connector-development > Tutorials > Custom-python-connector > Discover](https://docs.airbyte.com/connector-development/tutorials/custom-python-connector/discover). 2. The data type mapping is done by the source connector during the discover process. Users don't have the option to change these mappings [Github Issue: [destination-mysql] - Table Creation Control and Data Type Mapping from Redshift to MySQL](https://github.com/airbytehq/airbyte/issues/38031). 3. Airbyte is working on upgrading connectors to use new well-known type definitions, rather than basic type declarations. This suggests that Airbyte is moving towards a more standardized way of representing data types across different sources [Github Issue: data types update - DB sources](https://github.com/airbytehq/airbyte/issues/17636). 4. The discover process in source connectors typically maps source-specific data types to Airbyte's JSON schema types. For example, a PostgreSQL
int8
type might be mapped to a JSON
number
type [Forum Post: Destination data types all varchars](https://discuss.airbyte.io/t/3266). Given these points, it seems that Airbyte intentionally standardizes data types during the discover process to ensure compatibility across different sources and destinations. While this approach may not retain the exact original datatypes, it allows for a more consistent data integration experience across various systems. If you need to work with the original datatypes, you might need to consider custom solutions or wait for potential future enhancements to Airbyte's type system.
u
Based on the provided knowledge sources, it appears that retaining the original datatypes in the catalog returned by a connector's discover method is not directly possible in Airbyte. Here's why: 1. The discover method returns an AirbyteCatalog, which declares the streams and their schemas output by a connector. This catalog uses a standardized format for describing data types [Documentation > Connector-development > Tutorials > Custom-python-connector > Discover](https://docs.airbyte.com/connector-development/tutorials/custom-python-connector/discover). 2. The data type mapping is done by the source connector during the discover process. Users don't have the option to change these mappings [Github Issue: [destination-mysql] - Table Creation Control and Data Type Mapping from Redshift to MySQL](https://github.com/airbytehq/airbyte/issues/38031). 3. Airbyte is working on upgrading connectors to use new well-known type definitions, rather than basic type declarations. This suggests that Airbyte is moving towards a more standardized way of representing data types across different sources [Github Issue: data types update - DB sources](https://github.com/airbytehq/airbyte/issues/17636). 4. The discover process in source connectors typically maps source-specific data types to Airbyte's JSON schema types. For example, a PostgreSQL
int8
type might be mapped to a JSON
number
type [Forum Post: Destination data types all varchars](https://discuss.airbyte.io/t/3266). Given these points, it seems that Airbyte intentionally standardizes data types during the discover process to ensure compatibility across different sources and destinations. While this approach may not retain the exact original datatypes, it allows for a more consistent data integration experience across various systems. If you need to work with the original datatypes, you might need to consider custom solutions or wait for potential future enhancements to Airbyte's type system.