Hi team , I am new to and having great experience ...
# questions-and-troubleshooting
t
Hi team , I am new to and having great experience with starrocks but I am facing one issue in which I am creating a table through ctas and directly inserting files the issue I am facing is that the CREATE TABLE your_table AS SELECT CAST(your_column AS VARCHAR) as your_column FROM FILES( "path" = "your_file_path", "format" = "your_format" ); I am creating tables from this name but I have a column named address and pin code in the file table which is separated sometimes the pincode has numeric values sometimes it has alphabetical values so the issue is when i use the files(csv.skip_header=1) this is failing and only numeric values are shown all the other alphabetical char are going as null and if I do files(csv.skip_header=0) the issue is the alpha and numeric values are going in but the header is also present which I dont want is there a solution for this when I do that I get this in the error if Sometimes I get this also for csv.skip_header=1) Error: The field (name = $1, pos = 0) is out of range. if I keep files and so I want to resolve this is there a property or a different method I can use
p
You could try increasing the number of sample rows `"`auto_detect_sample_rows" = "1234"`` so that it detects it should import it as a string? I have a PR open to allow skipping of type detection altogether so that sql functions could be applied for conversion if required. https://github.com/StarRocks/starrocks/pull/66519