select only specific number of columns from Table - Hive -
how select specific number of columns table in hive. example, if have table 50 columns, how can select first 25 columns ? there easy way rather hard coading column names.
i guess you're asking using order in defined columns in create table
statement. no, that's not possible in hive moment.
you trick adding new column column_number
, use in where
statements, in case think twice of trade off between spending more time typing queries , messing whole table design adding unnecessary columns. apart fact if need change table schema in future (for instance, adding new column), adapting previous code different column numbers painful.
Comments
Post a Comment