Tamir T
08/05/2025, 10:02 PMS3 Data Lake connector to transfer from db2 to iceberg, all numeric types are converted into double, which is not a desirable feature, and all TIME data types are turning into strings. why is that?kapa.ai
08/05/2025, 10:02 PMnumber types are mapped to Iceberg Double, and all integer types are mapped to Iceberg Long. If you are seeing all numeric types (including integers) being converted to Double, this may indicate that the Airbyte type for those fields is being inferred as number rather than integer during extraction from Db2. This could be due to how the source connector interprets Db2 numeric types, especially for types like DECIMAL, NUMERIC, or floating-point types, which are mapped to number in Airbyte and thus become Double in Iceberg. Only fields explicitly typed as integer in Airbyte will become Long in Iceberg. This is the expected behavior per the documented mapping: | Airbyte type | Iceberg type | |--------------|--------------| | Integer | Long | | Number | Double | [See Output Schema Mapping](https://docs.airbyte.com/integrations/destinations/s3-data-lake#output-schema) ### TIME Data Types → String For TIME data types, the mapping table shows: | Airbyte type | Iceberg type | |----------------------|--------------| | Time with timezone | Time | | Time without timezone| Time | However, the documentation also states that nested fields (objects, arrays, and unions) are mapped to string columns and written as serialized JSON. If your TIME fields are being interpreted as complex types (for example, if they are nullable or unions in the JSON schema), they may be serialized as strings in the output. Additionally, if the source connector or the schema inference step does not correctly map the Db2 TIME type to the Airbyte time type, it may default to a string representation. [See Output Schema Mapping](https://docs.airbyte.com/integrations/destinations/s3-data-lake#output-schema) ### Summary - Numeric types: If they are mapped as number in Airbyte, they become Double in Iceberg. Only explicit integer types become Long. - TIME types: If not mapped as Airbyte time, or if represented as unions/nullable types, they may be serialized as strings. If this behavior is not desirable, you may need to review the source connector’s type mapping or adjust your schema to ensure correct type inference. The knowledge sources do not provide a direct solution for customizing this mapping, but they do clarify that this is the expected default behavior for the S3 Data Lake connector. If you need more granular control over type mapping, you may need to consider post-processing or schema adjustments before loading into Iceberg. If you have further questions or need to troubleshoot specific cases, please provide sample schema definitions or connector versions for more targeted advice.