/AWS1/IF_IOS=>CREATEDATASET()¶
About CreateDataset¶
Creates a dataset. Session and curated datasets are created in a workspace. A session dataset contains data segments of time series data, and a curated dataset curates data segments selected from source session datasets. A dataset that connects to an external datasource is created outside of a workspace.
Method Signature¶
METHODS /AWS1/IF_IOS~CREATEDATASET
IMPORTING
!IV_DATASETID TYPE /AWS1/IOSID OPTIONAL
!IV_DATASETNAME TYPE /AWS1/IOSRESTRICTEDNAME OPTIONAL
!IV_DATASETDESCRIPTION TYPE /AWS1/IOSDESCRIPTION OPTIONAL
!IV_DATASETTYPE TYPE /AWS1/IOSDATASETTYPEENUM OPTIONAL
!IO_DATASETCONFIG TYPE REF TO /AWS1/CL_IOSDATASETCONFIG OPTIONAL
!IV_WORKSPACENAME TYPE /AWS1/IOSWORKSPACENAME OPTIONAL
!IT_METADATA TYPE /AWS1/CL_IOSMETADATA_W=>TT_METADATA OPTIONAL
!IO_DATASETSOURCE TYPE REF TO /AWS1/CL_IOSDATASETSOURCE OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/IOSCLIENTTOKEN OPTIONAL
!IT_TAGS TYPE /AWS1/CL_IOSTAGMAP_W=>TT_TAGMAP OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ioscreatedatasetrsp
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_datasetname TYPE /AWS1/IOSRESTRICTEDNAME /AWS1/IOSRESTRICTEDNAME¶
The name of the dataset.
io_datasetsource TYPE REF TO /AWS1/CL_IOSDATASETSOURCE /AWS1/CL_IOSDATASETSOURCE¶
The data source for the dataset.
Optional arguments:¶
iv_datasetid TYPE /AWS1/IOSID /AWS1/IOSID¶
The ID of the dataset.
iv_datasetdescription TYPE /AWS1/IOSDESCRIPTION /AWS1/IOSDESCRIPTION¶
A description about the dataset, and its functionality.
iv_datasettype TYPE /AWS1/IOSDATASETTYPEENUM /AWS1/IOSDATASETTYPEENUM¶
The type of dataset: a session dataset, a curated dataset, or a connection to an external datasource.
io_datasetconfig TYPE REF TO /AWS1/CL_IOSDATASETCONFIG /AWS1/CL_IOSDATASETCONFIG¶
The configuration for the dataset.
iv_workspacename TYPE /AWS1/IOSWORKSPACENAME /AWS1/IOSWORKSPACENAME¶
The name of the workspace that contains the dataset. Required for session and curated datasets. Omit this field for datasets that connect to an external datasource.
it_metadata TYPE /AWS1/CL_IOSMETADATA_W=>TT_METADATA TT_METADATA¶
The metadata for the dataset, provided as key-value pairs.
iv_clienttoken TYPE /AWS1/IOSCLIENTTOKEN /AWS1/IOSCLIENTTOKEN¶
A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
it_tags TYPE /AWS1/CL_IOSTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
A list of key-value pairs that contain metadata for the access policy. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ioscreatedatasetrsp /AWS1/CL_IOSCREATEDATASETRSP¶
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->createdataset(
io_datasetconfig = new /aws1/cl_iosdatasetconfig(
io_session = new /aws1/cl_iossessionconfig(
io_sessionendtimestamp = new /aws1/cl_iostimeinnanos(
iv_offsetinnanos = 123
iv_timeinseconds = 123
)
io_sessionstarttimestamp = new /aws1/cl_iostimeinnanos(
iv_offsetinnanos = 123
iv_timeinseconds = 123
)
)
)
io_datasetsource = new /aws1/cl_iosdatasetsource(
io_sourcedetail = new /aws1/cl_iossourcedetail(
io_kendra = new /aws1/cl_ioskendrasourcedetail(
iv_knowledgebasearn = |string|
iv_rolearn = |string|
)
)
iv_sourceformat = |string|
iv_sourcetype = |string|
)
it_metadata = VALUE /aws1/cl_iosmetadata_w=>tt_metadata(
(
VALUE /aws1/cl_iosmetadata_w=>ts_metadata_maprow(
key = |string|
value = new /aws1/cl_iosmetadata_w( |string| )
)
)
)
it_tags = VALUE /aws1/cl_iostagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_iostagmap_w=>ts_tagmap_maprow(
key = |string|
value = new /aws1/cl_iostagmap_w( |string| )
)
)
)
iv_clienttoken = |string|
iv_datasetdescription = |string|
iv_datasetid = |string|
iv_datasetname = |string|
iv_datasettype = |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_arn = lo_result->get_datasetarn( ).
lo_datasetstatus = lo_result->get_datasetstatus( ).
IF lo_datasetstatus IS NOT INITIAL.
lv_datasetstate = lo_datasetstatus->get_state( ).
lo_errordetails = lo_datasetstatus->get_error( ).
IF lo_errordetails IS NOT INITIAL.
lv_errorcode = lo_errordetails->get_code( ).
lv_errormessage = lo_errordetails->get_message( ).
LOOP AT lo_errordetails->get_details( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_detailederrorcode = lo_row_1->get_code( ).
lv_detailederrormessage = lo_row_1->get_message( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.