Question

Field with Integer Datatype not valid in RestAPI


Hi all,

I am using a Cdata Restapi to connect to a datasource, and it has been working fine up to now.

It seems they have changed one of the fields, used for incremental loading, and this has now become too long to fit in a integer data type. 

I have had contact with the support team of the datasource and it seems the field had always been setup as a int64 field (not documented very well), but the value wasn't that big in the past. Now I get errors when retrieving data , stating that the field is too small. 

How can I adjust the field definition in TX so that it is a bigint field instead of int32? I tried with override datatype, but initially it still wants to load the data in int32.

Using the TX 20.10 version, with business units and a cdata restapi connection.

 

Has anyone experience with this?

 

Kind regards,

Jacqueline


4 replies

Userlevel 6
Badge +5

Hi @jacqueline.hofmeijer 

It does not seem like you can expand the size to a bigint.

I will ask CData if we somehow are able to do this.

Userlevel 2
Badge +1

@jacqueline.hofmeijer can you set it to a decimal(20,0)? Best would be to do that in the RSD file so that the entire data flow sees it as this type, including TX.

Userlevel 6
Badge +5

Hi Thomas,

This depends on exactly where the error is being thrown, but if it is a datatype conversion error in the driver, you will likely be able to fix this by changing the column type in the RSD from an int to a long. 

 

Can you try this suggestion. If it does not work, let me know about it.

Userlevel 6
Badge +5

@jacqueline.hofmeijer were you able to test changing the column type in the RSD file as suggested by Thomas above?

Reply