@Pien Derkxโ :
You can alter the existing table to change the data type of columns using SQL syntax. Here's an example of how to do it:
-- Replace <table_name> and <column_name> with the actual table and column names
ALTER TABLE <table_name> ALTER COLUMN <column_name> TYPE STRING;
This will change the data type of the specified column to string. You can run this command for each column that you need to change.
Alternatively, you can create a new table with the desired schema and then copy the data from the old table to the new table using SQL. Here's an example of how to do it:
-- Create a new table with the desired schema
CREATE TABLE <new_table_name> (
<column1_name> STRING,
<column2_name> STRING,
...
);
-- Copy the data from the old table to the new table
INSERT INTO <new_table_name> SELECT CAST(<column1_name> AS STRING), CAST(<column2_name> AS STRING), ... FROM <old_table_name>;
This will create a new table with the desired schema and copy the data from the old table to the new table, converting the data types in the process. Once the new table is created, you can drop the old table and rename the new table to the old table name.