Skip to main content

We are using File upload data connection.

 

I forget the datatype of column, so can anyone help in writing query like how I can find the datatype of column.

Hey,

you can use in the Transformation the following query (here the link to the Vertica SQL documentation) to select the Data Type, Table Name and Column Name of the table inserted in the WHERE clause:

 

SELECT DATA_TYPE, TABLE_NAME, COLUMN_NAME FROM COLUMNS WHERE TABLE_NAME = '<table_name>'

 

Regards,

Alberto

 


Suppose, If I want to change the datatype of a columns of a file that I uploaded using upload file data connection.

 

Then what query I need to use.


Suppose, If I want to change the datatype of a columns of a file that I uploaded using upload file data connection.

 

Then what query I need to use.

Unfortunately, you can't modify directly in the Configuration Process during the File Uploading. Another way to change the data type of a column is to use the CAST Function in SQL Vertica (here the documentation).

For example, here an example to change the DataType of a column from char to integer:

 

SELECT CAST(TABLE.COLUMN1 AS INT) FROM TABLE

 

Another way is to use the PQL Function to change the Data Type directly on the Dashboard.

 

Best Regards,

Alberto


Thanks Alberto for your help.😊


Suppose, If I want to change the datatype of a columns of a file that I uploaded using upload file data connection.

 

Then what query I need to use.

Hi @utkarsh.na 

 

You can try this option if you are sure about your data.

Click on 3 dots - > Configure Data Schema -> Click on Next which will give you an option to select data type image 


Unfortunately, you can't modify directly in the Configuration Process during the File Uploading. Another way to change the data type of a column is to use the CAST Function in SQL Vertica (here the documentation).

For example, here an example to change the DataType of a column from char to integer:

 

SELECT CAST(TABLE.COLUMN1 AS INT) FROM TABLE

 

Another way is to use the PQL Function to change the Data Type directly on the Dashboard.

 

Best Regards,

Alberto

Hi, for some reason it is not working for me? I have a column called sorting which I brought in as string. I need to covert the column and all the values in it back to int.


Reply