(self, data)
return data
Process with fields skip and map
Process with fields skip and map
Process with fields skip and map
def filter_data(self, data):
        """Process with fields skip and map"""
        fskip = self.conf.skip_fields
        fmap = self.conf.field_map
        if fskip:
            data = dict((k, v) for k, v in data.items()
                    if k not in fskip)
        if fmap:
            # when field name not present in source is used then  None (NULL)
            # value is inserted. is it ok?
            data = dict( (v, data.get(k)) for k, v in fmap.items())
        return data
def filter_data ( self , data ) : fskip = self . conf . skip_fields fmap = self . conf . field_map if fskip : data = dict ( ( k , v ) for k , v in data . items ( ) if k not in fskip ) if fmap : # when field name not present in source is used then  None (NULL) # value is inserted. is it ok? data = dict ( ( v , data . get ( k ) ) for k , v in fmap . items ( ) ) return data