Skip to content

create_schema_mapping async

create_schema_mapping(
    schema_name: EntityName,
    mapped_input_fields: SchemaInputAttributes,
    *,
    config_overrides: Optional[AsyncEntityResolutionClientConfig] = None,
    description: Optional[Description] = None,
    tags: Optional[TagMap] = None,
) -> CreateSchemaMappingOutput

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.

Parameters:

  • schema_name (EntityName) –

    The name of the schema. There can't be multiple SchemaMappings with the same name.

  • description (Optional[Description], default: None ) –

    A description of the schema.

  • mapped_input_fields (SchemaInputAttributes) –

    A list of MappedInputFields. Each MappedInputField corresponds to a column the source data table, and contains column name plus additional information that Entity Resolution uses for matching.

  • tags (Optional[TagMap], default: None ) –

    The tags used to organize, track, or control access for this resource.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • ConflictException –

    The request couldn't be processed because of conflict in the current state of the resource. Example: Workflow already exists, Schema already exists, Workflow is currently running, etc.

  • ExceedsLimitException –

    The request was rejected because it attempted to create resources beyond the current Entity Resolution account limits. The error message describes the limit exceeded.

  • InternalServerException –

    This exception occurs when there is an internal failure in the Entity Resolution service.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The input fails to satisfy the constraints specified by Entity Resolution.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_entityresolution/_services/async_entity_resolution.py
async def create_schema_mapping(
    self,
    schema_name: "capo_entityresolution.types.entity_name.EntityName",
    mapped_input_fields: "capo_entityresolution.types.schema_input_attributes.SchemaInputAttributes",
    *,
    config_overrides: Optional[AsyncEntityResolutionClientConfig] = None,
    description: Optional[
        "capo_entityresolution.types.description.Description"
    ] = None,
    tags: Optional["capo_entityresolution.types.tag_map.TagMap"] = None,
) -> "capo_entityresolution.types.create_schema_mapping_output.CreateSchemaMappingOutput":
    """<p>Creates a schema mapping, which defines the schema of the input customer records table. The <code>SchemaMapping</code> also provides Entity Resolution with some metadata about the table, such as the attribute types of the columns and which columns to match on.</p>

    Args:
        schema_name: <p>The name of the schema. There can't be multiple <code>SchemaMappings</code> with the same name.</p>
        description: <p>A description of the schema.</p>
        mapped_input_fields: <p>A list of <code>MappedInputFields</code>. Each <code>MappedInputField</code> corresponds to a column the source data table, and contains column name plus additional information that Entity Resolution uses for matching.</p>
        tags: <p>The tags used to organize, track, or control access for this resource.</p>

    Raises:
        capo_entityresolution.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. </p>
        capo_entityresolution.errors.conflict_exception.ConflictException: <p>The request couldn't be processed because of conflict in the current state of the resource. Example: Workflow already exists, Schema already exists, Workflow is currently running, etc. </p>
        capo_entityresolution.errors.exceeds_limit_exception.ExceedsLimitException: <p>The request was rejected because it attempted to create resources beyond the current Entity Resolution account limits. The error message describes the limit exceeded. </p>
        capo_entityresolution.errors.internal_server_exception.InternalServerException: <p>This exception occurs when there is an internal failure in the Entity Resolution service. </p>
        capo_entityresolution.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. </p>
        capo_entityresolution.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by Entity Resolution. </p>
        capo_entityresolution.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_entityresolution.types.create_schema_mapping_input.CreateSchemaMappingInput]",
    ) -> AsyncOperationResponse[
        "capo_entityresolution.types.create_schema_mapping_output.CreateSchemaMappingOutput"
    ]:
        import capo_entityresolution._operations.aws_venice_service.create_schema_mapping

        (
            output,
            http_response,
        ) = await capo_entityresolution._operations.aws_venice_service.create_schema_mapping.async_create_schema_mapping(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateSchemaMapping")
    )
    input_: capo_entityresolution.types.create_schema_mapping_input.CreateSchemaMappingInput = {
        "schema_name": schema_name,
        "mapped_input_fields": mapped_input_fields,
    }
    if description is not None:
        input_["description"] = description
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output