createBulkImportJob method
Defines a job to ingest data to IoT SiteWise from Amazon S3. For more information, see Create a bulk import job (CLI) in the Amazon Simple Storage Service User Guide.
Bulk import is designed to store historical data to IoT SiteWise.
- Newly ingested data in the hot tier triggers notifications and computations.
- After data moves from the hot tier to the warm or cold tier based on retention settings, it does not trigger computations or notifications.
- Data older than 7 days does not trigger computations or notifications.
May throw ConflictingOperationException.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw LimitExceededException.
May throw ResourceAlreadyExistsException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter errorReportLocation :
The Amazon S3 destination where errors associated with the job creation
request are saved.
Parameter files :
The files in the specified Amazon S3 bucket that contain your data.
Parameter jobConfiguration :
Contains the configuration information of a job, such as the file format
used to save data in Amazon S3.
Parameter jobName :
The unique name that helps identify the job request.
Parameter jobRoleArn :
The ARN
of the IAM role that allows IoT SiteWise to read Amazon S3 data.
Parameter adaptiveIngestion :
If set to true, ingest new data into IoT SiteWise storage. Measurements
with notifications, metrics and transforms are computed. If set to false,
historical data is ingested into IoT SiteWise as is.
Parameter deleteFilesAfterImport :
If set to true, your data files is deleted from S3, after ingestion into
IoT SiteWise storage.
Implementation
Future<CreateBulkImportJobResponse> createBulkImportJob({
required ErrorReportLocation errorReportLocation,
required List<File> files,
required JobConfiguration jobConfiguration,
required String jobName,
required String jobRoleArn,
bool? adaptiveIngestion,
bool? deleteFilesAfterImport,
}) async {
final $payload = <String, dynamic>{
'errorReportLocation': errorReportLocation,
'files': files,
'jobConfiguration': jobConfiguration,
'jobName': jobName,
'jobRoleArn': jobRoleArn,
if (adaptiveIngestion != null) 'adaptiveIngestion': adaptiveIngestion,
if (deleteFilesAfterImport != null)
'deleteFilesAfterImport': deleteFilesAfterImport,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/jobs',
exceptionFnMap: _exceptionFns,
);
return CreateBulkImportJobResponse.fromJson(response);
}