Metadata in Hive connector

Hi all, I have two questions about Starburst’s hive connector:

  1. How can we set LOCATION for an existing schema?
  2. How Starburst recognize if a table is managed or external?

Our case is, we create a table via AWS Glue API, if I understood correctly, it’s an external table for Starburst. Then if we delete the table from Starburst, it will only clean the metadata and leave the raw data (in S3) there. In this process, I’m wondering how Starburst recognizes this is an external table.

How can we set LOCATION for an existing schema?

Currently this is not possible.

How Starburst recognize if a table is managed or external? Our case is, we create a table via AWS Glue API, if I understood correctly, it’s an external table for Starburst.

The logic is here:
[https://github.com/trinodb/trino/blob/d21cb3b7ca210eba39fa4e8134d63350dd685657/plu[…]/plugin/hive/metastore/glue/converter/GlueToTrinoConverter.java]
(trino/plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/converter/GlueToTrinoConverter.java at d21cb3b7ca210eba39fa4e8134d63350dd685657 · trinodb/trino · GitHub)

i,e, get com.amazonaws.services.glue.model.Table#getTableType attribute, or assume external, if this is not set. You can set this attribute to “MANAGED_TABLE” to have your data files deleted upon DROP TABLE.