Skip to main content

bulk_import_jobs

Creates, updates, deletes, gets or lists a bulk_import_jobs resource.

Overview

Namebulk_import_jobs
TypeResource
Idaws.iotsitewise.bulk_import_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
adaptive_ingestionbooleanIf 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.
dataset_idstringThe ID of the dataset. (pattern: <code>^(?!00000000-0000-0000-0000-000000000000)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>)
delete_files_after_importbooleanIf set to true, your data files is deleted from S3, after ingestion into IoT SiteWise storage.
error_report_locationobjectThe Amazon S3 destination where errors associated with the job creation request are saved.
filesarrayThe files in the specified Amazon S3 bucket that contain your data. You can specify up to 100 files for each bulk import job. Each file supports the following size limits: Parquet files – Up to 256 MiB. Other file formats – Up to 5 GiB.
job_configurationobjectContains the configuration information of a job, such as the file format used to save data in Amazon S3.
job_creation_datestring (date-time)The date the job was created, in Unix epoch TIME.
job_idstringThe ID of the job. (pattern: <code>^(?!00000000-0000-0000-0000-000000000000)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>)
job_last_update_datestring (date-time)The date the job was last updated, in Unix epoch time.
job_namestringThe unique name that helps identify the job request. (pattern: <code>[^\u0000-\u001F\u007F]+</code>)
job_role_arnstringThe ARN of the IAM role that allows IoT SiteWise to read Amazon S3 data. (pattern: <code>^arn:aws(-cn|-us-gov)?:[a-zA-Z0-9-:/_.]+$</code>)
job_statusstringThe status of the bulk import job can be one of following values: PENDING – IoT SiteWise is waiting for the current bulk import job to finish. CANCELLED – The bulk import job has been canceled. RUNNING – IoT SiteWise is processing your request to import your data from Amazon S3. COMPLETED – IoT SiteWise successfully completed your request to import data from Amazon S3. FAILED – IoT SiteWise couldn't process your request to import data from Amazon S3. You can use logs saved in the specified error report location in Amazon S3 to troubleshoot issues. COMPLETED_WITH_FAILURES – IoT SiteWise completed your request to import data from Amazon S3 with errors. You can use logs saved in the specified error report location in Amazon S3 to troubleshoot issues. (PENDING, CANCELLED, RUNNING, COMPLETED, FAILED, COMPLETED_WITH_FAILURES)
workspace_namestringThe name of the workspace. (pattern: <code>^[a-zA-Z0-9_-]+$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_bulk_import_jobselectjob_id, regionworkspaceNameRetrieves information about a bulk import job request. For more information, see Describe a bulk import job (CLI) in the Amazon Simple Storage Service User Guide.
list_bulk_import_jobsselectregionnextToken, maxResults, filter, workspaceNameRetrieves a paginated list of bulk import job requests. For more information, see List bulk import jobs (CLI) in the IoT SiteWise User Guide.
create_bulk_import_jobinsertregion, jobName, jobRoleArn, files, errorReportLocationDefines 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. Before you create a bulk import job that ingests data into time series outside of a workspace, you must enable IoT SiteWise warm tier or IoT SiteWise cold tier. For more information about how to configure storage settings, see PutStorageConfiguration. This requirement doesn't apply to bulk import jobs that ingest data into a session dataset in a workspace (jobs that specify a workspaceName and datasetId). Those jobs don't use IoT SiteWise warm or cold tier storage. 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
job_idstringThe ID of the job.
regionstringAWS region (default: us-east-1)
filterstringYou can use a filter to select the bulk import jobs that you want to retrieve.
maxResultsintegerThe maximum number of results to return for each paginated request.
nextTokenstringThe token to be used for the next set of paginated results.
workspaceNamestringThe name of the workspace.

SELECT examples

Retrieves information about a bulk import job request. For more information, see Describe a bulk import job (CLI) in the Amazon Simple Storage Service User Guide.

SELECT
adaptive_ingestion,
dataset_id,
delete_files_after_import,
error_report_location,
files,
job_configuration,
job_creation_date,
job_id,
job_last_update_date,
job_name,
job_role_arn,
job_status,
workspace_name
FROM aws.iotsitewise.bulk_import_jobs
WHERE job_id = '{{ job_id }}' -- required
AND region = '{{ region }}' -- required
AND workspaceName = '{{ workspaceName }}'
;

INSERT examples

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. Before you create a bulk import job that ingests data into time series outside of a workspace, you must enable IoT SiteWise warm tier or IoT SiteWise cold tier. For more information about how to configure storage settings, see PutStorageConfiguration. This requirement doesn't apply to bulk import jobs that ingest data into a session dataset in a workspace (jobs that specify a workspaceName and datasetId). Those jobs don't use IoT SiteWise warm or cold tier storage. 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.

INSERT INTO aws.iotsitewise.bulk_import_jobs (
jobName,
jobRoleArn,
files,
errorReportLocation,
jobConfiguration,
adaptiveIngestion,
deleteFilesAfterImport,
datasetId,
workspaceName,
region
)
SELECT
'{{ jobName }}' /* required */,
'{{ jobRoleArn }}' /* required */,
'{{ files }}' /* required */,
'{{ errorReportLocation }}' /* required */,
'{{ jobConfiguration }}',
{{ adaptiveIngestion }},
{{ deleteFilesAfterImport }},
'{{ datasetId }}',
'{{ workspaceName }}',
'{{ region }}'
RETURNING
job_id,
job_name,
job_status
;