AWS.EntityResolution reference
BatchDeleteUniqueId
Section titled “BatchDeleteUniqueId”Source:
packages/aws/src/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:
packages/aws/src/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:
packages/aws/src/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:
packages/aws/src/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:
packages/aws/src/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:
packages/aws/src/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.run/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,});IdMappingWorkflow: Looking up an existing id mapping workflow
Section titled “IdMappingWorkflow: Looking up an existing id mapping workflow”IdMappingWorkflow.lookup references an id mapping workflow Alchemy doesn’t manage (created in the
console or by another stack), found by workflowName. It is read during
plan/deploy and never created, updated or deleted.
const existing = AWS.EntityResolution.IdMappingWorkflow.lookup({ workflowName: "my-id-mapping-workflow" });IdNamespace
Section titled “IdNamespace”Source:
packages/aws/src/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.run/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,});IdNamespace: Looking up an existing id namespace
Section titled “IdNamespace: Looking up an existing id namespace”IdNamespace.lookup references an id namespace Alchemy doesn’t manage (created in the
console or by another stack), found by idNamespaceName. It is read during
plan/deploy and never created, updated or deleted.
const existing = AWS.EntityResolution.IdNamespace.lookup({ idNamespaceName: "my-id-namespace" });ListIdMappingJobs
Section titled “ListIdMappingJobs”Source:
packages/aws/src/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:
packages/aws/src/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:
packages/aws/src/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.run/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,});MatchingWorkflow: Looking up an existing matching workflow
Section titled “MatchingWorkflow: Looking up an existing matching workflow”MatchingWorkflow.lookup references a matching workflow Alchemy doesn’t manage (created in the
console or by another stack), found by workflowName. It is read during
plan/deploy and never created, updated or deleted.
const existing = AWS.EntityResolution.MatchingWorkflow.lookup({ workflowName: "my-matching-workflow" });SchemaMapping
Section titled “SchemaMapping”Source:
packages/aws/src/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.run/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 }, ], // ...});SchemaMapping: Looking up an existing schema mapping
Section titled “SchemaMapping: Looking up an existing schema mapping”SchemaMapping.lookup references a schema mapping Alchemy doesn’t manage (created in the
console or by another stack), found by schemaName. It is read during
plan/deploy and never created, updated or deleted.
const existing = AWS.EntityResolution.SchemaMapping.lookup({ schemaName: "my-schema-mapping" });StartIdMappingJob
Section titled “StartIdMappingJob”Source:
packages/aws/src/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:
packages/aws/src/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({});