|
44 | 44 | neptune_db_only, neptune_graph_only
|
45 | 45 | from graph_notebook.magics.ml import neptune_ml_magic_handler, generate_neptune_ml_parser
|
46 | 46 | from graph_notebook.magics.streams import StreamViewer
|
47 |
| -from graph_notebook.neptune.client import ClientBuilder, Client, PARALLELISM_OPTIONS, PARALLELISM_HIGH, \ |
| 47 | +from graph_notebook.neptune.client import (ClientBuilder, Client, PARALLELISM_OPTIONS, PARALLELISM_HIGH, \ |
48 | 48 | LOAD_JOB_MODES, MODE_AUTO, FINAL_LOAD_STATUSES, SPARQL_ACTION, FORMAT_CSV, FORMAT_OPENCYPHER, FORMAT_NTRIPLE, \
|
49 | 49 | DB_LOAD_TYPES, ANALYTICS_LOAD_TYPES, VALID_BULK_FORMATS, VALID_INCREMENTAL_FORMATS, \
|
50 | 50 | FORMAT_NQUADS, FORMAT_RDFXML, FORMAT_TURTLE, STREAM_RDF, STREAM_PG, STREAM_ENDPOINTS, \
|
51 | 51 | NEPTUNE_CONFIG_HOST_IDENTIFIERS, is_allowed_neptune_host, \
|
52 | 52 | STATISTICS_LANGUAGE_INPUTS, STATISTICS_LANGUAGE_INPUTS_SPARQL, STATISTICS_MODES, SUMMARY_MODES, \
|
53 |
| - SPARQL_EXPLAIN_MODES, OPENCYPHER_EXPLAIN_MODES, OPENCYPHER_PLAN_CACHE_MODES, OPENCYPHER_DEFAULT_TIMEOUT, \ |
54 |
| - OPENCYPHER_STATUS_STATE_MODES, normalize_service_name, GRAPH_PG_INFO_METRICS, \ |
55 |
| - DEFAULT_GREMLIN_PROTOCOL, GREMLIN_PROTOCOL_FORMATS, DEFAULT_HTTP_PROTOCOL, normalize_protocol_name |
| 53 | + SPARQL_EXPLAIN_MODES, OPENCYPHER_EXPLAIN_MODES, GREMLIN_EXPLAIN_MODES, \ |
| 54 | + OPENCYPHER_PLAN_CACHE_MODES, OPENCYPHER_DEFAULT_TIMEOUT, OPENCYPHER_STATUS_STATE_MODES, \ |
| 55 | + normalize_service_name, GRAPH_PG_INFO_METRICS, \ |
| 56 | + DEFAULT_GREMLIN_PROTOCOL, GREMLIN_PROTOCOL_FORMATS, DEFAULT_HTTP_PROTOCOL, normalize_protocol_name) |
56 | 57 | from graph_notebook.network import SPARQLNetwork
|
57 | 58 | from graph_notebook.network.gremlin.GremlinNetwork import parse_pattern_list_str, GremlinNetwork
|
58 | 59 | from graph_notebook.visualization.rows_and_columns import sparql_get_rows_and_columns, opencypher_get_rows_and_columns
|
@@ -534,7 +535,7 @@ def stream_viewer(self, line):
|
534 | 535 |
|
535 | 536 | language = args.language
|
536 | 537 | limit = args.limit
|
537 |
| - uri = self.client.get_uri_with_port() |
| 538 | + uri = self.client.get_uri(include_port=True) |
538 | 539 | viewer = StreamViewer(self.client, uri, language, limit=limit)
|
539 | 540 | viewer.show()
|
540 | 541 |
|
@@ -1034,8 +1035,9 @@ def gremlin(self, line, cell, local_ns: dict = None):
|
1034 | 1035 | f'If not specified, defaults to the value of the gremlin.connection_protocol field '
|
1035 | 1036 | f'in %graph_notebook_config. Please note that this option has no effect on the '
|
1036 | 1037 | f'Profile and Explain modes, which must use HTTP.')
|
1037 |
| - parser.add_argument('--explain-type', type=str.lower, default='', |
1038 |
| - help='Explain mode to use when using the explain query mode.') |
| 1038 | + parser.add_argument('--explain-type', type=str.lower, default='dynamic', |
| 1039 | + help=f'Explain mode to use when using the explain query mode. ' |
| 1040 | + f'Accepted values: {GREMLIN_EXPLAIN_MODES}') |
1039 | 1041 | parser.add_argument('-p', '--path-pattern', default='', help='path pattern')
|
1040 | 1042 | parser.add_argument('-g', '--group-by', type=str, default='',
|
1041 | 1043 | help='Property used to group nodes (e.g. code, T.region) default is T.label')
|
@@ -1074,6 +1076,8 @@ def gremlin(self, line, cell, local_ns: dict = None):
|
1074 | 1076 | 'TinkerPop driver "Serializers" enum values. Default is GRAPHSON_V3_UNTYPED')
|
1075 | 1077 | parser.add_argument('--profile-indexOps', action='store_true', default=False,
|
1076 | 1078 | help='Show a detailed report of all index operations.')
|
| 1079 | + parser.add_argument('--profile-debug', action='store_true', default=False, |
| 1080 | + help='Enable debug mode.') |
1077 | 1081 | parser.add_argument('--profile-misc-args', type=str, default='{}',
|
1078 | 1082 | help='Additional profile options, passed in as a map.')
|
1079 | 1083 | parser.add_argument('-sp', '--stop-physics', action='store_true', default=False,
|
@@ -1154,7 +1158,8 @@ def gremlin(self, line, cell, local_ns: dict = None):
|
1154 | 1158 | profile_args = {"profile.results": args.profile_no_results,
|
1155 | 1159 | "profile.chop": args.profile_chop,
|
1156 | 1160 | "profile.serializer": serializer,
|
1157 |
| - "profile.indexOps": args.profile_indexOps} |
| 1161 | + "profile.indexOps": args.profile_indexOps, |
| 1162 | + "profile.debug": args.profile_debug} |
1158 | 1163 | try:
|
1159 | 1164 | profile_misc_args_dict = json.loads(args.profile_misc_args)
|
1160 | 1165 | profile_args.update(profile_misc_args_dict)
|
|
0 commit comments