Foreign Table Type Mapping
Comprehensive guide to data type mappings between external data sources and Tacnode for foreign table integration.
This guide provides essential data type mappings between external data sources and Tacnode for foreign table operations.
ORC and Parquet Type Mapping
| External Type | Tacnode Type | Notes |
|---|---|---|
| BOOLEAN | BOOLEAN | Direct mapping |
| TINYINT | SMALLINT | Promoted for compatibility |
| SMALLINT | SMALLINT | Direct mapping |
| INT | INTEGER | Direct mapping |
| BIGINT | BIGINT | Direct mapping |
| FLOAT | REAL | Direct mapping |
| DOUBLE | DOUBLE PRECISION | Direct mapping |
| DECIMAL(p,s) | DECIMAL(p,s) | Precision preserved |
| STRING | TEXT | Variable length text |
| VARCHAR(n) | VARCHAR(n) | Length preserved |
| CHAR(n) | CHAR(n) | Fixed length preserved |
| BINARY | BYTEA | Binary data mapping |
| TIMESTAMP | TIMESTAMP | Direct mapping |
| DATE | DATE | Direct mapping |
| ARRAY<type> | type[] | Array element type mapped |
| MAP | Not Available | Complex type not supported |
| STRUCT | Not Available | Complex type not supported |
Delta Lake Type Mapping
| External Type | Tacnode Type | Notes |
|---|---|---|
| boolean | BOOLEAN | Direct mapping |
| short | SMALLINT | Direct mapping |
| integer | INTEGER | Direct mapping |
| long | BIGINT | Direct mapping |
| float | REAL | Direct mapping |
| double | DOUBLE PRECISION | Direct mapping |
| decimal(p,s) | DECIMAL(p,s) | Precision preserved |
| string | TEXT | Variable length text |
| varchar(n) | VARCHAR(n) | Length preserved |
| char(n) | CHAR(n) | Fixed length preserved |
| binary | BYTEA | Binary data mapping |
| date | DATE | Direct mapping |
| timestamp | TIMESTAMPTZ | Timestamp with timezone |
| timestamp_ntz | TIMESTAMP | Timestamp without timezone |
| array<type> | type[] | Array element type mapped |
| map | Not Available | Complex type not supported |
| struct | Not Available | Complex type not supported |
Apache Iceberg Type Mapping
| External Type | Tacnode Type | Notes |
|---|---|---|
| boolean | BOOLEAN | Direct mapping |
| int | INTEGER | 32-bit signed integer |
| long | BIGINT | 64-bit signed integer |
| float | REAL | 32-bit IEEE 754 floating point |
| double | DOUBLE PRECISION | 64-bit IEEE 754 floating point |
| decimal(p,s) | DECIMAL(p,s) | Precision preserved |
| date | DATE | Direct mapping |
| time | TIME | Microsecond precision |
| timestamp | TIMESTAMP | Microsecond precision without timezone |
| timestamptz | TIMESTAMPTZ | Timestamp with timezone |
| string | TEXT | Variable length text |
| uuid | UUID | Direct mapping |
| fixed(L) | BYTEA | Fixed-length binary |
| binary | BYTEA | Variable-length binary |
| list<type> | type[] | Array element type mapped |
| map<K,V> | Not Available | Complex type not supported |
| struct | Not Available | Complex type not supported |
Important Notes
Complex Types: MAP and STRUCT types are not supported in foreign tables. Tables containing these types may require preprocessing or schema flattening.
Array Types: Only simple arrays are supported. Array element types are recursively mapped according to the rules above.
Precision Preservation: DECIMAL types maintain their precision and scale parameters when supported by the underlying storage format.
Workarounds: For complex types, consider:
- Flattening nested structures during data preparation
- Using alternative serialization formats
- Preprocessing data to extract only supported column types