How can I cast a Number to BigInt in dataweave in Mule 4?

221 Views Asked by At

I want to insert records to a database but I´m getting this error

********************************************************************************
Message               : com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from UNKNOWN to BIGINT is unsupported.
Element               : (None)
Element DSL           : (None)
Error type            : DB:QUERY_EXECUTION
FlowStack             : (None)

  (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)

Input Values

[{
    claclientecuenta: vars.claclientecuenta,
    marca: payload.marca,
    nombre: payload.nombre,
    estatusid: payload.estatusid
}]

-QUERY-

INSERT INTO dbo.Marca 
VALUES (:claclientecuenta,:marca,:nombre, :estatusid);

I defined the RAML as Number but in the database is defined as BigInt

Do you have any idea in how to solve it?

I´ve searched for a long time but I don´t find in the documentation what I need or other solutions

0

There are 0 best solutions below