Skip to main content Skip to complementary content

isCastable

Returns true if the input value can be converted to a given data type.

Information noteNote: This feature is only available in Talend Data Mapper.

Arguments

  1. Input value.
  2. String containing the name of a data type. The following values are supported:
    • BigDecimal
    • Decimal or Dec
    • Bytes
    • DateTime
    • Date
    • Time
    • Integer or Int
    • Long
    • Float
    • Double
    • String
    • Boolean or Bool
    • Null

    These values are case-insensitive.

Examples

Expression Result
isCastable("Hello World", "bool") true
isCastable("Hello World", "INTEGER") false

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!