StartImportTask
Import data into existing Neptune Analytics graph from Amazon Simple Storage Service (S3). The graph needs to be empty and in the AVAILABLE state.
Request Syntax
POST /graphs/graphIdentifier
/importtasks HTTP/1.1
Content-type: application/json
{
"blankNodeHandling": "string
",
"failOnError": boolean
,
"format": "string
",
"importOptions": { ... },
"roleArn": "string
",
"source": "string
"
}
URI Request Parameters
The request uses the following URI parameters.
- graphIdentifier
-
The unique identifier of the Neptune Analytics graph.
Pattern:
g-[a-z0-9]{10}
Required: Yes
Request Body
The request accepts the following data in JSON format.
- blankNodeHandling
-
The method to handle blank nodes in the dataset. Currently, only
convertToIri
is 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.Type: String
Valid Values:
convertToIri
Required: No
- failOnError
-
If set to true, the task halts when an import error is encountered. If set to false, the task skips the data that caused the error and continues if possible.
Type: Boolean
Required: No
- format
-
Specifies the format of Amazon S3 data to be imported. Valid values are CSV, which identifies the Gremlin CSV format or OPENCYPHER, which identies the openCypher load format.
Type: String
Valid Values:
CSV | OPEN_CYPHER | NTRIPLES
Required: No
- importOptions
-
Options for how to perform an import.
Type: ImportOptions object
Note: This object is a Union. Only one member of this object can be specified or returned.
Required: No
- roleArn
-
The ARN of the IAM role that will allow access to the data that is to be imported.
Type: String
Pattern:
arn:aws[^:]*:iam::\d{12}:(role|role/service-role)/[\w+=,.@-]*
Required: Yes
- source
-
A URL identifying 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.
Type: String
Required: Yes
Response Syntax
HTTP/1.1 201
Content-type: application/json
{
"format": "string",
"graphId": "string",
"importOptions": { ... },
"roleArn": "string",
"source": "string",
"status": "string",
"taskId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 201 response.
The following data is returned in JSON format by the service.
- format
-
Specifies the format of Amazon S3 data to be imported. Valid values are CSV, which identifies the Gremlin CSV format or OPENCYPHER, which identies the openCypher load format.
Type: String
Valid Values:
CSV | OPEN_CYPHER | NTRIPLES
- graphId
-
The unique identifier of the Neptune Analytics graph.
Type: String
Pattern:
g-[a-z0-9]{10}
- importOptions
-
Options for how to perform an import.
Type: ImportOptions object
Note: This object is a Union. Only one member of this object can be specified or returned.
- roleArn
-
The ARN of the IAM role that will allow access to the data that is to be imported.
Type: String
Pattern:
arn:aws[^:]*:iam::\d{12}:(role|role/service-role)/[\w+=,.@-]*
- source
-
A URL identifying 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.
Type: String
- status
-
The status of the import task.
Type: String
Valid Values:
INITIALIZING | EXPORTING | ANALYZING_DATA | IMPORTING | REPROVISIONING | ROLLING_BACK | SUCCEEDED | FAILED | CANCELLING | CANCELLED
- taskId
-
The unique identifier of the import task.
Type: String
Pattern:
t-[a-z0-9]{10}
Errors
For information about the errors that are common to all actions, see Common Errors.
- ConflictException
-
Raised when a conflict is encountered.
HTTP Status Code: 409
- InternalServerException
-
A failure occurred on the server.
HTTP Status Code: 500
- ResourceNotFoundException
-
A specified resource could not be located.
HTTP Status Code: 404
- ThrottlingException
-
The exception was interrupted by throttling.
HTTP Status Code: 429
- ValidationException
-
A resource could not be validated.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: