AWS.EntityResolution reference
BatchDeleteUniqueId
Section titled “BatchDeleteUniqueId”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).
BatchDeleteUniqueId: Real-Time Matching
Section titled “BatchDeleteUniqueId: Real-Time Matching”// init — bind the operation to the workflowconst batchDeleteUniqueId = yield* AWS.EntityResolution.BatchDeleteUniqueId(workflow);
// runtimeconst { deleted, errors } = yield* batchDeleteUniqueId({ uniqueIds: ["1", "2"],});GenerateMatchId
Section titled “GenerateMatchId”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).
GenerateMatchId: Real-Time Matching
Section titled “GenerateMatchId: Real-Time Matching”// init — bind the operation to the workflowconst generateMatchId = yield* AWS.EntityResolution.GenerateMatchId(workflow);
// runtimeconst { matchGroups } = yield* generateMatchId({ records: [ { inputSourceARN: table.tableArn, uniqueId: "1", recordAttributeMap: { id: "1", email: "jane@example.com" }, }, ],});GetIdMappingJob
Section titled “GetIdMappingJob”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).
GetIdMappingJob: Running ID Mapping Jobs
Section titled “GetIdMappingJob: Running ID Mapping Jobs”// init — bind the operation to the workflowconst getIdMappingJob = yield* AWS.EntityResolution.GetIdMappingJob(workflow);
// runtimeconst job = yield* getIdMappingJob({ jobId });console.log(job.status, job.metrics?.totalMappedRecords);GetMatchId
Section titled “GetMatchId”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).
GetMatchId: Real-Time Matching
Section titled “GetMatchId: Real-Time Matching”// init — bind the operation to the workflowconst getMatchId = yield* AWS.EntityResolution.GetMatchId(workflow);
// runtimeconst { matchId, matchRule } = yield* getMatchId({ record: { id: "1", email: "jane@example.com" },});GetMatchingJob
Section titled “GetMatchingJob”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).
GetMatchingJob: Running Matching Jobs
Section titled “GetMatchingJob: Running Matching Jobs”// init — bind the operation to the workflowconst getMatchingJob = yield* AWS.EntityResolution.GetMatchingJob(workflow);
// runtimeconst job = yield* getMatchingJob({ jobId });console.log(job.status, job.metrics?.matchIDs);IdMappingWorkflow
Section titled “IdMappingWorkflow”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,});IdNamespace
Section titled “IdNamespace”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.
IdNamespace: Creating ID Namespaces
Section titled “IdNamespace: Creating ID Namespaces”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,});ListIdMappingJobs
Section titled “ListIdMappingJobs”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 workflowconst listIdMappingJobs = yield* AWS.EntityResolution.ListIdMappingJobs(workflow);
// runtimeconst { jobs } = yield* listIdMappingJobs({});ListMatchingJobs
Section titled “ListMatchingJobs”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).
ListMatchingJobs: Running Matching Jobs
Section titled “ListMatchingJobs: Running Matching Jobs”// init — bind the operation to the workflowconst listMatchingJobs = yield* AWS.EntityResolution.ListMatchingJobs(workflow);
// runtimeconst { jobs } = yield* listMatchingJobs({});MatchingWorkflow
Section titled “MatchingWorkflow”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.
MatchingWorkflow: Creating Workflows
Section titled “MatchingWorkflow: Creating Workflows”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,});SchemaMapping
Section titled “SchemaMapping”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.
SchemaMapping: Creating Schema Mappings
Section titled “SchemaMapping: Creating Schema Mappings”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" }, ],});SchemaMapping: Matching Workflows
Section titled “SchemaMapping: Matching Workflows”const workflow = yield* AWS.EntityResolution.MatchingWorkflow("Dedupe", { inputSourceConfig: [ { inputSourceARN: table.tableArn, schemaName: schema.schemaName }, ], // ...});StartIdMappingJob
Section titled “StartIdMappingJob”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 workflowconst startIdMappingJob = yield* AWS.EntityResolution.StartIdMappingJob(workflow);
// runtimeconst { jobId } = yield* startIdMappingJob({});StartMatchingJob
Section titled “StartMatchingJob”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).
StartMatchingJob: Running Matching Jobs
Section titled “StartMatchingJob: Running Matching Jobs”// init — bind the operation to the workflowconst startMatchingJob = yield* AWS.EntityResolution.StartMatchingJob(workflow);
// runtimeconst { jobId } = yield* startMatchingJob({});