startImportTask method

Future<StartImportTaskOutput> startImportTask({
  1. required String graphIdentifier,
  2. required String roleArn,
  3. required String source,
  4. BlankNodeHandling? blankNodeHandling,
  5. bool? failOnError,
  6. Format? format,
  7. ImportOptions? importOptions,
  8. ParquetType? parquetType,
})

Import data into existing Neptune Analytics graph from Amazon Simple Storage Service (S3). The graph needs to be empty and in the AVAILABLE state.

May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter graphIdentifier : The unique identifier of the Neptune Analytics graph.

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

Parameter 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.

Parameter 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 is ntriples. For more information, see Handling RDF values.

Parameter 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.

Parameter format : Specifies the format of Amazon S3 data to be imported. Valid values are CSV, which identifies the Gremlin CSV format or OPENCYPHER, which identifies the openCypher load format.

Parameter parquetType : The parquet type of the import task.

Implementation

Future<StartImportTaskOutput> startImportTask({
  required String graphIdentifier,
  required String roleArn,
  required String source,
  BlankNodeHandling? blankNodeHandling,
  bool? failOnError,
  Format? format,
  ImportOptions? importOptions,
  ParquetType? parquetType,
}) async {
  final $payload = <String, dynamic>{
    'roleArn': roleArn,
    'source': source,
    if (blankNodeHandling != null)
      'blankNodeHandling': blankNodeHandling.value,
    if (failOnError != null) 'failOnError': failOnError,
    if (format != null) 'format': format.value,
    if (importOptions != null) 'importOptions': importOptions,
    if (parquetType != null) 'parquetType': parquetType.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/graphs/${Uri.encodeComponent(graphIdentifier)}/importtasks',
    endpoint: _resolveEndpoint(
      apiType: 'ControlPlane',
    ),
    exceptionFnMap: _exceptionFns,
  );
  return StartImportTaskOutput.fromJson(response);
}