ingestr icon indicating copy to clipboard operation
ingestr copied to clipboard

Error with Snowflake source NUMBER(X,0) field type

Open adaykoth opened this issue 1 year ago • 1 comments

I run into this error whenever I try to ingest a table from snowflake where a field is of the format NUMBER(X,0):

[2024-04-29 23:22:27] [ua.ingestrrrpred] <class 'dlt.destinations.exceptions.DatabaseTransientException'> [2024-04-29 23:22:27] [ua.ingestrrrpred] 400 POST https://bigquery.googleapis.com/bigquery/v2/projects/idle-fast-food-bbf2a/queries?prettyPrint=false: In NUMERIC(P, 0), P must be between 1 and 29 at [8:15]

This does not happen when I convert the type to either integer or allow a precision for the floating point number (e.g. NUMBER(X,2)).

adaykoth avatar May 03 '24 14:05 adaykoth

@adaykoth, The error suggests that BigQuery only supports a precision range of (1,29). You need the source datatype that supports this behaviour in your landing area

ref : BigQuery Doc

trakmaker avatar Jul 06 '24 17:07 trakmaker

this issue should have been fixed with the latest version of ingestr which takes care of precision conversion properly.

karakanb avatar Dec 20 '24 09:12 karakanb