Skip to content

Commit

Permalink
feat(client-neptune-graph): Amazon Neptune Analytics provides a new o…
Browse files Browse the repository at this point in the history
…ption for customers to load data into a graph using the RDF (Resource Description Framework) NTRIPLES format. When loading NTRIPLES files, use the value `convertToIri` for the `blankNodeHandling` parameter.
  • Loading branch information
awstools committed Aug 13, 2024
1 parent d69b927 commit 223369d
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface CancelImportTaskCommandOutput extends CancelImportTaskOutput, _
* // graphId: "STRING_VALUE",
* // taskId: "STRING_VALUE", // required
* // source: "STRING_VALUE", // required
* // format: "CSV" || "OPEN_CYPHER",
* // format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
* // roleArn: "STRING_VALUE", // required
* // status: "INITIALIZING" || "EXPORTING" || "ANALYZING_DATA" || "IMPORTING" || "REPROVISIONING" || "ROLLING_BACK" || "SUCCEEDED" || "FAILED" || "CANCELLING" || "CANCELLED", // required
* // };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ export interface CreateGraphUsingImportTaskCommandOutput extends CreateGraphUsin
* minProvisionedMemory: Number("int"),
* failOnError: true || false,
* source: "STRING_VALUE", // required
* format: "CSV" || "OPEN_CYPHER",
* format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
* blankNodeHandling: "convertToIri",
* roleArn: "STRING_VALUE", // required
* };
* const command = new CreateGraphUsingImportTaskCommand(input);
Expand All @@ -72,7 +73,7 @@ export interface CreateGraphUsingImportTaskCommandOutput extends CreateGraphUsin
* // graphId: "STRING_VALUE",
* // taskId: "STRING_VALUE", // required
* // source: "STRING_VALUE", // required
* // format: "CSV" || "OPEN_CYPHER",
* // format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
* // roleArn: "STRING_VALUE", // required
* // status: "INITIALIZING" || "EXPORTING" || "ANALYZING_DATA" || "IMPORTING" || "REPROVISIONING" || "ROLLING_BACK" || "SUCCEEDED" || "FAILED" || "CANCELLING" || "CANCELLED", // required
* // importOptions: { // ImportOptions Union: only one key present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface GetImportTaskCommandOutput extends GetImportTaskOutput, __Metad
* // graphId: "STRING_VALUE",
* // taskId: "STRING_VALUE", // required
* // source: "STRING_VALUE", // required
* // format: "CSV" || "OPEN_CYPHER",
* // format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
* // roleArn: "STRING_VALUE", // required
* // status: "INITIALIZING" || "EXPORTING" || "ANALYZING_DATA" || "IMPORTING" || "REPROVISIONING" || "ROLLING_BACK" || "SUCCEEDED" || "FAILED" || "CANCELLING" || "CANCELLED", // required
* // importOptions: { // ImportOptions Union: only one key present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface ListImportTasksCommandOutput extends ListImportTasksOutput, __M
* // graphId: "STRING_VALUE",
* // taskId: "STRING_VALUE", // required
* // source: "STRING_VALUE", // required
* // format: "CSV" || "OPEN_CYPHER",
* // format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
* // roleArn: "STRING_VALUE", // required
* // status: "INITIALIZING" || "EXPORTING" || "ANALYZING_DATA" || "IMPORTING" || "REPROVISIONING" || "ROLLING_BACK" || "SUCCEEDED" || "FAILED" || "CANCELLING" || "CANCELLED", // required
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export interface StartImportTaskCommandOutput extends StartImportTaskOutput, __M
* },
* failOnError: true || false,
* source: "STRING_VALUE", // required
* format: "CSV" || "OPEN_CYPHER",
* format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
* blankNodeHandling: "convertToIri",
* graphIdentifier: "STRING_VALUE", // required
* roleArn: "STRING_VALUE", // required
* };
Expand All @@ -56,7 +57,7 @@ export interface StartImportTaskCommandOutput extends StartImportTaskOutput, __M
* // graphId: "STRING_VALUE",
* // taskId: "STRING_VALUE", // required
* // source: "STRING_VALUE", // required
* // format: "CSV" || "OPEN_CYPHER",
* // format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
* // roleArn: "STRING_VALUE", // required
* // status: "INITIALIZING" || "EXPORTING" || "ANALYZING_DATA" || "IMPORTING" || "REPROVISIONING" || "ROLLING_BACK" || "SUCCEEDED" || "FAILED" || "CANCELLING" || "CANCELLED", // required
* // importOptions: { // ImportOptions Union: only one key present
Expand Down
35 changes: 33 additions & 2 deletions clients/client-neptune-graph/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2295,6 +2295,7 @@ export interface CancelImportTaskInput {
*/
export const Format = {
CSV: "CSV",
NTRIPLES: "NTRIPLES",
OPEN_CYPHER: "OPEN_CYPHER",
} as const;

Expand Down Expand Up @@ -2370,6 +2371,19 @@ export interface CancelImportTaskOutput {
status: ImportTaskStatus | undefined;
}

/**
* @public
* @enum
*/
export const BlankNodeHandling = {
CONVERT_TO_IRI: "convertToIri",
} as const;

/**
* @public
*/
export type BlankNodeHandling = (typeof BlankNodeHandling)[keyof typeof BlankNodeHandling];

/**
* <p>Options for how to import Neptune data.</p>
* @public
Expand Down Expand Up @@ -2551,6 +2565,14 @@ export interface CreateGraphUsingImportTaskInput {
*/
format?: Format;

/**
* <p>The method to handle blank nodes in the dataset. Currently, only <code>convertToIri</code> is supported,
* meaning blank nodes are converted to unique IRIs at load time. Must be provided when format is <code>ntriples</code>.
* For more information, see <a href="https://docs.aws.amazon.com/neptune-analytics/latest/userguide/using-rdf-data.html#rdf-handling">Handling RDF values</a>.</p>
* @public
*/
blankNodeHandling?: BlankNodeHandling;

/**
* <p>The ARN of the IAM role that will allow access to the data that is to be imported.</p>
* @public
Expand Down Expand Up @@ -2584,8 +2606,9 @@ export interface CreateGraphUsingImportTaskOutput {
/**
* <p>Specifies the format of S3 data to be imported. Valid values are <code>CSV</code>, which identifies
* the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html">Gremlin
* CSV format</a> or <code>OPENCYPHER</code>, which identies the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-opencypher.html">openCypher
* load format</a>.</p>
* CSV format</a>, <code>OPENCYPHER</code>, which identifies the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-opencypher.html">openCypher
* load format</a>, or <code>ntriples</code>, which identifies the
* <a href="https://docs.aws.amazon.com/neptune-analytics/latest/userguide/using-rdf-data.html">RDF n-triples</a> format.</p>
* @public
*/
format?: Format;
Expand Down Expand Up @@ -2928,6 +2951,14 @@ export interface StartImportTaskInput {
*/
format?: Format;

/**
* <p>The method to handle blank nodes in the dataset. Currently, only <code>convertToIri</code> is supported,
* meaning blank nodes are converted to unique IRIs at load time. Must be provided when format is <code>ntriples</code>.
* For more information, see <a href="https://docs.aws.amazon.com/neptune-analytics/latest/userguide/using-rdf-data.html#rdf-handling">Handling RDF values</a>.</p>
* @public
*/
blankNodeHandling?: BlankNodeHandling;

/**
* <p>The unique identifier of the Neptune Analytics graph.</p>
* @public
Expand Down
2 changes: 2 additions & 0 deletions clients/client-neptune-graph/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ export const se_CreateGraphUsingImportTaskCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
blankNodeHandling: [],
deletionProtection: [],
failOnError: [],
format: [],
Expand Down Expand Up @@ -682,6 +683,7 @@ export const se_StartImportTaskCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
blankNodeHandling: [],
failOnError: [],
format: [],
importOptions: (_) => _json(_),
Expand Down
31 changes: 30 additions & 1 deletion codegen/sdk-codegen/aws-models/neptune-graph.json
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,17 @@
"smithy.api#pattern": "^arn:.+$"
}
},
"com.amazonaws.neptunegraph#BlankNodeHandling": {
"type": "enum",
"members": {
"CONVERT_TO_IRI": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "convertToIri"
}
}
}
},
"com.amazonaws.neptunegraph#CancelImportTask": {
"type": "operation",
"input": {
Expand Down Expand Up @@ -2187,6 +2198,12 @@
"smithy.api#documentation": "<p>Specifies the format of S3 data to be imported. Valid values are <code>CSV</code>, which identifies\n the <a href=\"https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html\">Gremlin\n CSV format</a> or <code>OPENCYPHER</code>, which identies the <a href=\"https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-opencypher.html\">openCypher\n load format</a>.</p>"
}
},
"blankNodeHandling": {
"target": "com.amazonaws.neptunegraph#BlankNodeHandling",
"traits": {
"smithy.api#documentation": "<p>The method to handle blank nodes in the dataset. Currently, only <code>convertToIri</code> is supported, \n meaning blank nodes are converted to unique IRIs at load time. Must be provided when format is <code>ntriples</code>. \n For more information, see <a href=\"https://docs.aws.amazon.com/neptune-analytics/latest/userguide/using-rdf-data.html#rdf-handling\">Handling RDF values</a>.</p>"
}
},
"roleArn": {
"target": "com.amazonaws.neptunegraph#RoleArn",
"traits": {
Expand Down Expand Up @@ -2225,7 +2242,7 @@
"format": {
"target": "com.amazonaws.neptunegraph#Format",
"traits": {
"smithy.api#documentation": "<p>Specifies the format of S3 data to be imported. Valid values are <code>CSV</code>, which identifies\n the <a href=\"https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html\">Gremlin\n CSV format</a> or <code>OPENCYPHER</code>, which identies the <a href=\"https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-opencypher.html\">openCypher\n load format</a>.</p>"
"smithy.api#documentation": "<p>Specifies the format of S3 data to be imported. Valid values are <code>CSV</code>, which identifies\n the <a href=\"https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html\">Gremlin\n CSV format</a>, <code>OPENCYPHER</code>, which identifies the <a href=\"https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-opencypher.html\">openCypher\n load format</a>, or <code>ntriples</code>, which identifies the\n <a href=\"https://docs.aws.amazon.com/neptune-analytics/latest/userguide/using-rdf-data.html\">RDF n-triples</a> format.</p>"
}
},
"roleArn": {
Expand Down Expand Up @@ -2932,6 +2949,12 @@
"traits": {
"smithy.api#enumValue": "OPEN_CYPHER"
}
},
"NTRIPLES": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "NTRIPLES"
}
}
}
},
Expand Down Expand Up @@ -5912,6 +5935,12 @@
"smithy.api#documentation": "<p>Specifies the format of Amazon S3 data to be imported. Valid values are CSV, which identifies the Gremlin CSV format or \n OPENCYPHER, which identies the openCypher load format.</p>"
}
},
"blankNodeHandling": {
"target": "com.amazonaws.neptunegraph#BlankNodeHandling",
"traits": {
"smithy.api#documentation": "<p>The method to handle blank nodes in the dataset. Currently, only <code>convertToIri</code> is supported, \n meaning blank nodes are converted to unique IRIs at load time. Must be provided when format is <code>ntriples</code>. \n For more information, see <a href=\"https://docs.aws.amazon.com/neptune-analytics/latest/userguide/using-rdf-data.html#rdf-handling\">Handling RDF values</a>.</p>"
}
},
"graphIdentifier": {
"target": "com.amazonaws.neptunegraph#GraphIdentifier",
"traits": {
Expand Down

0 comments on commit 223369d

Please sign in to comment.