Skip to main content

import_tasks

Creates, updates, deletes, gets or lists an import_tasks resource.

Overview

Nameimport_tasks
TypeResource
Idaws.neptune_graph.import_tasks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
attempt_numberintegerThe number of the current attempts to execute the import task.
format_stringSpecifies the format of S3 data to be imported. Valid values are CSV, which identifies the Gremlin CSV format or OPENCYPHER, which identifies the openCypher load format. (CSV, OPEN_CYPHER, PARQUET, NTRIPLES)
graph_idstringThe unique identifier of the Neptune Analytics graph. (pattern: <code>g-[a-z0-9]{10}</code>)
import_optionsobjectContains options for controlling the import process. For example, if the failOnError key is set to false, the import skips problem data and attempts to continue (whereas if set to true, the default, or if omitted, the import operation halts immediately when an error is encountered.
import_task_detailsobjectContains details about the specified import task.
parquet_typestringThe parquet type of the import task. (COLUMNAR)
role_arnstringThe ARN of the IAM role that will allow access to the data that is to be imported. (pattern: <code>arn:aws[^:]*:iam::\d{12}:(role|role/service-role)(/[\w+=,.@-]+)+</code>)
sourcestringA 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
statusstringThe status of the import task: INITIALIZING – The necessary resources needed to create the graph are being prepared. ANALYZING_DATA – The data is being analyzed to determine the optimal infrastructure configuration for the new graph. RE_PROVISIONING – The data did not fit into the provisioned graph, so it is being re-provisioned with more capacity. IMPORTING – The data is being loaded. ERROR_ENCOUNTERED – An error has been encountered while trying to create the graph and import the data. ERROR_ENCOUNTERED_ROLLING_BACK – Because of the error that was encountered, the graph is being rolled back and all its resources released. SUCCEEDED – Graph creation and data loading succeeded. FAILED – Graph creation or data loading failed. When the status is FAILED, you can use get-graphs to get more information about the state of the graph. CANCELLING – Because you cancelled the import task, cancellation is in progress. CANCELLED – You have successfully cancelled the import task. (INITIALIZING, EXPORTING, ANALYZING_DATA, IMPORTING, REPROVISIONING, ROLLING_BACK, SUCCEEDED, FAILED, CANCELLING, CANCELLED, DELETED)
status_reasonstringThe reason that the import task has this status value.
task_idstringThe unique identifier of the import task. (pattern: <code>t-[a-z0-9]{10}</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_import_taskselecttask_identifier, regionRetrieves a specified import task.
list_import_tasksselectregionnextToken, maxResultsLists import tasks.
create_graph_using_import_taskinsertregion, graphName, source, roleArnCreates 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
task_identifierstringThe unique identifier of the import task.
maxResultsintegerThe total number of records to return in the command's output. If the total number of records available is more than the value specified, nextToken is provided in the command's output. To resume pagination, provide the nextToken output value in the nextToken argument of a subsequent command. Do not use the nextToken response element directly outside of the Amazon CLI.
nextTokenstringPagination token used to paginate output. When this value is provided as input, the service returns results from where the previous response left off. When this value is present in output, it indicates that there are more results to retrieve.

SELECT examples

Retrieves a specified import task.

SELECT
attempt_number,
format_,
graph_id,
import_options,
import_task_details,
parquet_type,
role_arn,
source,
status,
status_reason,
task_id
FROM aws.neptune_graph.import_tasks
WHERE task_identifier = '{{ task_identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

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.

INSERT INTO aws.neptune_graph.import_tasks (
graphName,
tags,
publicConnectivity,
kmsKeyIdentifier,
vectorSearchConfiguration,
replicaCount,
deletionProtection,
importOptions,
maxProvisionedMemory,
minProvisionedMemory,
failOnError,
source,
format,
parquetType,
blankNodeHandling,
roleArn,
region
)
SELECT
'{{ graphName }}' /* required */,
'{{ tags }}',
{{ publicConnectivity }},
'{{ kmsKeyIdentifier }}',
'{{ vectorSearchConfiguration }}',
{{ replicaCount }},
{{ deletionProtection }},
'{{ importOptions }}',
{{ maxProvisionedMemory }},
{{ minProvisionedMemory }},
{{ failOnError }},
'{{ source }}' /* required */,
'{{ format }}',
'{{ parquetType }}',
'{{ blankNodeHandling }}',
'{{ roleArn }}' /* required */,
'{{ region }}'
RETURNING
format_,
graph_id,
import_options,
parquet_type,
role_arn,
source,
status,
task_id
;