I want to find out the datatype of each column of a table?
For example, let's say my table was created using this:
create table X
(
col1 string,
col2 int,
col3 int
)
I want to do a command that will output somethign like this:
column datatype
col1 string
col2 int
Is there a command for this? Preferably in SparkSQL. But, if not, then how to get this data using another way? I'm using spark sql to query hive tables. Perhaps through the metadata in HIVE? thank you.