in src/main/java/com/amazonaws/services/glue/catalog/HiveGlueCatalogSyncAgent.java [328:349]
public void onCreateTable(CreateTableEvent tableEvent) throws MetaException {
super.onCreateTable(tableEvent);
Table table = tableEvent.getTable();
String ddl = "";
if (table.getTableType().equals(EXTERNAL_TABLE_TYPE) && table.getSd().getLocation().startsWith("s3")) {
try {
ddl = HiveUtils.showCreateTable(tableEvent.getTable());
LOG.info("The table: " + ddl);
if (!addToAthenaQueue(ddl)) {
LOG.error("Failed to add the CreateTable event to the processing queue");
} else {
LOG.debug(String.format("Requested replication of %s to AWS Glue Catalog.", table.getTableName()));
}
} catch (Exception e) {
LOG.error("Unable to get current Create Table statement for replication:" + e.getMessage());
}
}
}