public class SchemaInferenceUtils extends Object
| Constructor and Description |
|---|
SchemaInferenceUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
doesSupportSchemaInference(org.apache.hadoop.conf.Configuration conf,
String fileFormat)
Determines if a supplied fileFormat supports Schema Inference for CREATE TABLE LIKE FILE.
|
static List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
readSchemaFromFile(org.apache.hadoop.conf.Configuration conf,
String fileFormat,
String filePath)
Returns a List containing FieldSchema as determined by the readSchema method of the provided file format.
|
public static boolean doesSupportSchemaInference(org.apache.hadoop.conf.Configuration conf,
String fileFormat)
throws HiveException
conf - Configuration object used to get class.fileFormat - File format to check for Schema Inference support.HiveException - if unable to get SerDe class for fileFormatpublic static List<org.apache.hadoop.hive.metastore.api.FieldSchema> readSchemaFromFile(org.apache.hadoop.conf.Configuration conf, String fileFormat, String filePath) throws HiveException
conf - Hadoop Configuration object used to look up class and provided to the readSchema method.fileFormat - File format in which to use SerDe from.filePath - Path to the file to read.HiveException - if unable to read the schemaCopyright © 2024 The Apache Software Foundation. All rights reserved.