Number format in InMemory

I got a problem with Excel data imported to InMemory ETL. The (Measure) data is being read as string and I want to format it with a CAST function.  However, none of the normal Cast functions seems to work and gives an error. It does not matter if I do it at the stage level or within the ME database.

Can you advice how to handle this?

0

Comments

1 comment
  • Hi Brian,

    You should be able to do it within the ME database. E.g., with an Import task from a Stage table to a dim table, you should be able to do it as part of the import script itself.

    Example:

    SELECT
        [name],
        [description],
        [latitude],
        [longitude],
        CAST([latitude] as FLOAT) as lat_float,
        CAST([longitude] as FLOAT) as long_float
    FROM [s_USStateCapitals]

    In this example, [laltitude] and [longitude] are data type STRING. The CAST operations create two additional fields, [lat_float] and [long_float], of data type FLOAT.

    BR / Ole

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post