public static HCatSchema getTableSchema(Configuration conf) throws IOException {
    OutputJobInfo jobInfo = getJobInfo(conf);
    return jobInfo.getTableInfo().getDataColumns();
  }
Gets the table schema for the table specified in the HCatOutputFormat.setOutput call
on the specified job context.
Note: This is the record-schema for the table. It does not include the table's partition columns.
@param conf the Configuration object
@return the table schema, excluding partition columns
@throws IOException if HCatOutputFormat.setOutput has not been called for the passed context
hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/HCatBaseOutputFormat.java