Class InputFormats.BaseFormatDefn

    • Method Detail

      • parameters

        public List<TableFunction.ParameterDefn> parameters()
        Description copied from interface: InputFormatDefn
        Obtain the parameters used to fully define an input format in a SQL function that defines an external table from scratch. Note that the final list of table function arguments combines parameters from all the various input sources. It is legal for multiple formats to define the same parameter, as long as both definitions are of the same type.
        Specified by:
        parameters in interface InputFormatDefn
        Returns:
      • inputFormatClass

        protected abstract Class<? extends org.apache.druid.data.input.InputFormat> inputFormatClass()
        The target input format class for Jackson conversions.
      • validate

        public void validate​(ResolvedExternalTable table)
        Description copied from interface: InputFormatDefn
        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. The final format information is validated elsewhere.
        Specified by:
        validate in interface InputFormatDefn
      • convertColumns

        protected void convertColumns​(Map<String,​Object> jsonMap,
                                      List<ColumnSpec> columns)
        Convert columns from the ColumnSpec format used by the catalog to the list of names form requires by input formats.
      • convert

        public org.apache.druid.data.input.InputFormat convert​(Map<String,​Object> jsonMap,
                                                               com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
        Convert a generic Java map of input format properties to an input format object.
      • convertFromTable

        public org.apache.druid.data.input.InputFormat convertFromTable​(ResolvedExternalTable table)
        Description copied from interface: InputFormatDefn
        Create an input format from a resolved catalog table spec. The format is given by the Java map within the given object.
        Specified by:
        convertFromTable in interface InputFormatDefn
        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