/AWS1/IF_BDO=>CREATEDATASET()¶
About CreateDataset¶
Creates a new dataset resource asynchronously. Returns immediately with status CREATING. Poll GetDataset until status transitions to ACTIVE or CREATE_FAILED.
Method Signature¶
METHODS /AWS1/IF_BDO~CREATEDATASET
IMPORTING
!IV_CLIENTTOKEN TYPE /AWS1/BDOCLIENTTOKEN OPTIONAL
!IV_DATASETNAME TYPE /AWS1/BDODATASETNAME OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/BDOSTRING OPTIONAL
!IO_SOURCE TYPE REF TO /AWS1/CL_BDODATASOURCETYPE OPTIONAL
!IV_SCHEMATYPE TYPE /AWS1/BDODATASETSCHEMATYPE OPTIONAL
!IV_KMSKEYARN TYPE /AWS1/BDOKMSKEYARN OPTIONAL
!IT_TAGS TYPE /AWS1/CL_BDOTAGSMAP_W=>TT_TAGSMAP OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdocreatedatasetrsp
RAISING
/AWS1/CX_BDOACCESSDENIEDEX
/AWS1/CX_BDOCONFLICTEXCEPTION
/AWS1/CX_BDOINTERNALSERVEREX
/AWS1/CX_BDOSERVICEQUOTAEXCDEX
/AWS1/CX_BDOTHROTTLINGEX
/AWS1/CX_BDOVALIDATIONEX
/AWS1/CX_BDOCLIENTEXC
/AWS1/CX_BDOSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_datasetname TYPE /AWS1/BDODATASETNAME /AWS1/BDODATASETNAME¶
Human-readable name for the dataset. Must be unique within the account. Immutable after creation.
io_source TYPE REF TO /AWS1/CL_BDODATASOURCETYPE /AWS1/CL_BDODATASOURCETYPE¶
Source of initial examples. Provide either inline examples or an S3 URI pointing to a JSONL file.
iv_schematype TYPE /AWS1/BDODATASETSCHEMATYPE /AWS1/BDODATASETSCHEMATYPE¶
Versioned schema type governing the structure of examples. Immutable after creation.
Optional arguments:¶
iv_clienttoken TYPE /AWS1/BDOCLIENTTOKEN /AWS1/BDOCLIENTTOKEN¶
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.
iv_description TYPE /AWS1/BDOSTRING /AWS1/BDOSTRING¶
A description of the dataset.
iv_kmskeyarn TYPE /AWS1/BDOKMSKEYARN /AWS1/BDOKMSKEYARN¶
Optional KMS key ARN for server-side encryption on service Amazon S3 writes.
it_tags TYPE /AWS1/CL_BDOTAGSMAP_W=>TT_TAGSMAP TT_TAGSMAP¶
A map of tag keys and values to assign to the dataset.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bdocreatedatasetrsp /AWS1/CL_BDOCREATEDATASETRSP¶
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_source = new /aws1/cl_bdodatasourcetype(
io_inlineexamples = new /aws1/cl_bdoinlineexmplssource(
it_examples = VALUE /aws1/cl_rt_document=>tt_list(
( /AWS1/CL_RT_DOCUMENT=>FROM_JSON_STR( |\{"foo":"this is a JSON object..."\}| ) )
)
)
io_s3source = new /aws1/cl_bdos3source( |string| )
)
it_tags = VALUE /aws1/cl_bdotagsmap_w=>tt_tagsmap(
(
VALUE /aws1/cl_bdotagsmap_w=>ts_tagsmap_maprow(
key = |string|
value = new /aws1/cl_bdotagsmap_w( |string| )
)
)
)
iv_clienttoken = |string|
iv_datasetname = |string|
iv_description = |string|
iv_kmskeyarn = |string|
iv_schematype = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_datasetarn = lo_result->get_datasetarn( ).
lv_datasetid = lo_result->get_datasetid( ).
lv_datasetstatus = lo_result->get_status( ).
lv_timestamp = lo_result->get_createdat( ).
ENDIF.