Skip to content

update_dataset

update_dataset(
    name: DatasetName,
    input: Input,
    *,
    config_overrides: Optional[DataBrewClientConfig] = None,
    format: Optional[InputFormat] = None,
    format_options: Optional[FormatOptions] = None,
    path_options: Optional[PathOptions] = None,
) -> UpdateDatasetResponse

Modifies the definition of an existing DataBrew dataset.

Parameters:

  • name (DatasetName) –

    The name of the dataset to be updated.

  • format (Optional[InputFormat], default: None ) –

    The file format of a dataset that is created from an Amazon S3 file or folder.

  • path_options (Optional[PathOptions], default: None ) –

    A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.

Raises:

Source code in docs_src/capo_databrew/_services/data_brew.py
def update_dataset(
    self,
    name: "capo_databrew.types.dataset_name.DatasetName",
    input: "capo_databrew.types.input.Input",
    *,
    config_overrides: Optional[DataBrewClientConfig] = None,
    format: Optional["capo_databrew.types.input_format.InputFormat"] = None,
    format_options: Optional[
        "capo_databrew.types.format_options.FormatOptions"
    ] = None,
    path_options: Optional["capo_databrew.types.path_options.PathOptions"] = None,
) -> "capo_databrew.types.update_dataset_response.UpdateDatasetResponse":
    """<p>Modifies the definition of an existing DataBrew dataset.</p>

    Args:
        name: <p>The name of the dataset to be updated.</p>
        format: <p>The file format of a dataset that is created from an Amazon S3 file or folder.</p>
        path_options: <p>A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.</p>

    Raises:
        capo_databrew.errors.access_denied_exception.AccessDeniedException: <p>Access to the specified resource was denied.</p>
        capo_databrew.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
        capo_databrew.errors.validation_exception.ValidationException: <p>The input parameters for this request failed validation.</p>
        capo_databrew.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_databrew.types.update_dataset_request.UpdateDatasetRequest]",
    ) -> OperationResponse[
        "capo_databrew.types.update_dataset_response.UpdateDatasetResponse"
    ]:
        import capo_databrew._operations.aws_glue_data_brew.update_dataset

        output, http_response = (
            capo_databrew._operations.aws_glue_data_brew.update_dataset.update_dataset(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDataset")
    )
    input_: capo_databrew.types.update_dataset_request.UpdateDatasetRequest = {
        "name": name,
        "input": input,
    }
    if format is not None:
        input_["format"] = format
    if format_options is not None:
        input_["format_options"] = format_options
    if path_options is not None:
        input_["path_options"] = path_options

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output