Dremio - Alter Datatype of an attribute of file

How can we alter or change data type of an attribute of a table loaded via file having type as character varying?

@zaidhasan88 What is the file format? Example Parquet or CSV or Iceberg etc? For Iceberg it will follow the table’s data type defined. Do you have mixed types across files for the same column?

Hi Balaji,

Apologies for late response, file format is csv. Please informed, no mixed type for same column. As I uploaded csv having different columns, all got loaded as character. I want to change the type of one of the column as float/int.

Thanks
Zaid

@zaidhasan88 Can you not CAST to float or int and save s view?

cast is working, able to manage using cast. Does this mean no way to change the data type of a file being loaded as .csv or .dat?

@zaidhasan88 If your base file has mixed types then 2 options

  • Clean data
  • CAST to data type in VDS

Thanks CASTing attribute has worked.