public void execute() {
    if (!tagConfig.isAutoCreateTag()) {
      return;
    }
    LOG.debug("Start checking the automatic creation of tags for {}", table.name());
    if (tagExist()) {
      LOG.debug("Found the expected tag on {}, skip", table.name());
      return;
    }
    boolean success = createTag();
    if (success) {
      LOG.info("Created a tag successfully on {}", table.name());
    } else {
      LOG.info("Skipped tag creation on {}", table.name());
    }
  }
Action to auto create tag for Iceberg Table.
amoro-ams/src/main/java/org/apache/amoro/server/optimizing/maintainer/AutoCreateIcebergTagAction.java