Class InputFormats.CsvFormatDefn
- java.lang.Object
-
- org.apache.druid.catalog.model.table.InputFormats.BaseFormatDefn
-
- org.apache.druid.catalog.model.table.InputFormats.FlatTextFormatDefn
-
- org.apache.druid.catalog.model.table.InputFormats.CsvFormatDefn
-
- All Implemented Interfaces:
InputFormatDefn
- Enclosing class:
- InputFormats
public static class InputFormats.CsvFormatDefn extends InputFormats.FlatTextFormatDefn
Definition for the CSV input format. Designed so that, in most cases, the user only need specify the format as CSV: the definition fills in the common "boiler plate" properties.
-
-
Field Summary
Fields Modifier and Type Field Description static StringTYPE_KEY-
Fields inherited from class org.apache.druid.catalog.model.table.InputFormats.FlatTextFormatDefn
LIST_DELIMITER_PARAMETER, SKIP_ROWS_PARAMETER
-
-
Constructor Summary
Constructors Constructor Description CsvFormatDefn()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.druid.data.input.InputFormatconvertFromArgs(Map<String,Object> args, List<ColumnSpec> columns, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)Create an input format instance from the values provided as arguments that correspond to the defined parameters.protected Class<? extends org.apache.druid.data.input.InputFormat>inputFormatClass()The target input format class for Jackson conversions.StringtypeValue()-
Methods inherited from class org.apache.druid.catalog.model.table.InputFormats.FlatTextFormatDefn
adjustValues, convertFromTable, mapFromArgs, toMap, validate
-
Methods inherited from class org.apache.druid.catalog.model.table.InputFormats.BaseFormatDefn
convert, convertColumns, parameters
-
-
-
-
Field Detail
-
TYPE_KEY
public static final String TYPE_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
typeValue
public String typeValue()
- Returns:
- the string used to identify the input format type in the serialized
JSON for the input format. This is also the value used in the
formatproperty for SQL functions.
-
inputFormatClass
protected Class<? extends org.apache.druid.data.input.InputFormat> inputFormatClass()
Description copied from class:InputFormats.BaseFormatDefnThe target input format class for Jackson conversions.- Specified by:
inputFormatClassin classInputFormats.BaseFormatDefn
-
convertFromArgs
public org.apache.druid.data.input.InputFormat convertFromArgs(Map<String,Object> args, List<ColumnSpec> columns, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
Description copied from interface:InputFormatDefnCreate an input format instance from the values provided as arguments that correspond to the defined parameters. The map provided is guaranteed to have a value for each parameter defined as non-optional, and those values will be of the type defined in the parameter. The map will also contain values for the input source: the format should ignore values that don't correspond to parameters it defined.- Parameters:
args- the actual arguments for the defined parameterscolumns- the columns provided in SQL, typically via the `EXTEND` clause, but perhaps from an the table spec, if the function is for a partial tablejsonMapper- the mapper to use to perform conversions- Returns:
- an input format as defined by the arguments
-
-