- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CreateBulkImportJobCommand
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, you must enable IoT SiteWise warm tier or IoT SiteWise cold tier. For more information about how to configure storage settings, see PutStorageConfiguration .
Bulk import is designed to store historical data to IoT SiteWise. It does not trigger computations or notifications on IoT SiteWise warm or cold tier storage.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IoTSiteWiseClient, CreateBulkImportJobCommand } from "@aws-sdk/client-iotsitewise"; // ES Modules import
// const { IoTSiteWiseClient, CreateBulkImportJobCommand } = require("@aws-sdk/client-iotsitewise"); // CommonJS import
const client = new IoTSiteWiseClient(config);
const input = { // CreateBulkImportJobRequest
jobName: "STRING_VALUE", // required
jobRoleArn: "STRING_VALUE", // required
files: [ // Files // required
{ // File
bucket: "STRING_VALUE", // required
key: "STRING_VALUE", // required
versionId: "STRING_VALUE",
},
],
errorReportLocation: { // ErrorReportLocation
bucket: "STRING_VALUE", // required
prefix: "STRING_VALUE", // required
},
jobConfiguration: { // JobConfiguration
fileFormat: { // FileFormat
csv: { // Csv
columnNames: [ // ColumnNames // required
"ALIAS" || "ASSET_ID" || "PROPERTY_ID" || "DATA_TYPE" || "TIMESTAMP_SECONDS" || "TIMESTAMP_NANO_OFFSET" || "QUALITY" || "VALUE",
],
},
parquet: {},
},
},
adaptiveIngestion: true || false,
deleteFilesAfterImport: true || false,
};
const command = new CreateBulkImportJobCommand(input);
const response = await client.send(command);
// { // CreateBulkImportJobResponse
// jobId: "STRING_VALUE", // required
// jobName: "STRING_VALUE", // required
// jobStatus: "PENDING" || "CANCELLED" || "RUNNING" || "COMPLETED" || "FAILED" || "COMPLETED_WITH_FAILURES", // required
// };
CreateBulkImportJobCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
errorReportLocation Required | ErrorReportLocation | undefined | The Amazon S3 destination where errors associated with the job creation request are saved. |
files Required | File[] | undefined | The files in the specified Amazon S3 bucket that contain your data. |
jobConfiguration Required | JobConfiguration | undefined | Contains the configuration information of a job, such as the file format used to save data in Amazon S3. |
jobName Required | string | undefined | The unique name that helps identify the job request. |
jobRoleArn Required | string | undefined | The ARN of the IAM role that allows IoT SiteWise to read Amazon S3 data. |
adaptiveIngestion | boolean | undefined | 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. |
deleteFilesAfterImport | boolean | undefined | If set to true, your data files is deleted from S3, after ingestion into IoT SiteWise storage. |
CreateBulkImportJobCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
jobId Required | string | undefined | The ID of the job. |
jobName Required | string | undefined | The unique name that helps identify the job request. |
jobStatus Required | JobStatus | undefined | The status of the bulk import job can be one of following values:
|
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ConflictingOperationException | client | Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time. |
InternalFailureException | server | IoT SiteWise can't process your request right now. Try again later. |
InvalidRequestException | client | The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again. |
LimitExceededException | client | You've reached the limit for a resource. For example, this can occur if you're trying to associate more than the allowed number of child assets or attempting to create more than the allowed number of properties for an asset model. For more information, see Quotas in the IoT SiteWise User Guide. |
ResourceAlreadyExistsException | client | The resource already exists. |
ResourceNotFoundException | client | The requested resource can't be found. |
ThrottlingException | client | Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on. For more information, see Quotas in the IoT SiteWise User Guide. |
IoTSiteWiseServiceException | Base exception class for all service exceptions from IoTSiteWise service. |