aggregation_modules/stream_parser.py
def populate_fields(self, stream_buffer, all_ds_fields):
        """
        sets self.__chosen_fields containing the dataset ids
        and name for the particular stream
        """
        try:
            self.stream_activation_status = stream_buffer.get(
                "activationStatus")
            if "config" in stream_buffer:
                self.stream_format = stream_buffer["config"].get("format")
                self.delimiter = stream_buffer["config"].get("delimiter")
        except Exception as err:
            logger.error(
                "%s: Stream activationStatus or config format/delimiter not set: %s",
                type(err),
                err,
            )

        chosen_ids = self.get_datasetids(stream_buffer.get("datasets", []))

        self.__chosen_fields.append(Fields(None, "version", "bigint"))
        for field_id in chosen_ids:
            try:
                self.__chosen_fields.append(
                    Fields(
                        field_id,
                        all_ds_fields[field_id]["name"].lower(),
                        all_ds_fields[field_id]["dtype"]
                    )
                )

            except Exception as err:
                logger.warn(
                    "%s: key %s not found in all_fields_map ", err, field_id)

        logger.debug("stream fields... \n%s", self.get_stream_field_names())

        sets self.__chosen_fields containing the dataset ids
        and name for the particular stream
        
sets self.__chosen_fields containing the dataset ids
and name for the particular stream
sets self . __chosen_fields containing the dataset ids and name for the particular stream
def populate_fields(self, stream_buffer, all_ds_fields):
        try:
            self.stream_activation_status = stream_buffer.get(
                "activationStatus")
            if "config" in stream_buffer:
                self.stream_format = stream_buffer["config"].get("format")
                self.delimiter = stream_buffer["config"].get("delimiter")
        except Exception as err:
            logger.error(
                "%s: Stream activationStatus or config format/delimiter not set: %s",
                type(err),
                err,
            )
        chosen_ids = self.get_datasetids(stream_buffer.get("datasets", []))
        self.__chosen_fields.append(Fields(None, "version", "bigint"))
        for field_id in chosen_ids:
            try:
                self.__chosen_fields.append(
                    Fields(
                        field_id,
                        all_ds_fields[field_id]["name"].lower(),
                        all_ds_fields[field_id]["dtype"]
                    )
                )
            except Exception as err:
                logger.warn(
                    "%s: key %s not found in all_fields_map ", err, field_id)
        logger.debug("stream fields... \n%s", self.get_stream_field_names())
def populate_fields ( self , stream_buffer , all_ds_fields ) : try : self . stream_activation_status = stream_buffer . get ( "activationStatus" ) if "config" in stream_buffer : self . stream_format = stream_buffer [ "config" ] . get ( "format" ) self . delimiter = stream_buffer [ "config" ] . get ( "delimiter" ) except Exception as err : logger . error ( "%s: Stream activationStatus or config format/delimiter not set: %s" , type ( err ) , err , ) chosen_ids = self . get_datasetids ( stream_buffer . get ( "datasets" , [ ] ) ) self . __chosen_fields . append ( Fields ( None , "version" , "bigint" ) ) for field_id in chosen_ids : try : self . __chosen_fields . append ( Fields ( field_id , all_ds_fields [ field_id ] [ "name" ] . lower ( ) , all_ds_fields [ field_id ] [ "dtype" ] ) ) except Exception as err : logger . warn ( "%s: key %s not found in all_fields_map " , err , field_id ) logger . debug ( "stream fields... \n%s" , self . get_stream_field_names ( ) )
sets self.__chosen_fields containing the dataset ids
and name for the particular stream
sets self . __chosen_fields containing the dataset ids and name for the particular stream
"""
        sets self.__chosen_fields containing the dataset ids
        and name for the particular stream
        """
self
stream_buffer
all_ds_fields