GetImportTaskCommand

Retrieves a specified import task.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { NeptuneGraphClient, GetImportTaskCommand } from "@aws-sdk/client-neptune-graph"; // ES Modules import
// const { NeptuneGraphClient, GetImportTaskCommand } = require("@aws-sdk/client-neptune-graph"); // CommonJS import
const client = new NeptuneGraphClient(config);
const input = { // GetImportTaskInput
  taskIdentifier: "STRING_VALUE", // required
};
const command = new GetImportTaskCommand(input);
const response = await client.send(command);
// { // GetImportTaskOutput
//   graphId: "STRING_VALUE",
//   taskId: "STRING_VALUE", // required
//   source: "STRING_VALUE", // required
//   format: "CSV" || "OPEN_CYPHER" || "PARQUET" || "NTRIPLES",
//   parquetType: "COLUMNAR",
//   roleArn: "STRING_VALUE", // required
//   status: "INITIALIZING" || "EXPORTING" || "ANALYZING_DATA" || "IMPORTING" || "REPROVISIONING" || "ROLLING_BACK" || "SUCCEEDED" || "FAILED" || "CANCELLING" || "CANCELLED" || "DELETED", // required
//   importOptions: { // ImportOptions Union: only one key present
//     neptune: { // NeptuneImportOptions
//       s3ExportPath: "STRING_VALUE", // required
//       s3ExportKmsKeyId: "STRING_VALUE", // required
//       preserveDefaultVertexLabels: true || false,
//       preserveEdgeIds: true || false,
//     },
//   },
//   importTaskDetails: { // ImportTaskDetails
//     status: "STRING_VALUE", // required
//     startTime: new Date("TIMESTAMP"), // required
//     timeElapsedSeconds: Number("long"), // required
//     progressPercentage: Number("int"), // required
//     errorCount: Number("int"), // required
//     errorDetails: "STRING_VALUE",
//     statementCount: Number("long"), // required
//     dictionaryEntryCount: Number("long"), // required
//   },
//   attemptNumber: Number("int"),
//   statusReason: "STRING_VALUE",
// };

GetImportTaskCommand Input

See GetImportTaskCommandInput for more details

Parameter
Type
Description
taskIdentifier
Required
string | undefined

The unique identifier of the import task.

GetImportTaskCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
roleArn
Required
string | undefined

The ARN of the IAM role that will allow access to the data that is to be imported.

source
Required
string | undefined

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
Required
ImportTaskStatus | undefined

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.

taskId
Required
string | undefined

The unique identifier of the import task.

attemptNumber
number | undefined

The number of the current attempts to execute the import task.

format
Format | undefined

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 .

graphId
string | undefined

The unique identifier of the Neptune Analytics graph.

importOptions
ImportOptions | undefined

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.

importTaskDetails
ImportTaskDetails | undefined

Contains details about the specified import task.

parquetType
ParquetType | undefined

The parquet type of the import task.

statusReason
string | undefined

The reason that the import task has this status value.

Throws

Name
Fault
Details
InternalServerException
server

A failure occurred on the server.

ResourceNotFoundException
client

A specified resource could not be located.

ThrottlingException
client

The exception was interrupted by throttling.

ValidationException
client

A resource could not be validated.

NeptuneGraphServiceException
Base exception class for all service exceptions from NeptuneGraph service.