Skip to content

Rdf example update #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions notebooks/RDF_Import_Example.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# ✨ ArangoRDF Now Available! ✨\n",
"**We highly recommend using [ArangoRDF](https://github.com/ArangoDB-Community/ArangoRDF/)**\n",
"\n",
"Since releasing this notebook we have worked with the community to release a more official ArangoRDF package. It is still in active development and we would like your feedback.\n",
"\n",
"[Get Started with the ArangoRDF Colab notebook](https://colab.research.google.com/github/ArangoDB-Community/ArangoRDF/blob/main/examples/ArangoRDF.ipynb)\n",
"\n",
"\n",
"Check out the [ArangoDB-Community Repository](https://github.com/ArangoDB-Community/ArangoRDF/) for more information."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -9,8 +24,7 @@
"outputs": [],
"source": [
"%%capture\n",
"!git clone -b oasis_connector --single-branch https://github.com/arangodb/interactive_tutorials\n",
"!rsync -av interactive_tutorials/ ./ --exclude=.git\n",
"!pip install adb-cloud-connector\n",
"\n",
"!git clone -b \"RDF-Import-Example-Data\" --single-branch https://github.com/arangodb/interactive_tutorials RDF-Import-Example-Data\n",
"!rsync -av RDF-Import-Example-Data/ ./ --exclude=.git\n",
Expand All @@ -31,10 +45,10 @@
"import json\n",
"import requests\n",
"import sys\n",
"import oasis\n",
"import time\n",
"import textwrap\n",
"\n",
"from adb_cloud_connector import get_temp_credentials\n",
"from pyArango.connection import *\n",
"from arango import ArangoClient"
]
Expand All @@ -47,12 +61,12 @@
},
"outputs": [],
"source": [
"# Retrieve tmp credentials from ArangoDB Tutorial Service\n",
"login = oasis.getTempCredentials(tutorialName=\"RDF-Import-Example\", credentialProvider=\"https://tutorials.arangodb.cloud:8529/_db/_system/tutorialDB/tutorialDB\")\n",
"# Request temporary instance from the managed ArangoDB Cloud Service.\n",
"login = get_temp_credentials()\n",
"print(json.dumps(login, indent=2))\n",
"\n",
"# Connect to the temp database\n",
"# Please note that we use the python-arango driver as it has better support for ArangoSearch \n",
"db = oasis.connect_python_arango(login)"
"# Connect to the db via the python-arango driver\n",
"db = ArangoClient(hosts=login[\"url\"]).db(login[\"dbName\"], login[\"username\"], login[\"password\"], verify=True)"
]
},
{
Expand Down