Hive query for column matching
This document records the use of hive column wildcard query. Usually, when writing hql, we often use wildcard in where filtering conditions. In fact, regular wildcard can also be used for column alignment in hive when select.
Usage scenario: there are many columns in the table and there are regular names (col1_a,col1_b,col2_z,col2_d,col10_w …) It is troublesome to check the data to list all the columns (lazy mode).
Select `col\ d+ `from table-- finds all the columns of "col" + numbers, such as col1,col23,col100