Skip to content

Commit 223369d

Browse files
author
awstools
committed
feat(client-neptune-graph): Amazon Neptune Analytics provides a new option 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.
1 parent d69b927 commit 223369d

File tree

8 files changed

+74
-10
lines changed

8 files changed

+74
-10
lines changed

clients/client-neptune-graph/src/commands/CancelImportTaskCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface CancelImportTaskCommandOutput extends CancelImportTaskOutput, _
4444
* // graphId: "STRING_VALUE",
4545
* // taskId: "STRING_VALUE", // required
4646
* // source: "STRING_VALUE", // required
47-
* // format: "CSV" || "OPEN_CYPHER",
47+
* // format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
4848
* // roleArn: "STRING_VALUE", // required
4949
* // status: "INITIALIZING" || "EXPORTING" || "ANALYZING_DATA" || "IMPORTING" || "REPROVISIONING" || "ROLLING_BACK" || "SUCCEEDED" || "FAILED" || "CANCELLING" || "CANCELLED", // required
5050
* // };

clients/client-neptune-graph/src/commands/CreateGraphUsingImportTaskCommand.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ export interface CreateGraphUsingImportTaskCommandOutput extends CreateGraphUsin
6363
* minProvisionedMemory: Number("int"),
6464
* failOnError: true || false,
6565
* source: "STRING_VALUE", // required
66-
* format: "CSV" || "OPEN_CYPHER",
66+
* format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
67+
* blankNodeHandling: "convertToIri",
6768
* roleArn: "STRING_VALUE", // required
6869
* };
6970
* const command = new CreateGraphUsingImportTaskCommand(input);
@@ -72,7 +73,7 @@ export interface CreateGraphUsingImportTaskCommandOutput extends CreateGraphUsin
7273
* // graphId: "STRING_VALUE",
7374
* // taskId: "STRING_VALUE", // required
7475
* // source: "STRING_VALUE", // required
75-
* // format: "CSV" || "OPEN_CYPHER",
76+
* // format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
7677
* // roleArn: "STRING_VALUE", // required
7778
* // status: "INITIALIZING" || "EXPORTING" || "ANALYZING_DATA" || "IMPORTING" || "REPROVISIONING" || "ROLLING_BACK" || "SUCCEEDED" || "FAILED" || "CANCELLING" || "CANCELLED", // required
7879
* // importOptions: { // ImportOptions Union: only one key present

clients/client-neptune-graph/src/commands/GetImportTaskCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface GetImportTaskCommandOutput extends GetImportTaskOutput, __Metad
4444
* // graphId: "STRING_VALUE",
4545
* // taskId: "STRING_VALUE", // required
4646
* // source: "STRING_VALUE", // required
47-
* // format: "CSV" || "OPEN_CYPHER",
47+
* // format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
4848
* // roleArn: "STRING_VALUE", // required
4949
* // status: "INITIALIZING" || "EXPORTING" || "ANALYZING_DATA" || "IMPORTING" || "REPROVISIONING" || "ROLLING_BACK" || "SUCCEEDED" || "FAILED" || "CANCELLING" || "CANCELLED", // required
5050
* // importOptions: { // ImportOptions Union: only one key present

clients/client-neptune-graph/src/commands/ListImportTasksCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface ListImportTasksCommandOutput extends ListImportTasksOutput, __M
4747
* // graphId: "STRING_VALUE",
4848
* // taskId: "STRING_VALUE", // required
4949
* // source: "STRING_VALUE", // required
50-
* // format: "CSV" || "OPEN_CYPHER",
50+
* // format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
5151
* // roleArn: "STRING_VALUE", // required
5252
* // status: "INITIALIZING" || "EXPORTING" || "ANALYZING_DATA" || "IMPORTING" || "REPROVISIONING" || "ROLLING_BACK" || "SUCCEEDED" || "FAILED" || "CANCELLING" || "CANCELLED", // required
5353
* // },

clients/client-neptune-graph/src/commands/StartImportTaskCommand.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ export interface StartImportTaskCommandOutput extends StartImportTaskOutput, __M
4646
* },
4747
* failOnError: true || false,
4848
* source: "STRING_VALUE", // required
49-
* format: "CSV" || "OPEN_CYPHER",
49+
* format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
50+
* blankNodeHandling: "convertToIri",
5051
* graphIdentifier: "STRING_VALUE", // required
5152
* roleArn: "STRING_VALUE", // required
5253
* };
@@ -56,7 +57,7 @@ export interface StartImportTaskCommandOutput extends StartImportTaskOutput, __M
5657
* // graphId: "STRING_VALUE",
5758
* // taskId: "STRING_VALUE", // required
5859
* // source: "STRING_VALUE", // required
59-
* // format: "CSV" || "OPEN_CYPHER",
60+
* // format: "CSV" || "OPEN_CYPHER" || "NTRIPLES",
6061
* // roleArn: "STRING_VALUE", // required
6162
* // status: "INITIALIZING" || "EXPORTING" || "ANALYZING_DATA" || "IMPORTING" || "REPROVISIONING" || "ROLLING_BACK" || "SUCCEEDED" || "FAILED" || "CANCELLING" || "CANCELLED", // required
6263
* // importOptions: { // ImportOptions Union: only one key present

clients/client-neptune-graph/src/models/models_0.ts

