Skip to main content

schema_mappings

Creates, updates, deletes, gets or lists a schema_mappings resource.

Overview​

Nameschema_mappings
TypeResource
Idaws.entityresolution.schema_mappings

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The timestamp of when the SchemaMapping was created.
descriptionstringA description of the schema.
has_workflowsbooleanSpecifies whether the schema mapping has been applied to a workflow.
mapped_input_fieldsarrayA list of MappedInputFields. Each MappedInputField corresponds to a column the source data table, and contains column name plus additional information Entity Resolution uses for matching.
schema_arnstringThe ARN (Amazon Resource Name) that Entity Resolution generated for the SchemaMapping. (pattern: <code>arn:(aws|aws-us-gov|aws-cn):entityresolution:[a-z]{2}-[a-z]{1,10}-[0-9]:[0-9]{12}:(schemamapping/[a-zA-Z_0-9-]{1,255})</code>)
schema_namestringThe name of the schema. (pattern: <code>[a-zA-Z_0-9-]*</code>)
tagsobjectThe tags used to organize, track, or control access for this resource.
updated_atstring (date-time)The timestamp of when the SchemaMapping was last updated.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_schema_mappingselectschema_name, regionReturns the SchemaMapping of a given name.
list_schema_mappingsselectregionnextToken, maxResultsReturns a list of all the SchemaMappings that have been created for an Amazon Web Services account.
create_schema_mappinginsertregion, schemaName, mappedInputFieldsCreates a schema mapping, which defines the schema of the input customer records table. The SchemaMapping also provides Entity Resolution with some metadata about the table, such as the attribute types of the columns and which columns to match on.
update_schema_mappingupdateschema_name, region, mappedInputFieldsUpdates a schema mapping. A schema is immutable if it is being used by a workflow. Therefore, you can't update a schema mapping if it's associated with a workflow.
delete_schema_mappingdeleteschema_name, regionDeletes the SchemaMapping with a given name. This operation returns a ResourceNotFoundException if a schema with the given name does not exist. This operation will fail if there is a MatchingWorkflow object that references the SchemaMapping in the workflow's InputSourceConfig.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
schema_namestringThe name of the schema to delete.
maxResultsintegerThe maximum number of objects returned per page.
nextTokenstringThe pagination token from the previous API call.

SELECT examples​

Returns the SchemaMapping of a given name.

SELECT
created_at,
description,
has_workflows,
mapped_input_fields,
schema_arn,
schema_name,
tags,
updated_at
FROM aws.entityresolution.schema_mappings
WHERE schema_name = '{{ schema_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

Creates a schema mapping, which defines the schema of the input customer records table. The SchemaMapping also provides Entity Resolution with some metadata about the table, such as the attribute types of the columns and which columns to match on.

INSERT INTO aws.entityresolution.schema_mappings (
schemaName,
description,
mappedInputFields,
tags,
region
)
SELECT
'{{ schemaName }}' /* required */,
'{{ description }}',
'{{ mappedInputFields }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
description,
mapped_input_fields,
schema_arn,
schema_name
;

UPDATE examples​

Updates a schema mapping. A schema is immutable if it is being used by a workflow. Therefore, you can't update a schema mapping if it's associated with a workflow.

UPDATE aws.entityresolution.schema_mappings
SET
description = '{{ description }}',
mappedInputFields = '{{ mappedInputFields }}'
WHERE
schema_name = '{{ schema_name }}' --required
AND region = '{{ region }}' --required
AND mappedInputFields = '{{ mappedInputFields }}' --required
RETURNING
description,
mapped_input_fields,
schema_arn,
schema_name;

DELETE examples​

Deletes the SchemaMapping with a given name. This operation returns a ResourceNotFoundException if a schema with the given name does not exist. This operation will fail if there is a MatchingWorkflow object that references the SchemaMapping in the workflow's InputSourceConfig.

DELETE FROM aws.entityresolution.schema_mappings
WHERE schema_name = '{{ schema_name }}' --required
AND region = '{{ region }}' --required
;