inference_schema/parameter_types/spark_parameter_type.py
def input_to_swagger(self):
        """
        Generates a swagger schema for the provided sample spark array

        :return: The swagger schema object.
        :rtype: dict
        """
        # First get the schema for the structured type making up a dataframe row
        data_type_swagger = SparkParameterType._convert_spark_schema_to_swagger(self.sample_input.schema)

        # Final schema is an array of such types
        swagger = {'type': 'array', 'items': data_type_swagger}

        items_to_sample = self.sample_input.collect()
        items_count = len(items_to_sample)
        df_record_swagger = swagger['items']
        swagger['example'] = SparkParameterType._get_swagger_sample(items_to_sample, items_count, df_record_swagger)
        return swagger

        Generates a swagger schema for the provided sample spark array

        :return: The swagger schema object.
        :rtype: dict
        
Generates a swagger schema for the provided sample spark array
Generates a swagger schema for the provided sample spark array
def input_to_swagger(self):
        data_type_swagger = SparkParameterType._convert_spark_schema_to_swagger(self.sample_input.schema)
        swagger = {'type': 'array', 'items': data_type_swagger}
        items_to_sample = self.sample_input.collect()
        items_count = len(items_to_sample)
        df_record_swagger = swagger['items']
        swagger['example'] = SparkParameterType._get_swagger_sample(items_to_sample, items_count, df_record_swagger)
        return swagger
def input_to_swagger ( self ) : data_type_swagger = SparkParameterType . _convert_spark_schema_to_swagger ( self . sample_input . schema ) swagger = { 'type' : 'array' , 'items' : data_type_swagger } items_to_sample = self . sample_input . collect ( ) items_count = len ( items_to_sample ) df_record_swagger = swagger [ 'items' ] swagger [ 'example' ] = SparkParameterType . _get_swagger_sample ( items_to_sample , items_count , df_record_swagger ) return swagger
Generates a swagger schema for the provided sample spark array
Generates a swagger schema for the provided sample spark array
"""
        Generates a swagger schema for the provided sample spark array

        :return: The swagger schema object.
        :rtype: dict
        """ # First get the schema for the structured type making up a dataframe row # Final schema is an array of such types
The swagger schema object.
The swagger schema object .
dict
self