Questions about information_schema table

We use Trino to connect to HDFS. I discovered that the data in the information schema, for example

select
*
from
information_schema.columns clz
where
clz.table_catalog = ‘hive’ and
clz.table_schema = ‘<schema_name>’ and
clz.table_name = ‘<table_name>’

doesn’t always match up with what I get if I run

show tables from [db].]table]

It seems that the show tables command pretty much always matches up with what I see if I run the hadoop command to show the contents of the hdfs folder.

So I’m trying to figure out:

  • why the information_schema doesn’t give the same results as show tables
  • if there is a way to refresh information_schema to make it current

Thank you.

The Trino information_schema depends on the data in the Hive metastore in your case of using HDFS/Hive. So it will match if the data is exposed in the Hive metastore… if you just create a folder in HDFS however. it wont show up … just like it wont show up in the Hive metastore