Ayuda al cargar un CSV con tipo de dato Numeric(15,3)

  • Hola Foro;

    estoy pasando un archivo CSV a una tabla de Oracle:

    Archivo csv : xxxxx,10.70,0.89

    Tabla Oracle: descripcion char(20), cantidad numeric(15,3), costo numeric(15,3)

    Al subir por ETL con DATFLOW, configuro el tipode dato de los numeros asi:

    numeric

    precision 15

    scale 3

    y me genera el error:

    Data conversion failed. the data conversion for colum "columna02" returned status value 2 and status text "The value could not be converted because of a potential loss of data"

    Gracias.

  • Which column is "columna02"?

    Descripcion, cantidad or costo?

    ps: you'll have more luck with English on this site.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Hola,

    el error me genera en la posicion 2, es decir con el campo "Cantidad"

    Gracias.

  • Where do you convert the data of the second column? It is converted somewhere, as CSV is all text. Is this in the source, or do you use a derived column, a data conversion component?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • The error message suggests that one of quantities (cantidad = quantity? my Spanish is pretty minimal) in the CSV is out of scope. My guess is that it's the scale (fractional part) being over 3 digits (as a 15 precision should be able to hold a fairly large number).

    If this is the case, possible solutions are:

    Increase the scale in the data types

    Trap and handle programatically (using a CASE with string parsing?)

    SET ANSI_WARNINGS OFF: probably not recommended as this may open the gates to all sorts of garbage getting in

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply