trigger_adhoc_operation

DatasetsApi.trigger_adhoc_operation(id, role_id, action, force=None, adhoc_trigger_job_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Trigger an adhoc operation on a dataset

Triggers an adhoc background operation on a dataset. The caller must have at least editor access on the dataset. Supported actions (via the action query parameter): - run_data_profiling_job — Triggers an AWS Glue data profiling job for the dataset via the EventRules lambda. Optionally accepts NumberOfWorkers and Timeout in the request body to override defaults. Returns immediately with a confirmation message; the job runs asynchronously. - run_bda_extraction — Triggers a Bedrock Data Automation (BDA) extraction job for the dataset. Requires editor access, S3 (object storage) TargetLocation, IsBDAExtractionEnabled=true, Datasets AI enabled in the environment, a BDA-supported region, and a supported file type. Optionally accepts FileProcessingMode, FileIds, FromTime, ToTime, TargetDatasetId, and TargetDatasetProvided in the request body. Returns immediately; the job runs asynchronously. - run_eda_profiling — Triggers data profiling for the dataset. Supported only for internal s3athena or redshift datasets that are not Hudi or Iceberg. If profiling is already complete, returns the current status unless force=true is passed to regenerate. Rejects the call if profiling is already in progress.

Parameters:
  • id (str) – Unique identifier of the dataset to operate on (required)

  • role_id (str) – IAM role identifier for the calling user (required)

  • action (str) – The adhoc operation to trigger. Each action has different request body requirements and eligibility constraints. (required)

  • force (str) – Only used with action=run_eda_profiling. When “true”, regenerates the profile even if a completed profile already exists. Defaults to “false”.

  • adhoc_trigger_job_request (AdhocTriggerJobRequest) – Optional request body. Used by run_data_profiling_job (NumberOfWorkers, Timeout) and run_bda_extraction (FileProcessingMode, FileIds, etc.). Not used by run_eda_profiling.

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

TriggerAdhocOperationResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: POST /datasets/{id}

Success (HTTP 200)

Operation triggered successfully or already completed

Data profiling job triggered

{
  "Message": "Data profiling job triggered successfully."
}

BDA extraction job triggered

{
  "Message": "BDA extraction job triggered successfully."
}

EDA profiling triggered

{
  "Message": "Exploratory data analysis triggered.",
  "DatasetId": "abc12345-1234-1234-1234-abcdef123456",
  "EdaStatus": "IN_PROGRESS"
}

EDA profile already exists (force not set)

{
  "Message": "Profile already available for this dataset. Pass force=true to regenerate.",
  "EdaStatus": "COMPLETED"
}

Errors

HTTP 400

Invalid input or ineligible dataset

Dataset not found

{
  "Message": "Invalid DatasetId - abc123, resource not found."
}

Missing action query parameter

{
  "Message": "Query parameter 'action' is required"
}

Invalid action value

{
  "Message": "Invalid query parameter action: unknown_action"
}

BDA not supported in deployment region

{
  "Message": "BDA (Bedrock Data Automation) is not available in region eu-north-1. Supported regions: us-east-1, us-west-2, ..."
}

EDA not supported for dataset target location

{
  "Message": "Invalid resource type - lf, supported types are s3athena, redshift."
}

EDA profiling already running

{
  "Message": "Exploratory data analysis already in progress."
}

HTTP 403

User does not have editor access on the dataset

User lacks editor access

{
  "Message": "User: user@example.com requires at least editor access on the resource to perform this action."
}

HTTP 500

Internal failure during operation trigger

Failed to trigger the operation

{
  "Message": "Failed to triggering Data Profiling Job due to error - ..."
}