Class InputFormats.FlatTextFormatDefn
java.lang.Object
org.apache.druid.catalog.model.table.InputFormats.BaseFormatDefn
org.apache.druid.catalog.model.table.InputFormats.FlatTextFormatDefn
- All Implemented Interfaces:
InputFormatDefn
- Direct Known Subclasses:
InputFormats.CsvFormatDefn,InputFormats.DelimitedFormatDefn
- Enclosing class:
- InputFormats
Definition of a flat text (CSV and delimited text) input format.
Note that not all the fields in
FlatTextInputFormat appear here:
findColumnsFromHeader- not yet supported in MSQ.hasHeaderRow- Always set to false since we don't bother to read it.skipHeaderRowsis used to specify the number of header rows to skip.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadjustValues(Map<String, Object> jsonMap) Create an input format from a resolved catalog table spec.mapFromArgs(Map<String, Object> args, List<ColumnSpec> columns) toMap(ResolvedExternalTable table) voidvalidate(ResolvedExternalTable table) Given a resolved table that has the serialized JSON converted to a Java map, validate the values of that map, typically by converting that map the target input format object (after adjustments and filling in dummy columns.) THe goal is to validate the information the user has provided in the table spec.Methods inherited from class org.apache.druid.catalog.model.table.InputFormats.BaseFormatDefn
convert, convertColumns, inputFormatClass, parametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.catalog.model.table.InputFormatDefn
convertFromArgs, typeValue
-
Field Details
-
LIST_DELIMITER_PARAMETER
- See Also:
-
SKIP_ROWS_PARAMETER
- See Also:
-
-
Constructor Details
-
FlatTextFormatDefn
-
-
Method Details
-
validate
Description copied from interface:InputFormatDefnGiven a resolved table that has the serialized JSON converted to a Java map, validate the values of that map, typically by converting that map the target input format object (after adjustments and filling in dummy columns.) THe goal is to validate the information the user has provided in the table spec. The final format information is validated elsewhere.- Specified by:
validatein interfaceInputFormatDefn- Overrides:
validatein classInputFormats.BaseFormatDefn
-
toMap
-
adjustValues
-
mapFromArgs
-
convertFromTable
Description copied from interface:InputFormatDefnCreate an input format from a resolved catalog table spec. The format is given by the Java map within the given object.- Specified by:
convertFromTablein interfaceInputFormatDefn- Overrides:
convertFromTablein classInputFormats.BaseFormatDefn- Parameters:
table- resolved form of a table spec, with the format JSON parsed into a JSON map- Returns:
- an input format as defined by the table spec
-