Skip to content

AWS.EntityResolution reference

Source: src/AWS/EntityResolution/BatchDeleteUniqueId.ts

Runtime binding for entityresolution:BatchDeleteUniqueId.

Deletes unique IDs (and their match associations) from the bound matching workflow’s internal match store. Provide the implementation with Effect.provide(AWS.EntityResolution.BatchDeleteUniqueIdHttp).

// init — bind the operation to the workflow
const batchDeleteUniqueId = yield* AWS.EntityResolution.BatchDeleteUniqueId(workflow);
// runtime
const { deleted, errors } = yield* batchDeleteUniqueId({
uniqueIds: ["1", "2"],
});

Source: src/AWS/EntityResolution/GenerateMatchId.ts

Runtime binding for entityresolution:GenerateMatchId.

Generates or retrieves Match IDs for records submitted in real time against the bound rule-based matching workflow: existing records return their Match IDs, unmatched records get new ones. Provide the implementation with Effect.provide(AWS.EntityResolution.GenerateMatchIdHttp).

// init — bind the operation to the workflow
const generateMatchId = yield* AWS.EntityResolution.GenerateMatchId(workflow);
// runtime
const { matchGroups } = yield* generateMatchId({
records: [
{
inputSourceARN: table.tableArn,
uniqueId: "1",
recordAttributeMap: { id: "1", email: "jane@example.com" },
},
],
});

Source: src/AWS/EntityResolution/GetIdMappingJob.ts

Runtime binding for entityresolution:GetIdMappingJob.

Reads the status, metrics, and errors of an ID mapping job run of the bound workflow. Provide the implementation with Effect.provide(AWS.EntityResolution.GetIdMappingJobHttp).

// init — bind the operation to the workflow
const getIdMappingJob = yield* AWS.EntityResolution.GetIdMappingJob(workflow);
// runtime
const job = yield* getIdMappingJob({ jobId });
console.log(job.status, job.metrics?.totalMappedRecords);

Source: src/AWS/EntityResolution/GetMatchId.ts

Runtime binding for entityresolution:GetMatchId.

Returns the Match ID of a customer record if it has already been processed by the bound rule-based matching workflow — a read-only dry run of an incremental load. Provide the implementation with Effect.provide(AWS.EntityResolution.GetMatchIdHttp).

// init — bind the operation to the workflow
const getMatchId = yield* AWS.EntityResolution.GetMatchId(workflow);
// runtime
const { matchId, matchRule } = yield* getMatchId({
record: { id: "1", email: "jane@example.com" },
});

Source: src/AWS/EntityResolution/GetMatchingJob.ts

Runtime binding for entityresolution:GetMatchingJob.

Reads the status, metrics, and errors of a matching job run of the bound workflow. Provide the implementation with Effect.provide(AWS.EntityResolution.GetMatchingJobHttp).

// init — bind the operation to the workflow
const getMatchingJob = yield* AWS.EntityResolution.GetMatchingJob(workflow);
// runtime
const job = yield* getMatchingJob({ jobId });
console.log(job.status, job.metrics?.matchIDs);

Source: src/AWS/EntityResolution/IdMappingWorkflow.ts

An AWS Entity Resolution ID mapping workflow — a data-processing job definition that translates record identifiers between a SOURCE and a TARGET ID namespace, using rule-based matching or a provider service.

The workflow definition itself is cheap and instant; a mapping RUN (StartIdMappingJob) processes the full input and takes many minutes.

IdMappingWorkflow: Creating ID Mapping Workflows

Section titled “IdMappingWorkflow: Creating ID Mapping Workflows”
import * as AWS from "alchemy/AWS";
const workflow = yield* AWS.EntityResolution.IdMappingWorkflow("Map", {
inputSourceConfig: [
{ inputSourceARN: source.idNamespaceArn, type: "SOURCE" },
{ inputSourceARN: target.idNamespaceArn, type: "TARGET" },
],
idMappingTechniques: {
idMappingType: "RULE_BASED",
ruleBasedProperties: {
ruleDefinitionType: "TARGET",
attributeMatchingModel: "ONE_TO_ONE",
recordMatchingModel: "ONE_SOURCE_TO_ONE_TARGET",
},
},
outputSourceConfig: [
{ outputS3Path: `s3://${bucket.bucketName}/idmapping/` },
],
roleArn: role.roleArn,
});

Source: src/AWS/EntityResolution/IdNamespace.ts

An AWS Entity Resolution ID namespace — a wrapper around an input dataset used by ID mapping workflows. A SOURCE namespace holds the records to be translated; a TARGET namespace holds the dataset (and the rule-based matching configuration) they are mapped onto.

Source namespace over a Glue table

import * as AWS from "alchemy/AWS";
const source = yield* AWS.EntityResolution.IdNamespace("Source", {
type: "SOURCE",
inputSourceConfig: [
{ inputSourceARN: table.tableArn, schemaName: schema.schemaName },
],
idMappingWorkflowProperties: [{ idMappingType: "RULE_BASED" }],
roleArn: role.roleArn,
});

Target namespace with matching rules

