Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive show columns in HDP3

Highlighted

Hive show columns in HDP3

Explorer

In HDP3 show columns function in hive returns the column list in alphabetical order.How to get the columns list in the actual order as in the create table of hive.

2 REPLIES 2

Re: Hive show columns in HDP3

Explorer
You should be using the sys.columns catalog view. syscolumns is included only for backwards compatibility. It's really a SQL Server 2000 system table that shouldn't be used in SQL Server 2008 R2. select * from sys.columns where object_id = object_id('MyTable') order by column_id That should return the order of your columns. Note, though, these column id's might not be sequential.
Highlighted

Re: Hive show columns in HDP3

Explorer

@Lewis I m looking for the functionality using show columns in hive table. I m not using SQL server

Don't have an account?
Coming from Hortonworks? Activate your account here