/AWS1/IF_ATH=>IMPORTNOTEBOOK()¶
About ImportNotebook¶
Imports a single ipynb file to a Spark enabled workgroup. To import the
notebook, the request must specify a value for either Payload or
NoteBookS3LocationUri. If neither is specified or both are specified,
an InvalidRequestException occurs. The maximum file size that can be
imported is 10 megabytes. If an ipynb file with the same name already
exists in the workgroup, throws an error.
Method Signature¶
METHODS /AWS1/IF_ATH~IMPORTNOTEBOOK
IMPORTING
!IV_WORKGROUP TYPE /AWS1/ATHWORKGROUPNAME OPTIONAL
!IV_NAME TYPE /AWS1/ATHNOTEBOOKNAME OPTIONAL
!IV_PAYLOAD TYPE /AWS1/ATHPAYLOAD OPTIONAL
!IV_TYPE TYPE /AWS1/ATHNOTEBOOKTYPE OPTIONAL
!IV_NOTEBOOKS3LOCATIONURI TYPE /AWS1/ATHS3URI OPTIONAL
!IV_CLIENTREQUESTTOKEN TYPE /AWS1/ATHCLIENTREQUESTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_athimpnotebookoutput
RAISING
/AWS1/CX_ATHINTERNALSERVEREX
/AWS1/CX_ATHINVALIDREQUESTEX
/AWS1/CX_ATHTOOMANYREQUESTSEX
/AWS1/CX_ATHCLIENTEXC
/AWS1/CX_ATHSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_workgroup TYPE /AWS1/ATHWORKGROUPNAME /AWS1/ATHWORKGROUPNAME¶
The name of the Spark enabled workgroup to import the notebook to.
iv_name TYPE /AWS1/ATHNOTEBOOKNAME /AWS1/ATHNOTEBOOKNAME¶
The name of the notebook to import.
iv_type TYPE /AWS1/ATHNOTEBOOKTYPE /AWS1/ATHNOTEBOOKTYPE¶
The notebook content type. Currently, the only valid type is
IPYNB.
Optional arguments:¶
iv_payload TYPE /AWS1/ATHPAYLOAD /AWS1/ATHPAYLOAD¶
The notebook content to be imported. The payload must be in
ipynbformat.
iv_notebooks3locationuri TYPE /AWS1/ATHS3URI /AWS1/ATHS3URI¶
A URI that specifies the Amazon S3 location of a notebook file in
ipynbformat.
iv_clientrequesttoken TYPE /AWS1/ATHCLIENTREQUESTTOKEN /AWS1/ATHCLIENTREQUESTTOKEN¶
A unique case-sensitive string used to ensure the request to import the notebook is idempotent (executes only once).
This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for you. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_athimpnotebookoutput /AWS1/CL_ATHIMPNOTEBOOKOUTPUT¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
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->importnotebook(
iv_clientrequesttoken = |string|
iv_name = |string|
iv_notebooks3locationuri = |string|
iv_payload = |string|
iv_type = |string|
iv_workgroup = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_notebookid = lo_result->get_notebookid( ).
ENDIF.