private String catalogConnectorType(CatalogMeta catalogMeta) {
    String catalogType = catalogMeta.getCatalogType();
    Set<TableFormat> tableFormatSet = CatalogUtil.tableFormats(catalogMeta);
    if (catalogType.equalsIgnoreCase(CatalogType.AMS.name())) {
      if (tableFormatSet.size() > 1) {
        return "unified";
      } else if (tableFormatSet.contains(TableFormat.MIXED_ICEBERG)) {
        return "mixed_iceberg";
      } else if (tableFormatSet.contains(TableFormat.ICEBERG)) {
        return "iceberg";
      }
    } else if (catalogType.equalsIgnoreCase(CatalogType.HIVE.name())
        || catalogType.equalsIgnoreCase(CatalogType.HADOOP.name())) {
      if (tableFormatSet.size() > 1) {
        return "unified";
      } else if (tableFormatSet.contains(TableFormat.MIXED_ICEBERG)) {
        return "mixed_iceberg";
      } else if (tableFormatSet.contains(TableFormat.MIXED_HIVE)) {
        return "mixed_hive";
      } else if (tableFormatSet.contains(TableFormat.ICEBERG)) {
        return "iceberg";
      } else if (tableFormatSet.contains(TableFormat.PAIMON)) {
        return "paimon";
      }
    } else if (catalogType.equalsIgnoreCase(CatalogType.CUSTOM.name())) {
      return "iceberg";
    } else if (catalogType.equalsIgnoreCase(CatalogType.GLUE.name())) {
      return "iceberg";
    }
    throw new IllegalStateException("unknown catalog type: " + catalogType);
  }
Get last execution info

@param terminalId - id of terminal window
@return last session info
amoro-ams/src/main/java/org/apache/amoro/server/terminal/TerminalManager.java