Skip to content

/AWS1/IF_IOS=>BATCHASSOCATASEGSTODATASET()

About BatchAssociateDataSegmentsToDataset

Associates a batch of data segments with a curated dataset. Data segments are time-bounded slices of time series data selected from source session datasets. Data segments that belong to the same time series can't overlap in time, regardless of which dataset they belong to.

Method Signature

METHODS /AWS1/IF_IOS~BATCHASSOCATASEGSTODATASET
  IMPORTING
    !IV_DATASETID TYPE /AWS1/IOSID OPTIONAL
    !IV_WORKSPACENAME TYPE /AWS1/IOSWORKSPACENAME OPTIONAL
    !IT_ASSOCATASEGMENTENTRIES TYPE /AWS1/CL_IOSASSOCATASEGENTRY=>TT_ASSOCIATEDATASEGMENTENTRIES OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/IOSCLIENTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iosbtcascatasegtods01
  RAISING
    /AWS1/CX_IOSCNFLCTOPERATIONEX
    /AWS1/CX_IOSINTERNALFAILUREEX
    /AWS1/CX_IOSINVALIDREQUESTEX
    /AWS1/CX_IOSLIMITEXCEEDEDEX
    /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_datasetid TYPE /AWS1/IOSID /AWS1/IOSID

The ID of the curated dataset to associate data segments with.

iv_workspacename TYPE /AWS1/IOSWORKSPACENAME /AWS1/IOSWORKSPACENAME

The name of the workspace that contains the dataset.

it_assocatasegmententries TYPE /AWS1/CL_IOSASSOCATASEGENTRY=>TT_ASSOCIATEDATASEGMENTENTRIES TT_ASSOCIATEDATASEGMENTENTRIES

The list of data segment entries to associate with the dataset.

Optional arguments:

iv_clienttoken TYPE /AWS1/IOSCLIENTTOKEN /AWS1/IOSCLIENTTOKEN

A unique, case-sensitive identifier that you provide to ensure that the request is idempotent. If you retry a request that completed successfully using the same client token, the retry succeeds without performing any further actions.

RETURNING

oo_output TYPE REF TO /aws1/cl_iosbtcascatasegtods01 /AWS1/CL_IOSBTCASCATASEGTODS01

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->batchassocatasegstodataset(
  it_assocatasegmententries = VALUE /aws1/cl_iosassocatasegentry=>tt_associatedatasegmententries(
    (
      new /aws1/cl_iosassocatasegentry(
        io_endtimestamp = new /aws1/cl_iostimeinnanos(
          iv_offsetinnanos = 123
          iv_timeinseconds = 123
        )
        io_starttimestamp = new /aws1/cl_iostimeinnanos(
          iv_offsetinnanos = 123
          iv_timeinseconds = 123
        )
        iv_sourcedatasetid = |string|
        iv_timeseriesid = |string|
      )
    )
  )
  iv_clienttoken = |string|
  iv_datasetid = |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_datasetid( ).
  lv_version = lo_result->get_datasetversion( ).
  LOOP AT lo_result->get_failedassociations( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_id = lo_row_1->get_sourcedatasetid( ).
      lv_timeseriesid = lo_row_1->get_timeseriesid( ).
      lo_timeinnanos = lo_row_1->get_starttimestamp( ).
      IF lo_timeinnanos IS NOT INITIAL.
        lv_timeinseconds = lo_timeinnanos->get_timeinseconds( ).
        lv_offsetinnanos = lo_timeinnanos->get_offsetinnanos( ).
      ENDIF.
      lo_timeinnanos = lo_row_1->get_endtimestamp( ).
      IF lo_timeinnanos IS NOT INITIAL.
        lv_timeinseconds = lo_timeinnanos->get_timeinseconds( ).
        lv_offsetinnanos = lo_timeinnanos->get_offsetinnanos( ).
      ENDIF.
      lv_datasegmenterrorcode = lo_row_1->get_errorcode( ).
      lv_datasegmenterrormessage = lo_row_1->get_errormessage( ).
    ENDIF.
  ENDLOOP.
ENDIF.