protected Table buildTableFromColsList(String tableName, List<FieldSchema> cols) {
    //Setting the storage descriptor.
    StorageDescriptor sd = new StorageDescriptor();
    sd.setCols(cols);
    SerDeInfo serdeInfo = new SerDeInfo();
    serdeInfo.setName(tableName);
    serdeInfo.setSerializationLib("org.apache.hive.storage.jdbc.JdbcSerDe");
    Map<String, String> serdeParams = new HashMap<String, String>();
    serdeParams.put("serialization.format", "1");
    serdeInfo.setParameters(serdeParams);

    sd.setSerdeInfo(serdeInfo);
    sd.setInputFormat(getInputClass());
    sd.setOutputFormat(getOutputClass());
    sd.setLocation(getTableLocation(tableName));
    sd.setBucketCols(new ArrayList<String>());
    sd.setSortCols(new ArrayList<Order>());

    //Setting the required table information
    Table table = new Table();
    table.setTableName(tableName);
    table.setTableType(TableType.EXTERNAL_TABLE.toString());
    table.setSd(sd);
    // set table properties that subclasses can fill-in
    table.setParameters(new HashMap<String, String>());
    // set partition keys to empty
    table.setPartitionKeys(new
        ArrayList<FieldSchema>());

    return table;
  }
Fetch a single table with the given name, returns a Hive Table object from the remote database
@return Table A Table object for the matching table, null otherwise.
@throws MetaException To indicate any failures with executing this API
@param tableName
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/dataconnector/AbstractDataConnectorProvider.java