aws / graph-notebook

Library extending Jupyter notebooks to integrate with Apache TinkerPop, openCypher, and RDF SPARQL.
https://github.com/aws/graph-notebook
Apache License 2.0
714 stars 163 forks source link

cannot connect to public blazegraph endpoint #45

Closed wdduncan closed 3 years ago

wdduncan commented 3 years ago

Hello. We have a public blazegraph endpoint set up at http://kg-hub-rdf.berkeleybop.io/blazegraph/sparql. However, I cannot connect to it in graph-noteboook. My setup is:

%%graph_notebook_config
{
  "host": "http://kg-hub-rdf.berkeleybop.io/blazegraph/sparql",
  "port": 80,
  "auth_mode": "DEFAULT",
  "iam_credentials_provider_type": "ROLE",
  "load_from_s3_arn": "",
  "ssl": false,
  "aws_region": "us-east-1"
}

The query:

%%sparql
select * where {
    ?s ?p ?o
} limit 10

returns an error:

{'error': ConnectionError(MaxRetryError("HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //kg-hub-rdf.berkeleybop.io/blazegraph/sparql:80/sparql (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f90e0f09150>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))"))}

If you wish, you can verify our endpoint with this curl command:

curl -G query='SELECT ?x WHERE {?x <https://w3id.org/biolink/vocab/category> <https://w3id.org/biolink/vocab/Gene>} limit 10' -H "Accept:application/sparql-results+json" http://kg-hub-rdf.berkeleybop.io/blazegraph/sparql
cmungall commented 3 years ago

It looks like the assumption is that the query URL is constructed by appending post onto host, no ability to pass a path parameter?

https://github.com/aws/graph-notebook/blob/3096f23449feca039508b895b82c8dcdb1733ccc/src/graph_notebook/request_param_generator/sparql_request_generator.py#L17

austinkline commented 3 years ago

This would be addressed by #39