Skip to main content
Answer

Error while loading RAW row [key='O01-368135-2'] in column 'billet_temperature_strengthener': cognite.spark.v1.CdfSparkIllegalArgumentException: Expected value of type LongType but got -0.01.

  • June 26, 2025
  • 2 replies
  • 40 views

Sumedh_Vaidya
Active

i want to take export of one table to another table but facing this datatype error .
also tried with multiple datatype (like string , float and Bigint ) still same issue is coming. 

 

Best answer by JaimeSilva

Hi! This usually happens when the columns of the RAW table are hard to fit into a schema, in this specific case it’s being inferred that the `billet_temperature_strengthener` column is of type Long from a sample, but there are decimal values in the full data set.

To avoid it, you can tell your transformation your table schema, to skip the schema inference and make sure it always uses the correct one

2 replies

Forum|alt.badge.img
  • Practitioner
  • Answer
  • June 27, 2025

Hi! This usually happens when the columns of the RAW table are hard to fit into a schema, in this specific case it’s being inferred that the `billet_temperature_strengthener` column is of type Long from a sample, but there are decimal values in the full data set.

To avoid it, you can tell your transformation your table schema, to skip the schema inference and make sure it always uses the correct one


Sumedh_Vaidya
Active

Using cdf_raw was effective because it bypassed schema inference.


Thanks ,
Sumedh