const target = yield* AWS.EntityResolution.IdNamespace("Target", {
type: "TARGET",
inputSourceConfig: [
{ inputSourceARN: table.tableArn, schemaName: schema.schemaName },
],
idMappingWorkflowProperties: [
{
idMappingType: "RULE_BASED",
ruleBasedProperties: {
rules: [{ ruleName: "ByEmail", matchingKeys: ["email"] }],
ruleDefinitionTypes: ["TARGET"],
attributeMatchingModel: "ONE_TO_ONE",
recordMatchingModels: ["ONE_SOURCE_TO_ONE_TARGET"],
},
},
],
roleArn: role.roleArn,
});

Source: src/AWS/EntityResolution/ListIdMappingJobs.ts

Runtime binding for entityresolution:ListIdMappingJobs.

Lists the ID mapping job runs of the bound workflow. Provide the implementation with Effect.provide(AWS.EntityResolution.ListIdMappingJobsHttp).

ListIdMappingJobs: Running ID Mapping Jobs

Section titled “ListIdMappingJobs: Running ID Mapping Jobs”
// init — bind the operation to the workflow
const listIdMappingJobs = yield* AWS.EntityResolution.ListIdMappingJobs(workflow);
// runtime
const { jobs } = yield* listIdMappingJobs({});

Source: src/AWS/EntityResolution/ListMatchingJobs.ts

Runtime binding for entityresolution:ListMatchingJobs.

Lists the matching job runs of the bound workflow. Provide the implementation with Effect.provide(AWS.EntityResolution.ListMatchingJobsHttp).

// init — bind the operation to the workflow
const listMatchingJobs = yield* AWS.EntityResolution.ListMatchingJobs(workflow);
// runtime
const { jobs } = yield* listMatchingJobs({});

Source: src/AWS/EntityResolution/MatchingWorkflow.ts

An AWS Entity Resolution matching workflow — a data-processing job definition that matches and deduplicates records across Glue table input sources using rule-based or ML-powered matching, writing matched record groups to S3.

The workflow definition itself is cheap and instant; a matching RUN (StartMatchingJob) processes the full input and takes many minutes.

Rule-based matching over a Glue table

import * as AWS from "alchemy/AWS";
const workflow = yield* AWS.EntityResolution.MatchingWorkflow("Dedupe", {
inputSourceConfig: [
{ inputSourceARN: table.tableArn, schemaName: schema.schemaName },
],
outputSourceConfig: [
{
outputS3Path: `s3://${bucket.bucketName}/matches/`,
output: [{ name: "id" }, { name: "email" }],
},
],
resolutionTechniques: {
resolutionType: "RULE_MATCHING",
ruleBasedProperties: {
rules: [{ ruleName: "ByEmail", matchingKeys: ["email"] }],
attributeMatchingModel: "ONE_TO_ONE",
},
},
roleArn: role.roleArn,
});

ML-powered matching

const workflow = yield* AWS.EntityResolution.MatchingWorkflow("MlDedupe", {
inputSourceConfig: [
{ inputSourceARN: table.tableArn, schemaName: schema.schemaName },
],
outputSourceConfig: [
{
outputS3Path: `s3://${bucket.bucketName}/ml-matches/`,
output: [{ name: "id" }],
},
],
resolutionTechniques: { resolutionType: "ML_MATCHING" },
roleArn: role.roleArn,
});

Source: src/AWS/EntityResolution/SchemaMapping.ts

An AWS Entity Resolution schema mapping — the schema of an input customer records table. It tells Entity Resolution the attribute type of each column (name, email, phone, unique id, …) and which columns rule-based matching compares via matchKey.

import * as AWS from "alchemy/AWS";
const schema = yield* AWS.EntityResolution.SchemaMapping("Customers", {
mappedInputFields: [
{ fieldName: "id", type: "UNIQUE_ID" },
{ fieldName: "email", type: "EMAIL_ADDRESS", matchKey: "email" },
{ fieldName: "name", type: "NAME", matchKey: "name" },
],
});
const workflow = yield* AWS.EntityResolution.MatchingWorkflow("Dedupe", {
inputSourceConfig: [
{ inputSourceARN: table.tableArn, schemaName: schema.schemaName },
],
// ...
});

Source: src/AWS/EntityResolution/StartIdMappingJob.ts

Runtime binding for entityresolution:StartIdMappingJob.

Starts an ID mapping job run of the bound workflow — a batch process over the workflow’s full input that takes many minutes. Provide the implementation with Effect.provide(AWS.EntityResolution.StartIdMappingJobHttp).

StartIdMappingJob: Running ID Mapping Jobs

Section titled “StartIdMappingJob: Running ID Mapping Jobs”
// init — bind the operation to the workflow
const startIdMappingJob = yield* AWS.EntityResolution.StartIdMappingJob(workflow);
// runtime
const { jobId } = yield* startIdMappingJob({});

Source: src/AWS/EntityResolution/StartMatchingJob.ts

Runtime binding for entityresolution:StartMatchingJob.

Starts a matching job run of the bound workflow — a batch process over the workflow’s full input that takes many minutes. Provide the implementation with Effect.provide(AWS.EntityResolution.StartMatchingJobHttp).

// init — bind the operation to the workflow
const startMatchingJob = yield* AWS.EntityResolution.StartMatchingJob(workflow);
// runtime
const { jobId } = yield* startMatchingJob({});