/AWS1/IF_NEG=>CREATEGRAPHUSINGIMPORTTASK()¶
About CreateGraphUsingImportTask¶
Creates a new Neptune Analytics graph and imports data into it, either from Amazon Simple Storage Service (S3) or from a Neptune database or a Neptune database snapshot.
The data can be loaded from files in S3 that in either the Gremlin CSV format or the openCypher load format.
Method Signature¶
METHODS /AWS1/IF_NEG~CREATEGRAPHUSINGIMPORTTASK
IMPORTING
!IV_GRAPHNAME TYPE /AWS1/NEGGRAPHNAME OPTIONAL
!IT_TAGS TYPE /AWS1/CL_NEGTAGMAP_W=>TT_TAGMAP OPTIONAL
!IV_PUBLICCONNECTIVITY TYPE /AWS1/NEGBOOLEAN OPTIONAL
!IV_KMSKEYIDENTIFIER TYPE /AWS1/NEGKMSKEYARN OPTIONAL
!IO_VECTORSEARCHCONFIGURATION TYPE REF TO /AWS1/CL_NEGVECTORSEARCHCONF OPTIONAL
!IV_REPLICACOUNT TYPE /AWS1/NEGREPLICACOUNT OPTIONAL
!IV_DELETIONPROTECTION TYPE /AWS1/NEGBOOLEAN OPTIONAL
!IO_IMPORTOPTIONS TYPE REF TO /AWS1/CL_NEGIMPORTOPTIONS OPTIONAL
!IV_MAXPROVISIONEDMEMORY TYPE /AWS1/NEGPROVISIONEDMEMORY OPTIONAL
!IV_MINPROVISIONEDMEMORY TYPE /AWS1/NEGPROVISIONEDMEMORY OPTIONAL
!IV_FAILONERROR TYPE /AWS1/NEGBOOLEAN OPTIONAL
!IV_SOURCE TYPE /AWS1/NEGSTRING OPTIONAL
!IV_FORMAT TYPE /AWS1/NEGFORMAT OPTIONAL
!IV_PARQUETTYPE TYPE /AWS1/NEGPARQUETTYPE OPTIONAL
!IV_BLANKNODEHANDLING TYPE /AWS1/NEGBLANKNODEHANDLING OPTIONAL
!IV_ROLEARN TYPE /AWS1/NEGROLEARN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_negcregraphusingimp01
RAISING
/AWS1/CX_NEGCONFLICTEXCEPTION
/AWS1/CX_NEGINTERNALSERVEREX
/AWS1/CX_NEGSERVICEQUOTAEXCDEX
/AWS1/CX_NEGTHROTTLINGEX
/AWS1/CX_NEGVALIDATIONEX
/AWS1/CX_NEGCLIENTEXC
/AWS1/CX_NEGSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_graphname TYPE /AWS1/NEGGRAPHNAME /AWS1/NEGGRAPHNAME¶
A name for the new Neptune Analytics graph to be created.
The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed.
iv_source TYPE /AWS1/NEGSTRING /AWS1/NEGSTRING¶
A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can point to a Neptune database endpoint or snapshot.
iv_rolearn TYPE /AWS1/NEGROLEARN /AWS1/NEGROLEARN¶
The ARN of the IAM role that will allow access to the data that is to be imported.
Optional arguments:¶
it_tags TYPE /AWS1/CL_NEGTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.
iv_publicconnectivity TYPE /AWS1/NEGBOOLEAN /AWS1/NEGBOOLEAN¶
Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. (
trueto enable, orfalseto disable).
iv_kmskeyidentifier TYPE /AWS1/NEGKMSKEYARN /AWS1/NEGKMSKEYARN¶
Specifies a KMS key to use to encrypt data imported into the new graph.
io_vectorsearchconfiguration TYPE REF TO /AWS1/CL_NEGVECTORSEARCHCONF /AWS1/CL_NEGVECTORSEARCHCONF¶
Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is specified as
dimension=value. Max = 65,535
iv_replicacount TYPE /AWS1/NEGREPLICACOUNT /AWS1/NEGREPLICACOUNT¶
The number of replicas in other AZs to provision on the new graph after import. Default = 0, Min = 0, Max = 2.
Additional charges equivalent to the m-NCUs selected for the graph apply for each replica.
iv_deletionprotection TYPE /AWS1/NEGBOOLEAN /AWS1/NEGBOOLEAN¶
Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion protection is enabled. (
trueorfalse).
io_importoptions TYPE REF TO /AWS1/CL_NEGIMPORTOPTIONS /AWS1/CL_NEGIMPORTOPTIONS¶
Contains options for controlling the import process. For example, if the
failOnErrorkey is set tofalse, the import skips problem data and attempts to continue (whereas if set totrue, the default, or if omitted, the import operation halts immediately when an error is encountered.
iv_maxprovisionedmemory TYPE /AWS1/NEGPROVISIONEDMEMORY /AWS1/NEGPROVISIONEDMEMORY¶
The maximum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: 1024, or the approved upper limit for your account.
If both the minimum and maximum values are specified, the final
provisioned-memorywill be chosen per the actual size of your imported data. If neither value is specified, 128 m-NCUs are used.
iv_minprovisionedmemory TYPE /AWS1/NEGPROVISIONEDMEMORY /AWS1/NEGPROVISIONEDMEMORY¶
The minimum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: 16
iv_failonerror TYPE /AWS1/NEGBOOLEAN /AWS1/NEGBOOLEAN¶
If set to
true, the task halts when an import error is encountered. If set tofalse, the task skips the data that caused the error and continues if possible.
iv_format TYPE /AWS1/NEGFORMAT /AWS1/NEGFORMAT¶
Specifies the format of S3 data to be imported. Valid values are
CSV, which identifies the Gremlin CSV format,OPEN_CYPHER, which identifies the openCypher load format, orntriples, which identifies the RDF n-triples format.
iv_parquettype TYPE /AWS1/NEGPARQUETTYPE /AWS1/NEGPARQUETTYPE¶
The parquet type of the import task.
iv_blanknodehandling TYPE /AWS1/NEGBLANKNODEHANDLING /AWS1/NEGBLANKNODEHANDLING¶
The method to handle blank nodes in the dataset. Currently, only
convertToIriis supported, meaning blank nodes are converted to unique IRIs at load time. Must be provided when format isntriples. For more information, see Handling RDF values.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_negcregraphusingimp01 /AWS1/CL_NEGCREGRAPHUSINGIMP01¶
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->creategraphusingimporttask(
io_importoptions = new /aws1/cl_negimportoptions(
io_neptune = new /aws1/cl_negneptuneimportopts(
iv_preservedefvertexlabels = ABAP_TRUE
iv_preserveedgeids = ABAP_TRUE
iv_s3exportkmskeyid = |string|
iv_s3exportpath = |string|
)
)
io_vectorsearchconfiguration = new /aws1/cl_negvectorsearchconf( 123 )
it_tags = VALUE /aws1/cl_negtagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_negtagmap_w=>ts_tagmap_maprow(
value = new /aws1/cl_negtagmap_w( |string| )
key = |string|
)
)
)
iv_blanknodehandling = |string|
iv_deletionprotection = ABAP_TRUE
iv_failonerror = ABAP_TRUE
iv_format = |string|
iv_graphname = |string|
iv_kmskeyidentifier = |string|
iv_maxprovisionedmemory = 123
iv_minprovisionedmemory = 123
iv_parquettype = |string|
iv_publicconnectivity = ABAP_TRUE
iv_replicacount = 123
iv_rolearn = |string|
iv_source = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_graphid = lo_result->get_graphid( ).
lv_taskid = lo_result->get_taskid( ).
lv_string = lo_result->get_source( ).
lv_format = lo_result->get_format( ).
lv_parquettype = lo_result->get_parquettype( ).
lv_rolearn = lo_result->get_rolearn( ).
lv_importtaskstatus = lo_result->get_status( ).
lo_importoptions = lo_result->get_importoptions( ).
IF lo_importoptions IS NOT INITIAL.
lo_neptuneimportoptions = lo_importoptions->get_neptune( ).
IF lo_neptuneimportoptions IS NOT INITIAL.
lv_string = lo_neptuneimportoptions->get_s3exportpath( ).
lv_string = lo_neptuneimportoptions->get_s3exportkmskeyid( ).
lv_boolean = lo_neptuneimportoptions->get_preservedefvertexlabels( ).
lv_boolean = lo_neptuneimportoptions->get_preserveedgeids( ).
ENDIF.
ENDIF.
ENDIF.