private String makeCreateTable(String db, TableDesc desc) {
    String exec = String.format("use %s; create", db);

    if (desc.external)
      exec += " external";
    exec += " table";
    if (desc.ifNotExists)
      exec += " if not exists";
    exec += " " + desc.table;

    if (TempletonUtils.isset(desc.columns))
      exec += String.format("(%s)", makeCols(desc.columns));
    if (TempletonUtils.isset(desc.comment))
      exec += String.format(" comment '%s'", desc.comment);
    if (TempletonUtils.isset(desc.partitionedBy))
      exec += String.format(" partitioned by (%s)", makeCols(desc.partitionedBy));
    if (desc.clusteredBy != null)
      exec += String.format(" clustered by %s", makeClusteredBy(desc.clusteredBy));
    if (desc.format != null)
      exec += " " + makeStorageFormat(desc.format);
    if (TempletonUtils.isset(desc.location))
      exec += String.format(" location '%s'", desc.location);
    if (TempletonUtils.isset(desc.tableProperties))
      exec += String.format(" tblproperties (%s)",
        makePropertiesStatement(desc.tableProperties));
    exec += ";";

    return exec;
  }
Return a json "show table extended like" with extra info from "desc exteded"
This will return table with exact name match.
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/HcatDelegator.java