From a76fea9c3d159508abc67baf1d05bcf6959b7fa3 Mon Sep 17 00:00:00 2001 From: Michael Chin Date: Wed, 14 Aug 2024 21:13:08 -0700 Subject: [PATCH 1/3] Pass blankNodeHandling to batch %load --- src/graph_notebook/magics/graph_magic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graph_notebook/magics/graph_magic.py b/src/graph_notebook/magics/graph_magic.py index 93c6265e..1233561f 100644 --- a/src/graph_notebook/magics/graph_magic.py +++ b/src/graph_notebook/magics/graph_magic.py @@ -2339,7 +2339,8 @@ def on_button_clicked(b): incremental_load_kwargs = { 'source': source.value, 'format': source_format.value, - 'concurrency': concurrency.value + 'concurrency': concurrency.value, + 'blankNodeHandling': 'convertToIri' } kwargs.update(incremental_load_kwargs) else: From 06a0abe3646b738f2bd6d43c31b8c0e6bc909ecd Mon Sep 17 00:00:00 2001 From: Michael Chin Date: Wed, 14 Aug 2024 21:18:16 -0700 Subject: [PATCH 2/3] conditional --- src/graph_notebook/magics/graph_magic.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/graph_notebook/magics/graph_magic.py b/src/graph_notebook/magics/graph_magic.py index 1233561f..e39bd427 100644 --- a/src/graph_notebook/magics/graph_magic.py +++ b/src/graph_notebook/magics/graph_magic.py @@ -47,7 +47,7 @@ from graph_notebook.neptune.client import (ClientBuilder, Client, PARALLELISM_OPTIONS, PARALLELISM_HIGH, \ LOAD_JOB_MODES, MODE_AUTO, FINAL_LOAD_STATUSES, SPARQL_ACTION, FORMAT_CSV, FORMAT_OPENCYPHER, FORMAT_NTRIPLE, \ DB_LOAD_TYPES, ANALYTICS_LOAD_TYPES, VALID_BULK_FORMATS, VALID_INCREMENTAL_FORMATS, \ - FORMAT_NQUADS, FORMAT_RDFXML, FORMAT_TURTLE, STREAM_RDF, STREAM_PG, STREAM_ENDPOINTS, \ + FORMAT_NQUADS, FORMAT_RDFXML, FORMAT_TURTLE, FORMAT_NTRIPLE, STREAM_RDF, STREAM_PG, STREAM_ENDPOINTS, \ NEPTUNE_CONFIG_HOST_IDENTIFIERS, is_allowed_neptune_host, \ STATISTICS_LANGUAGE_INPUTS, STATISTICS_LANGUAGE_INPUTS_SPARQL, STATISTICS_MODES, SUMMARY_MODES, \ SPARQL_EXPLAIN_MODES, OPENCYPHER_EXPLAIN_MODES, GREMLIN_EXPLAIN_MODES, \ @@ -2340,8 +2340,9 @@ def on_button_clicked(b): 'source': source.value, 'format': source_format.value, 'concurrency': concurrency.value, - 'blankNodeHandling': 'convertToIri' } + if source.value == FORMAT_NTRIPLE: + incremental_load_kwargs['blankNodeHandling'] = 'convertToIri' kwargs.update(incremental_load_kwargs) else: bulk_load_kwargs = { From d039f7f9572e580b50d69a4d3a9e58d39a6e2ccc Mon Sep 17 00:00:00 2001 From: Michael Chin Date: Wed, 14 Aug 2024 21:23:44 -0700 Subject: [PATCH 3/3] update changelog --- ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 1b50632c..8bfaf43d 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -7,7 +7,7 @@ Starting with v1.31.6, this file will contain a record of major features and upd - New Neptune Analytics notebooks - openCypher over RDF ([Link to PR](https://github.com/aws/graph-notebook/pull/672)) - Path: 02-Neptune-Analytics > 04-OpenCypher-Over-RDF - Added regional S3 bucket mappings to Neptune CloudFormation template ([Link to PR](https://github.com/aws/graph-notebook/pull/664)) -- Enabled n-triples data for `%load` with Neptune Analytics ([Link to PR](https://github.com/aws/graph-notebook/pull/671)) +- Enabled n-triples data for `%load` with Neptune Analytics ([PR #1](https://github.com/aws/graph-notebook/pull/671)) ( ([PR #2](https://github.com/aws/graph-notebook/pull/675))) - Removed unused options from `%load`([Link to PR](https://github.com/aws/graph-notebook/pull/662)) - Made EncryptionKey optional in Neptune CloudFormation template ([Link to PR](https://github.com/aws/graph-notebook/pull/663))