Impala: Show tables like query

Man*_*dar 6 hive cloudera hiveql impala cloudera-cdh

I am working with Impala and fetching the list of tables from the database with some pattern like below.

Assume i have a Database bank, and tables under this database are like below.

cust_profile
cust_quarter1_transaction
cust_quarter2_transaction
product_cust_xyz
....
....
etc
Run Code Online (Sandbox Code Playgroud)

Now i am filtering like

show tables in bank like '*cust*'
Run Code Online (Sandbox Code Playgroud)

It is returning the expected results like, which are the tables has a word cust in its name.

现在我的要求是我想要名称中包含的所有表,cust而表中不应包含quarter2.

有人可以帮助我如何解决这个问题。

Dav*_*itz 7

从shell执行然后过滤

impala-shell -q "show tables in bank like '*cust*'" | grep -v 'quarter2'
Run Code Online (Sandbox Code Playgroud)