+33-2
Original file line numberDiff line numberDiff line change
@@ -2295,6 +2295,7 @@ export interface CancelImportTaskInput {
22952295
*/
22962296
export const Format = {
22972297
CSV: "CSV",
2298+
NTRIPLES: "NTRIPLES",
22982299
OPEN_CYPHER: "OPEN_CYPHER",
22992300
} as const;
23002301

@@ -2370,6 +2371,19 @@ export interface CancelImportTaskOutput {
23702371
status: ImportTaskStatus | undefined;
23712372
}
23722373

2374+
/**
2375+
* @public
2376+
* @enum
2377+
*/
2378+
export const BlankNodeHandling = {
2379+
CONVERT_TO_IRI: "convertToIri",
2380+
} as const;
2381+
2382+
/**
2383+
* @public
2384+
*/
2385+
export type BlankNodeHandling = (typeof BlankNodeHandling)[keyof typeof BlankNodeHandling];
2386+
23732387
/**
23742388
* <p>Options for how to import Neptune data.</p>
23752389
* @public
@@ -2551,6 +2565,14 @@ export interface CreateGraphUsingImportTaskInput {
25512565
*/
25522566
format?: Format;
25532567

2568+
/**
2569+
* <p>The method to handle blank nodes in the dataset. Currently, only <code>convertToIri</code> is supported,
2570+
* meaning blank nodes are converted to unique IRIs at load time. Must be provided when format is <code>ntriples</code>.
2571+
* 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>
2572+
* @public
2573+
*/
2574+
blankNodeHandling?: BlankNodeHandling;
2575+
25542576
/**
25552577
* <p>The ARN of the IAM role that will allow access to the data that is to be imported.</p>
25562578
* @public
@@ -2584,8 +2606,9 @@ export interface CreateGraphUsingImportTaskOutput {
25842606
/**
25852607
* <p>Specifies the format of S3 data to be imported. Valid values are <code>CSV</code>, which identifies
25862608
* the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html">Gremlin
2587-
* 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
2588-
* load format</a>.</p>
2609+
* 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
2610+
* load format</a>, or <code>ntriples</code>, which identifies the
2611+
* <a href="https://docs.aws.amazon.com/neptune-analytics/latest/userguide/using-rdf-data.html">RDF n-triples</a> format.</p>
25892612
* @public
25902613
*/
25912614
format?: Format;
@@ -2928,6 +2951,14 @@ export interface StartImportTaskInput {
29282951
*/
29292952
format?: Format;
29302953

2954+
/**
2955+
* <p>The method to handle blank nodes in the dataset. Currently, only <code>convertToIri</code> is supported,
2956+
* meaning blank nodes are converted to unique IRIs at load time. Must be provided when format is <code>ntriples</code>.
2957+
* 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>
2958+
* @public
2959+
*/
2960+
blankNodeHandling?: BlankNodeHandling;
2961+
29312962
/**
29322963
* <p>The unique identifier of the Neptune Analytics graph.</p>
29332964
* @public

clients/client-neptune-graph/src/protocols/Aws_restJson1.ts

+2
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ export const se_CreateGraphUsingImportTaskCommand = async (
224224
let body: any;
225225
body = JSON.stringify(
226226
take(input, {
227+
blankNodeHandling: [],
227228
deletionProtection: [],
228229
failOnError: [],
229230
format: [],
@@ -682,6 +683,7 @@ export const se_StartImportTaskCommand = async (
682683
let body: any;
683684
body = JSON.stringify(
684685
take(input, {
686+
blankNodeHandling: [],
685687
failOnError: [],
686688
format: [],
687689
importOptions: (_) => _json(_),

codegen/sdk-codegen/aws-models/neptune-graph.json

+30-1
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,17 @@
15341534
"smithy.api#pattern": "^arn:.+$"
15351535
}
15361536
},
1537+
"com.amazonaws.neptunegraph#BlankNodeHandling": {
1538+
"type": "enum",
1539+
"members": {
1540+
"CONVERT_TO_IRI": {
1541+
"target": "smithy.api#Unit",
1542+
"traits": {
1543+
"smithy.api#enumValue": "convertToIri"
1544+
}
1545+
}
1546+
}
1547+
},
15371548
"com.amazonaws.neptunegraph#CancelImportTask": {
15381549
"type": "operation",
15391550
"input": {
@@ -2187,6 +2198,12 @@
21872198
"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>"
21882199
}
21892200
},
2201+
"blankNodeHandling": {
2202+
"target": "com.amazonaws.neptunegraph#BlankNodeHandling",
2203+
"traits": {
2204+
"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>"
2205+
}
2206+
},
21902207
"roleArn": {
21912208
"target": "com.amazonaws.neptunegraph#RoleArn",
21922209
"traits": {
@@ -2225,7 +2242,7 @@
22252242
"format": {
22262243
"target": "com.amazonaws.neptunegraph#Format",
22272244
"traits": {
2228-
"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>"
2245+
"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>"
22292246
}
22302247
},
22312248
"roleArn": {
@@ -2932,6 +2949,12 @@
29322949
"traits": {
29332950
"smithy.api#enumValue": "OPEN_CYPHER"
29342951
}
2952+
},
2953+
"NTRIPLES": {
2954+
"target": "smithy.api#Unit",
2955+
"traits": {
2956+
"smithy.api#enumValue": "NTRIPLES"
2957+
}
29352958
}
29362959
}
29372960
},
@@ -5912,6 +5935,12 @@
59125935
"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>"
59135936
}
59145937
},
5938+
"blankNodeHandling": {
5939+
"target": "com.amazonaws.neptunegraph#BlankNodeHandling",
5940+
"traits": {
5941+
"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>"
5942+
}
5943+
},
59155944
"graphIdentifier": {
59165945
"target": "com.amazonaws.neptunegraph#GraphIdentifier",
59175946
"traits": {

0 commit comments

Comments
 (0)