Data Types Supported in the Ossie Specification: Complete Vendor Mapping Guide

The Apache Ossie specification defines ten portable logical data types—String, Integer, Decimal, Float, Boolean, Date, Time, DateTime, DateTimeTz, and Opaque—that automatically map to vendor-specific physical types like Snowflake VARCHAR, Salesforce Text, and Iceberg timestamps.

Apache Ossie provides a vendor-neutral framework for data modeling through its core specification. Understanding the data types supported in the Ossie specification is essential for building portable datasets that translate seamlessly across platforms. These logical types are declared using the datatype property on fields and metrics, with specific converter implementations handling the translation to target systems.

Portable Data Types Defined in core-spec/spec.md

The canonical list of portable DataTypes is defined in [core-spec/spec.md](https://github.com/apache/ossie/blob/main/core-spec/spec.md#data-types)【/cache/repos/github.com/apache/ossie/main/core-spec/spec.md†L69-L80】. These logical types abstract away vendor-specific implementations while preserving semantic meaning.

Standard Portable Types

The Ossie specification supports nine concrete logical types for common data representations:

  • String – Unicode text with unspecified length and collation. Maps to Snowflake VARCHAR, Salesforce Text/Email/PhoneNumber/Url, and Iceberg string.
  • Integer – Exact whole numbers with unspecified width. Translates to Snowflake NUMBER(38,0), Salesforce Number (when integer-only), and Iceberg int or long.
  • Decimal – Exact base-10 numbers with unspecified precision and scale. Converts to Snowflake NUMBER, Salesforce Decimal or Currency, and Iceberg decimal(P,S).
  • Float – Approximate floating-point numbers. Becomes Snowflake FLOAT or Iceberg float/double.
  • Boolean – Two-valued logical type. Maps directly to Snowflake BOOLEAN and Iceberg boolean.
  • Date – Calendar date without time component. Converts to Snowflake DATE, Salesforce Date, and Iceberg date.
  • Time – Time-of-day without date. Maps to Snowflake TIME and Iceberg time.
  • DateTime – Local timestamp without timezone. Translates to Snowflake TIMESTAMP_NTZ and Iceberg timestamp.
  • DateTimeTz – Timestamp with timezone or offset. Converts to Snowflake TIMESTAMP_TZ and Iceberg timestamptz.

The Opaque Type for Extensions

Opaque serves as a catch-all for any type not covered by the portable list. When using this type, vendor-specific details are stored in the custom_extensions block, ensuring that proprietary types like Iceberg UUID, binary, fixed, or Salesforce Geo can be preserved without breaking core compatibility【/cache/repos/github.com/apache/ossie/main/core-spec/spec.md†L80-L81】.

Vendor-Specific Mapping Implementations

Each converter in the Ossie repository implements specific mapping logic from these portable types to vendor-native implementations.

Snowflake Converter Mapping

The Snowflake converter translates portable types according to its Data Type Mapping table defined in [converters/snowflake/README.md](https://github.com/apache/ossie/blob/main/converters/snowflake/README.md)【/cache/repos/github.com/apache/ossie/main/converters/snowflake/README.md†L38-L54】. This ensures that Ossie String fields become Snowflake VARCHAR columns, while DateTime maps to TIMESTAMP_NTZ for timezone-naive timestamps.

Salesforce Data Type Translation

For Salesforce integrations, the converter maps Ossie logical types to Salesforce dataType values as documented in [converters/salesforce/README.md](https://github.com/apache/ossie/blob/main/converters/salesforce/README.md)【/cache/repos/github.com/apache/ossie/main/converters/salesforce/README.md†L80-L87】. The mapping handles Salesforce-specific distinctions between Text, Number, and Decimal types based on the portable type and dimension properties.

Polaris and Apache Iceberg Integration

The Polaris converter manages bidirectional mapping between Iceberg physical types and Ossie logical types. As described in [converters/polaris/README.md](https://github.com/apache/ossie/blob/main/converters/polaris/README.md)【/cache/repos/github.com/apache/ossie/main/converters/polaris/README.md†L6‑20】, this includes converting Iceberg timestamp to Ossie DateTime and handling complex Iceberg types like UUID or fixed through the Opaque type mechanism.

Handling Vendor-Specific Extensions with custom_extensions

When a source system contains types that lack portable equivalents—such as Salesforce Geo locations or Iceberg binary fields—the Ossie specification preserves these through the custom_extensions mechanism. This block stores the original vendor type information using a vendor tag (e.g., vendor_name: POLARIS or vendor_name: SALESFORCE), enabling round-trip fidelity when importing and exporting models.

Practical Implementation Examples

Defining a Field with a Portable Type

datasets:
  - name: orders
    source: sales.public.orders
    fields:
      - name: order_date
        expression:
          dialects:
            - dialect: ANSI_SQL
              expression: order_date
        datatype: Date          # Portable type

        dimension:
          is_time: true

Snowflake Converter Output

When processed by the Snowflake converter, the portable Date type renders as the vendor-specific implementation:

datasets:
  - name: orders
    source: sales.public.orders
    fields:
      - name: order_date
        expression:
          dialects:
            - dialect: ANSI_SQL
              expression: order_date
        data_type: DATE          # Snowflake-specific type

        dimension:
          is_time: true

Preserving Proprietary Types with Opaque

fields:
  - name: geo_location
    expression:
      dialects:
        - dialect: ANSI_SQL
          expression: geo_location
    datatype: Opaque
    custom_extensions:
      - vendor_name: SALESFORCE
        data: '{"dataType":"Geo"}'

Summary

  • Ten portable types—String, Integer, Decimal, Float, Boolean, Date, Time, DateTime, DateTimeTz, and Opaque—form the complete set of data types supported in the Ossie specification.
  • Vendor converters in converters/snowflake/, converters/salesforce/, and converters/polaris/ handle automatic translation to platform-specific physical types.
  • Round-trip fidelity is maintained through the custom_extensions mechanism, which stores vendor-specific type metadata when using the Opaque portable type.
  • All type definitions and mapping rules are documented in the core specification and converter README files within the apache/ossie repository.

Frequently Asked Questions

What are the data types supported in the Ossie specification?

The Ossie specification defines ten portable logical data types: String, Integer, Decimal, Float, Boolean, Date, Time, DateTime, DateTimeTz, and Opaque. These are declared using the datatype property on fields and metrics, as specified in [core-spec/spec.md](https://github.com/apache/ossie/blob/main/core-spec/spec.md)【/cache/repos/github.com/apache/ossie/main/core-spec/spec.md†L69-L80】.

How does Ossie handle Snowflake-specific types like VARIANT?

Snowflake-specific types that lack portable equivalents are mapped to the Opaque type, with the original type information preserved in a custom_extensions block tagged with vendor_name: SNOWFLAKE. This ensures the variant type can be restored during round-trip operations without breaking compatibility with other vendors.

Can I preserve Salesforce Geo location types when using Ossie?

Yes. Salesforce Geo types should be declared as datatype: Opaque with the specific Salesforce type stored in custom_extensions as JSON data containing the dataType field. This pattern preserves the proprietary Geo location metadata while allowing the model to remain portable across other platforms.

Where are the vendor mapping rules defined in the source code?

Vendor-specific mapping implementations are documented in each converter's README: Snowflake mappings appear in [converters/snowflake/README.md](https://github.com/apache/ossie/blob/main/converters/snowflake/README.md)【/cache/repos/github.com/apache/ossie/main/converters/snowflake/README.md†L38-L54】, Salesforce in [converters/salesforce/README.md](https://github.com/apache/ossie/blob/main/converters/salesforce/README.md)【/cache/repos/github.com/apache/ossie/main/converters/salesforce/README.md†L80-L87】, and Polaris/Iceberg in [converters/polaris/README.md](https://github.com/apache/ossie/blob/main/converters/polaris/README.md)【/cache/repos/github.com/apache/ossie/main/converters/polaris/README.md†L6‑20】.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →