Skip to content

start_data_transformation_job async

start_data_transformation_job(
    input_data_config: TransformationInputDataConfig,
    output_data_config: TransformationOutputDataConfig,
    data_access_role_arn: DataTransformationIamRoleArn,
    client_token: ClientToken,
    profile_id: ProfileIdString,
    *,
    config_overrides: Optional[AsyncHealthLakeClientConfig] = None,
    job_name: Optional[DataTransformationJobName] = None,
    drift_detection_enabled: Optional[bool] = None,
    provenance_enabled: Optional[bool] = None,
) -> StartDataTransformationJobResponse

Starts an asynchronous data transformation job that converts source files from Amazon Simple Storage Service (Amazon S3) and writes the output to Amazon S3 or HealthLake.

Parameters:

  • input_data_config (TransformationInputDataConfig) –

    The Amazon S3 location and format of the source files to transform.

  • output_data_config (TransformationOutputDataConfig) –

    The Amazon S3 output location and Amazon Web Services Key Management Service (Amazon Web Services KMS) encryption configuration.

  • data_access_role_arn (DataTransformationIamRoleArn) –

    The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) role that HealthLake assumes to read from and write to the specified Amazon S3 locations.

  • client_token (ClientToken) –

    A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

  • job_name (Optional[DataTransformationJobName], default: None ) –

    A descriptive name for the data transformation job.

  • profile_id (ProfileIdString) –

    The unique identifier of the data transformation profile to use for conversion.

  • drift_detection_enabled (Optional[bool], default: None ) –

    Specifies whether drift detection is enabled for this job. When enabled, HealthLake writes a drift report to the output Amazon S3 location alongside the converted files.

  • provenance_enabled (Optional[bool], default: None ) –

    Specifies whether FHIR R4 Provenance resource generation is enabled for this transformation job. When provenance is enabled, the service also generates related DocumentReference and Device resources. If you don't specify a value, the default is true. To disable provenance output, set this parameter to false.

Raises:

Source code in docs_src/capo_healthlake/_services/async_health_lake.py
async def start_data_transformation_job(
    self,
    input_data_config: "capo_healthlake.types.transformation_input_data_config.TransformationInputDataConfig",
    output_data_config: "capo_healthlake.types.transformation_output_data_config.TransformationOutputDataConfig",
    data_access_role_arn: "capo_healthlake.types.data_transformation_iam_role_arn.DataTransformationIamRoleArn",
    client_token: "capo_healthlake.types.client_token.ClientToken",
    profile_id: "capo_healthlake.types.profile_id_string.ProfileIdString",
    *,
    config_overrides: Optional[AsyncHealthLakeClientConfig] = None,
    job_name: Optional[
        "capo_healthlake.types.data_transformation_job_name.DataTransformationJobName"
    ] = None,
    drift_detection_enabled: Optional[bool] = None,
    provenance_enabled: Optional[bool] = None,
) -> "capo_healthlake.types.start_data_transformation_job_response.StartDataTransformationJobResponse":
    """<p>Starts an asynchronous data transformation job that converts source files from Amazon Simple Storage Service (Amazon S3) and writes the output to Amazon S3 or HealthLake.</p>

    Args:
        input_data_config: <p>The Amazon S3 location and format of the source files to transform.</p>
        output_data_config: <p>The Amazon S3 output location and Amazon Web Services Key Management Service (Amazon Web Services KMS) encryption configuration.</p>
        data_access_role_arn: <p>The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) role that HealthLake assumes to read from and write to the specified Amazon S3 locations.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.</p>
        job_name: <p>A descriptive name for the data transformation job.</p>
        profile_id: <p>The unique identifier of the data transformation profile to use for conversion.</p>
        drift_detection_enabled: <p>Specifies whether drift detection is enabled for this job. When enabled, HealthLake writes a drift report to the output Amazon S3 location alongside the converted files.</p>
        provenance_enabled: <p>Specifies whether FHIR R4 Provenance resource generation is enabled for this transformation job. When provenance is enabled, the service also generates related DocumentReference and Device resources. If you don't specify a value, the default is <code>true</code>. To disable provenance output, set this parameter to <code>false</code>.</p>

    Raises:
        capo_healthlake.errors.access_denied_exception.AccessDeniedException: <p>Access is denied. Your account is not authorized to perform this operation.</p>
        capo_healthlake.errors.internal_server_exception.InternalServerException: <p>An unknown internal error occurred in the service.</p>
        capo_healthlake.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested data store was not found.</p>
        capo_healthlake.errors.throttling_exception.ThrottlingException: <p>The user has exceeded their maximum number of allowed calls to the given API. </p>
        capo_healthlake.errors.validation_exception.ValidationException: <p>The user input parameter was invalid.</p>
        capo_healthlake.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_healthlake.types.start_data_transformation_job_request.StartDataTransformationJobRequest]",
    ) -> AsyncOperationResponse[
        "capo_healthlake.types.start_data_transformation_job_response.StartDataTransformationJobResponse"
    ]:
        import capo_healthlake._operations.health_lake.start_data_transformation_job

        (
            output,
            http_response,
        ) = await capo_healthlake._operations.health_lake.start_data_transformation_job.async_start_data_transformation_job(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartDataTransformationJob")
    )
    input_: capo_healthlake.types.start_data_transformation_job_request.StartDataTransformationJobRequest = {
        "input_data_config": input_data_config,
        "output_data_config": output_data_config,
        "data_access_role_arn": data_access_role_arn,
        "client_token": client_token,
        "profile_id": profile_id,
    }
    if job_name is not None:
        input_["job_name"] = job_name
    if drift_detection_enabled is not None:
        input_["drift_detection_enabled"] = drift_detection_enabled
    if provenance_enabled is not None:
        input_["provenance_enabled"] = provenance_enabled

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