Package s3 :: Module s3import :: Class S3Duplicate
[frames] | no frames]

Class S3Duplicate

source code

object --+
         |
        S3Duplicate

Standard deduplicator method

Instance Methods
 
__init__(self, primary=None, secondary=None, ignore_case=True, ignore_deleted=False)
Constructor
source code
 
__call__(self, item)
Entry point for importer
source code
 
match(self, field, value)
Helper function to generate a match-query
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, primary=None, secondary=None, ignore_case=True, ignore_deleted=False)
(Constructor)

source code 

Constructor

Parameters:
  • primary - list or tuple of primary fields to find a match, must always match (mandatory, defaults to "name" field)
  • secondary - list or tuple of secondary fields to find a match, must match if values are present in the import item
  • ignore_case - ignore case for string/text fields
  • ignore_deleted - do not match deleted records
Overrides: object.__init__

To Do: Fuzzy option to do a LIKE search

__call__(self, item)
(Call operator)

source code 

Entry point for importer

Parameters:
  • item - the import item
Returns:
the duplicate Row if match found, otherwise None
Raises:
  • SyntaxError - if any of the query fields doesn't exist in the item table

match(self, field, value)

source code 

Helper function to generate a match-query

Parameters:
  • field - the Field
  • value - the value
Returns:
a Query