Skip to content

/AWS1/IF_IOS=>CREATEBULKIMPORTJOB()

About CreateBulkImportJob

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.

Method Signature

METHODS /AWS1/IF_IOS~CREATEBULKIMPORTJOB
  IMPORTING
    !IV_JOBNAME TYPE /AWS1/IOSBULKIMPORTJOBNAME OPTIONAL
    !IV_JOBROLEARN TYPE /AWS1/IOSARN OPTIONAL
    !IT_FILES TYPE /AWS1/CL_IOSFILE=>TT_FILES OPTIONAL
    !IO_ERRORREPORTLOCATION TYPE REF TO /AWS1/CL_IOSERRORREPORTLOC OPTIONAL
    !IO_JOBCONFIGURATION TYPE REF TO /AWS1/CL_IOSJOBCONFIGURATION OPTIONAL
    !IV_ADAPTIVEINGESTION TYPE /AWS1/IOSADAPTIVEINGESTION OPTIONAL
    !IV_DELETEFILESAFTERIMPORT TYPE /AWS1/IOSDELETEFILESAFTERIMP OPTIONAL
    !IV_DATASETID TYPE /AWS1/IOSID OPTIONAL
    !IV_WORKSPACENAME TYPE /AWS1/IOSWORKSPACENAME OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ioscrebulkimpjobrsp
  RAISING
    /AWS1/CX_IOSCNFLCTOPERATIONEX
    /AWS1/CX_IOSINTERNALFAILUREEX
    /AWS1/CX_IOSINVALIDREQUESTEX
    /AWS1/CX_IOSLIMITEXCEEDEDEX
    /AWS1/CX_IOSRESRCALRDYEXISTSEX
    /AWS1/CX_IOSRESOURCENOTFOUNDEX
    /AWS1/CX_IOSTHROTTLINGEX
    /AWS1/CX_IOSCLIENTEXC
    /AWS1/CX_IOSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_jobname TYPE /AWS1/IOSBULKIMPORTJOBNAME /AWS1/IOSBULKIMPORTJOBNAME

The unique name that helps identify the job request.

iv_jobrolearn TYPE /AWS1/IOSARN /AWS1/IOSARN

The ARN of the IAM role that allows IoT SiteWise to read Amazon S3 data.

it_files TYPE /AWS1/CL_IOSFILE=>TT_FILES TT_FILES

The 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.

io_errorreportlocation TYPE REF TO /AWS1/CL_IOSERRORREPORTLOC /AWS1/CL_IOSERRORREPORTLOC

The Amazon S3 destination where errors associated with the job creation request are saved.

Optional arguments:

io_jobconfiguration TYPE REF TO /AWS1/CL_IOSJOBCONFIGURATION /AWS1/CL_IOSJOBCONFIGURATION

Contains the configuration information of a job, such as the file format used to save data in Amazon S3.

iv_adaptiveingestion TYPE /AWS1/IOSADAPTIVEINGESTION /AWS1/IOSADAPTIVEINGESTION

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.

iv_deletefilesafterimport TYPE /AWS1/IOSDELETEFILESAFTERIMP /AWS1/IOSDELETEFILESAFTERIMP

If set to true, your data files is deleted from S3, after ingestion into IoT SiteWise storage.

iv_datasetid TYPE /AWS1/IOSID /AWS1/IOSID

The ID of the session dataset to ingest data into. Specify this field, together with workspaceName, to ingest data into a session dataset in a workspace.

iv_workspacename TYPE /AWS1/IOSWORKSPACENAME /AWS1/IOSWORKSPACENAME

The name of the workspace that contains the session dataset. Specify this field together with datasetId.

RETURNING

oo_output TYPE REF TO /aws1/cl_ioscrebulkimpjobrsp /AWS1/CL_IOSCREBULKIMPJOBRSP

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->createbulkimportjob(
  io_errorreportlocation = new /aws1/cl_ioserrorreportloc(
    iv_bucket = |string|
    iv_prefix = |string|
  )
  io_jobconfiguration = new /aws1/cl_iosjobconfiguration(
    io_fileformat = new /aws1/cl_iosfileformat(
      io_annotation = new /aws1/cl_iosannotation( )
      io_csv = new /aws1/cl_ioscsv(
        it_columnnames = VALUE /aws1/cl_ioscolumnnames_w=>tt_columnnames(
          ( new /aws1/cl_ioscolumnnames_w( |string| ) )
        )
      )
      io_mp4 = new /aws1/cl_iosmp4( )
      io_parquet = new /aws1/cl_iosparquet( )
    )
  )
  it_files = VALUE /aws1/cl_iosfile=>tt_files(
    (
      new /aws1/cl_iosfile(
        io_fileformat = new /aws1/cl_iosfileformat(
          io_annotation = new /aws1/cl_iosannotation( )
          io_csv = new /aws1/cl_ioscsv(
            it_columnnames = VALUE /aws1/cl_ioscolumnnames_w=>tt_columnnames(
              ( new /aws1/cl_ioscolumnnames_w( |string| ) )
            )
          )
          io_mp4 = new /aws1/cl_iosmp4( )
          io_parquet = new /aws1/cl_iosparquet( )
        )
        io_starttime = new /aws1/cl_iostimeinnanos(
          iv_offsetinnanos = 123
          iv_timeinseconds = 123
        )
        iv_alias = |string|
        iv_bucket = |string|
        iv_key = |string|
        iv_versionid = |string|
      )
    )
  )
  iv_adaptiveingestion = ABAP_TRUE
  iv_datasetid = |string|
  iv_deletefilesafterimport = ABAP_TRUE
  iv_jobname = |string|
  iv_jobrolearn = |string|
  iv_workspacename = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_id = lo_result->get_jobid( ).
  lv_bulkimportjobname = lo_result->get_jobname( ).
  lv_jobstatus = lo_result->get_jobstatus( ).
ENDIF.