Robert Higgins
03/03/2026, 2:28 PM-39673313213476023434815093321191113562
My FILE statement looks like this :
SELECT CAST($1 as LARGEINT) FROM FILES
(
"path" = "s3://.../test.csv",
"format" = "csv",
"csv.column_separator" = ",",
"csv.row_delimiter" = "\r\n",
"csv.enclose" = "\"",
"csv.trim_space" = "true",
"aws.s3.endpoint" = "...",
"aws.s3.access_key" = "...",
"aws.s3.secret_key" = "...",
"aws.s3.enable_path_style_access" = "true",
"aws.s3.ssl_enabled" = "false"
)
The output of the statement does not return the value in the file. I've tried with and without cast :
file: -39673313213476023434815093321191113562
select cast: -39673313213476021963817764313291030528
select nocast: -39673313213476020000000000000000000000
It seems that even when casting explicity the csv data to largeint, something is lost (precision or otherwise). Is there way to get this to load correctly, or have I encountered a bug ?Patrick Buxton
03/03/2026, 4:24 PMPatrick Buxton
03/03/2026, 4:26 PMRobert Higgins
03/03/2026, 4:32 PMauto_detect_types=false . I can't find one that will give a final largeint with the odd suffix.Patrick Buxton
03/03/2026, 4:37 PMRobert Higgins
03/03/2026, 5:28 PMKevin Cai
03/04/2026, 1:59 AMRobert Higgins
03/04/2026, 8:58 AMselect nocast: -39673313213476020000000000000000000000
select cast: -39673313213476021963817764313291030528
Thanks for the help, I haven't got TUs running yet, but if I get a chance I'll see if can be improved.