Support Questions

Find answers, ask questions, and share your expertise
Announcements
Welcome to the upgraded Community! Read this blog to see What’s New!

Query to find the count of columns for all tables in impala

avatar
Explorer

I am trying to fetch a count of total columns for a list of individual tables/views from Impala from the same schema.

however i wanted to scan through all the tables from that schema to capture the counts of columns of all the tables in a single query ?

i have already performed a similar exercise from Oracle Exa data ,however since i a new to Impala is there a way to capture all the tables in a single query ?

 

 

Exadata query for reference

 

# Oracle Exadata query i used

 

select owner, table_name as view_name, count(*) as counts
from dba_tab_cols /*DBA_TABLES_COLUMNS*/
where (owner, table_name) in
(
select owner, view_name
from dba_views /*DBA_VIEWS*/
where 1=1
and owner='DESIRED_SCHEMA_NAME'
)
group by owner ,table_name
order by counts desc;

impala /hive

DESCRIBE schemaName.tableName;

# Impala /Hive

 

how to find out ? if i need to run a single query check i was following the below 

 

for multiple tables/view how to find out the total column counts ?

 

0 REPLIES 0
Labels