EntityResolution / Client / generate_match_id

generate_match_id

EntityResolution.Client.generate_match_id(**kwargs)

Generates or retrieves Match IDs for records using a rule-based matching workflow. When you call this operation, it processes your records against the workflow’s matching rules to identify potential matches. For existing records, it retrieves their Match IDs and associated rules. For records without matches, it generates new Match IDs. The operation saves results to Amazon S3.

The processing type ( processingType) you choose affects both the accuracy and response time of the operation. Additional charges apply for each API call, whether made through the Entity Resolution console or directly via the API. The rule-based matching workflow must exist and be active before calling this operation.

See also: AWS API Documentation

Request Syntax

response = client.generate_match_id(
    workflowName='string',
    records=[
        {
            'inputSourceARN': 'string',
            'uniqueId': 'string',
            'recordAttributeMap': {
                'string': 'string'
            }
        },
    ],
    processingType='CONSISTENT'|'EVENTUAL'|'EVENTUAL_NO_LOOKUP'
)
Parameters:
  • workflowName (string) –

    [REQUIRED]

    The name of the rule-based matching workflow.

  • records (list) –

    [REQUIRED]

    The records to match.

    • (dict) –

      The record.

      • inputSourceARN (string) – [REQUIRED]

        The input source ARN of the record.

      • uniqueId (string) – [REQUIRED]

        The unique ID of the record.

      • recordAttributeMap (dict) – [REQUIRED]

        The record’s attribute map.

        • (string) –

          • (string) –

  • processingType (string) –

    The processing mode that determines how Match IDs are generated and results are saved. Each mode provides different levels of accuracy, response time, and completeness of results.

    If not specified, defaults to CONSISTENT.

    CONSISTENT: Performs immediate lookup and matching against all existing records, with results saved synchronously. Provides highest accuracy but slower response time.

    EVENTUAL (shown as Background in the console): Performs initial match ID lookup or generation immediately, with record updates processed asynchronously in the background. Offers faster initial response time, with complete matching results available later in S3.

    EVENTUAL_NO_LOOKUP (shown as Quick ID generation in the console): Generates new match IDs without checking existing matches, with updates processed asynchronously. Provides fastest response time but should only be used for records known to be unique.

Return type:

dict

Returns:

Response Syntax

{
    'matchGroups': [
        {
            'records': [
                {
                    'inputSourceARN': 'string',
                    'recordId': 'string'
                },
            ],
            'matchId': 'string',
            'matchRule': 'string'
        },
    ],
    'failedRecords': [
        {
            'inputSourceARN': 'string',
            'uniqueId': 'string',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • matchGroups (list) –

      The match groups from the generated match ID.

      • (dict) –

        The match group.

        • records (list) –

          The matched records.

          • (dict) –

            The matched record.

            • inputSourceARN (string) –

              The input source ARN of the matched record.

            • recordId (string) –

              The record ID of the matched record.

        • matchId (string) –

          The match ID.

        • matchRule (string) –

          The match rule of the match group.

    • failedRecords (list) –

      The records that didn’t receive a generated Match ID.

      • (dict) –

        The record that didn’t generate a Match ID.

        • inputSourceARN (string) –

          The input source ARN of the record that didn’t generate a Match ID.

        • uniqueId (string) –

          The unique ID of the record that didn’t generate a Match ID.

        • errorMessage (string) –

          The error message for the record that didn’t generate a Match ID.

Exceptions