createProfileJob method
- required String datasetName,
- required String name,
- required S3Location outputLocation,
- required String roleArn,
- ProfileConfiguration? configuration,
- String? encryptionKeyArn,
- EncryptionMode? encryptionMode,
- JobSample? jobSample,
- LogSubscription? logSubscription,
- int? maxCapacity,
- int? maxRetries,
- Map<
String, String> ? tags, - int? timeout,
- List<
ValidationConfiguration> ? validationConfigurations,
Creates a new job to analyze a dataset and create its data profile.
May throw AccessDeniedException.
May throw ConflictException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter datasetName :
The name of the dataset that this job is to act upon.
Parameter name :
The name of the job to be created. Valid characters are alphanumeric (A-Z,
a-z, 0-9), hyphen (-), period (.), and space.
Parameter roleArn :
The Amazon Resource Name (ARN) of the Identity and Access Management (IAM)
role to be assumed when DataBrew runs the job.
Parameter configuration :
Configuration for profile jobs. Used to select columns, do evaluations,
and override default parameters of evaluations. When configuration is
null, the profile job will run with default settings.
Parameter encryptionKeyArn :
The Amazon Resource Name (ARN) of an encryption key that is used to
protect the job.
Parameter encryptionMode :
The encryption mode for the job, which can be one of the following:
-
SSE-KMS-SSE-KMS- Server-side encryption with KMS-managed keys. -
SSE-S3- Server-side encryption with keys managed by Amazon S3.
Parameter jobSample :
Sample configuration for profile jobs only. Determines the number of rows
on which the profile job will be executed. If a JobSample value is not
provided, the default value will be used. The default value is CUSTOM_ROWS
for the mode parameter and 20000 for the size parameter.
Parameter logSubscription :
Enables or disables Amazon CloudWatch logging for the job. If logging is
enabled, CloudWatch writes one log stream for each job run.
Parameter maxCapacity :
The maximum number of nodes that DataBrew can use when the job processes
data.
Parameter maxRetries :
The maximum number of times to retry the job after a job run fails.
Parameter tags :
Metadata tags to apply to this job.
Parameter timeout :
The job's timeout in minutes. A job that attempts to run longer than this
timeout period ends with a status of TIMEOUT.
Parameter validationConfigurations :
List of validation configurations that are applied to the profile job.
Implementation
Future<CreateProfileJobResponse> createProfileJob({
required String datasetName,
required String name,
required S3Location outputLocation,
required String roleArn,
ProfileConfiguration? configuration,
String? encryptionKeyArn,
EncryptionMode? encryptionMode,
JobSample? jobSample,
LogSubscription? logSubscription,
int? maxCapacity,
int? maxRetries,
Map<String, String>? tags,
int? timeout,
List<ValidationConfiguration>? validationConfigurations,
}) async {
_s.validateNumRange(
'maxRetries',
maxRetries,
0,
1152921504606846976,
);
_s.validateNumRange(
'timeout',
timeout,
0,
1152921504606846976,
);
final $payload = <String, dynamic>{
'DatasetName': datasetName,
'Name': name,
'OutputLocation': outputLocation,
'RoleArn': roleArn,
if (configuration != null) 'Configuration': configuration,
if (encryptionKeyArn != null) 'EncryptionKeyArn': encryptionKeyArn,
if (encryptionMode != null) 'EncryptionMode': encryptionMode.value,
if (jobSample != null) 'JobSample': jobSample,
if (logSubscription != null) 'LogSubscription': logSubscription.value,
if (maxCapacity != null) 'MaxCapacity': maxCapacity,
if (maxRetries != null) 'MaxRetries': maxRetries,
if (tags != null) 'Tags': tags,
if (timeout != null) 'Timeout': timeout,
if (validationConfigurations != null)
'ValidationConfigurations': validationConfigurations,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/profileJobs',
exceptionFnMap: _exceptionFns,
);
return CreateProfileJobResponse.fromJson(response);
}