def get(self, query: Mapping[str, Any], context: PipelineContext = None) -> T:
        """Gets a query from the data source.

        1) Extracts the query from the data source.
        2) Inserts the result into any data sinks.
        3) Transforms the result into the requested type if it wasn't already.
        4) Inserts the transformed result into any data sinks.

        Args:
            query: The query being requested.
            context: The context for the extraction (mutable).

        Returns:
            The requested object.
        """
        result = self._source.get(self._source_type, deepcopy(query), context)
        LOGGER.info("Got result \"{result}\" from query \"{query}\" of source \"{source}\"".format(result=result, query=query, source=self._source))

        LOGGER.info("Sending result \"{result}\" to sinks before converting".format(result=result))
        for sink in self._before_transform:
            sink.put(result, context)

        LOGGER.info("Converting result \"{result}\" to request type".format(result=result))
        result = self._transform(data=result, context=context)

        LOGGER.info("Sending result \"{result}\" to sinks after converting".format(result=result))
        for sink in self._after_transform:
            sink.put(result, context)

        return result
def get ( self , query : Mapping [ str , Any ] , context : PipelineContext = None ) -> T : result = self . _source . get ( self . _source_type , deepcopy ( query ) , context ) LOGGER . info ( "Got result \"{result}\" from query \"{query}\" of source \"{source}\"" . format ( result = result , query = query , source = self . _source ) ) LOGGER . info ( "Sending result \"{result}\" to sinks before converting" . format ( result = result ) ) for sink in self . _before_transform : sink . put ( result , context ) LOGGER . info ( "Converting result \"{result}\" to request type" . format ( result = result ) ) result = self . _transform ( data = result , context = context ) LOGGER . info ( "Sending result \"{result}\" to sinks after converting" . format ( result = result ) ) for sink in self . _after_transform : sink . put ( result , context ) return result
Gets a query from the data source.

        1) Extracts the query from the data source.
        2) Inserts the result into any data sinks.
        3) Transforms the result into the requested type if it wasn't already.
        4) Inserts the transformed result into any data sinks.

        Args:
            query: The query being requested.
            context: The context for the extraction (mutable).

        Returns:
            The requested object.