Converting Local Table Data Types from a HANA Space to a File Space

Convert HANA local table data types to data types supported by Apache Spark runtime when sharing tables to file space for use in transformation flows.

Context

When sharing HANA local tables to file space for consumption in a transformation flow, certain HANA data types are not supported in Apache Spark runtime. Except for the TIME data type, all other unsupported types can be cast to equivalent Aparche Spark-compatible types. Casting to correct types helps to prevent transformation failure.

Procedure

  1. In the transformation flow View Transform, create a calculated column for unsupported data types.
  2. Use the appropriate CAST SQL function to convert to recommended types:
    HANA Data Type Recommended Apache Spark Type

    DECIMALFLOAT

    DECIMAL

    SMALLDECIMAL

    DECIMAL

    ST_GEOMETRY

    VARCHAR

    ST_POINT

    VARCHAR

    TIME

    Not supported in Apache Spark. Consider converting to TIMESTAMP in the source table before sharing.

  3. Map the calculated columns to your target.