import_tasks
Creates, updates, deletes, gets or lists an import_tasks resource.
Overview
| Name | import_tasks |
| Type | Resource |
| Id | aws.neptune_graph.import_tasks |
Fields
The following fields are returned by SELECT queries:
- get_import_task
- list_import_tasks
| Name | Datatype | Description |
|---|---|---|
attempt_number | integer | The number of the current attempts to execute the import task. |
format_ | string | Specifies 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_id | string | The unique identifier of the Neptune Analytics graph. (pattern: <code>g-[a-z0-9]{10}</code>) |
import_options | object | Contains 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_details | object | Contains details about the specified import task. |
parquet_type | string | The parquet type of the import task. (COLUMNAR) |
role_arn | string | The 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>) |
source | string | 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 |
status | string | The 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_reason | string | The reason that the import task has this status value. |
task_id | string | The unique identifier of the import task. (pattern: <code>t-[a-z0-9]{10}</code>) |
| Name | Datatype | Description |
|---|---|---|
format_ | string | Specifies the format of S3 data to be imported. Valid values are CSV, which identifies the Gremlin CSV format or OPENCYPHER, which identies the openCypher load format. (CSV, OPEN_CYPHER, PARQUET, NTRIPLES) |
graph_id | string | The unique identifier of the Neptune Analytics graph. (pattern: <code>g-[a-z0-9]{10}</code>) |
parquet_type | string | The parquet type of the import task. (COLUMNAR) |
role_arn | string | The 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>) |
source | string | 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 |
status | string | Status of the import task. (INITIALIZING, EXPORTING, ANALYZING_DATA, IMPORTING, REPROVISIONING, ROLLING_BACK, SUCCEEDED, FAILED, CANCELLING, CANCELLED, DELETED) |
task_id | string | The unique identifier of the import task. (pattern: <code>t-[a-z0-9]{10}</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_import_task | select | task_identifier, region | Retrieves a specified import task. | |
list_import_tasks | select | region | nextToken, maxResults | Lists import tasks. |
create_graph_using_import_task | insert | region, graphName, source, roleArn | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
task_identifier | string | The unique identifier of the import task. |
maxResults | integer | The 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. |
nextToken | string | Pagination 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
- get_import_task
- list_import_tasks
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
;
Lists import tasks.
SELECT
format_,
graph_id,
parquet_type,
role_arn,
source,
status,
task_id
FROM aws.neptune_graph.import_tasks
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_graph_using_import_task
- Manifest
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
;
# Description fields are for documentation purposes
- name: import_tasks
props:
- name: region
value: "{{ region }}"
description: Required parameter for the import_tasks resource.
- name: graphName
value: "{{ graphName }}"
- name: tags
value: "{{ tags }}"
- name: publicConnectivity
value: {{ publicConnectivity }}
- name: kmsKeyIdentifier
value: "{{ kmsKeyIdentifier }}"
- name: vectorSearchConfiguration
description: |
Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535
value:
dimension: {{ dimension }}
- name: replicaCount
value: {{ replicaCount }}
- name: deletionProtection
value: {{ deletionProtection }}
- name: importOptions
description: |
Options for how to perform an import.
value:
neptune:
s3ExportPath: "{{ s3ExportPath }}"
s3ExportKmsKeyId: "{{ s3ExportKmsKeyId }}"
preserveDefaultVertexLabels: {{ preserveDefaultVertexLabels }}
preserveEdgeIds: {{ preserveEdgeIds }}
- name: maxProvisionedMemory
value: {{ maxProvisionedMemory }}
- name: minProvisionedMemory
value: {{ minProvisionedMemory }}
- name: failOnError
value: {{ failOnError }}
- name: source
value: "{{ source }}"
- name: format
value: "{{ format }}"
valid_values: ['CSV', 'OPEN_CYPHER', 'PARQUET', 'NTRIPLES']
- name: parquetType
value: "{{ parquetType }}"
valid_values: ['COLUMNAR']
- name: blankNodeHandling
value: "{{ blankNodeHandling }}"
valid_values: ['convertToIri']
- name: roleArn
value: "{{ roleArn }}"