db.delete_graph("GameOfThrones", drop_collections=True)db.create_graph(    "GameOfThrones",    edge_definitions=[        {            "edge_collection": "ChildOf",            "from_vertex_collections": ["Characters"],            "to_vertex_collections": ["Characters"],        },    ],)documents = [    {        "_key": "NedStark",        "name": "Ned",        "surname": "Stark",        "alive": True,        "age": 41,        "gender": "male",    },    {        "_key": "CatelynStark",        "name": "Catelyn",        "surname": "Stark",        "alive": False,        "age": 40,        "gender": "female",    },    {        "_key": "AryaStark",        "name": "Arya",        "surname": "Stark",        "alive": True,        "age": 11,        "gender": "female",    },    {        "_key": "BranStark",        "name": "Bran",        "surname": "Stark",        "alive": True,        "age": 10,        "gender": "male",    },]edges = [    {"_to": "Characters/NedStark", "_from": "Characters/AryaStark"},    {"_to": "Characters/NedStark", "_from": "Characters/BranStark"},    {"_to": "Characters/CatelynStark", "_from": "Characters/AryaStark"},    {"_to": "Characters/CatelynStark", "_from": "Characters/BranStark"},]db.collection("Characters").import_bulk(documents)db.collection("ChildOf").import_bulk(edges)    {'error': False,     'created': 4,     'errors': 0,     'empty': 0,     'updated': 0,     'ignored': 0,     'details': []}Getting & Setting the ArangoDB Schema‚ÄãAn initial ArangoDB Schema is generated upon instantiating the ArangoDBGraph object. Below are the schema's getter & setter methods should you be interested in viewing or modifying the schema:# The schema should be empty here,# since `graph` was initialized prior to ArangoDB Data ingestion (see above).import jsonprint(json.dumps(graph.schema, indent=4))    {        "Graph Schema": [],        "Collection Schema": []    }graph.set_schema()# We can now view the generated schemaimport jsonprint(json.dumps(graph.schema,
Open In Colab
Open In Colab ->: db.delete_graph("GameOfThrones", drop_collections=True)db.create_graph(    "GameOfThrones",    edge_definitions=[        {            "edge_collection": "ChildOf",            "from_vertex_collections": ["Characters"],            "to_vertex_collections": ["Characters"],        },    ],)documents = [    {        "_key": "NedStark",        "name": "Ned",        "surname": "Stark",        "alive": True,        "age": 41,        "gender": "male",    },    {        "_key": "CatelynStark",        "name": "Catelyn",        "surname": "Stark",        "alive": False,        "age": 40,        "gender": "female",    },    {        "_key": "AryaStark",        "name": "Arya",        "surname": "Stark",        "alive": True,        "age": 11,        "gender": "female",    },    {        "_key": "BranStark",        "name": "Bran",        "surname": "Stark",        "alive": True,        "age": 10,        "gender": "male",    },]edges = [    {"_to": "Characters/NedStark", "_from": "Characters/AryaStark"},    {"_to": "Characters/NedStark", "_from": "Characters/BranStark"},    {"_to": "Characters/CatelynStark", "_from": "Characters/AryaStark"},    {"_to": "Characters/CatelynStark", "_from": "Characters/BranStark"},]db.collection("Characters").import_bulk(documents)db.collection("ChildOf").import_bulk(edges)    {'error': False,     'created': 4,     'errors': 0,     'empty': 0,     'updated': 0,     'ignored': 0,     'details': []}Getting & Setting the ArangoDB Schema‚ÄãAn initial ArangoDB Schema is generated upon instantiating the ArangoDBGraph object. Below are the schema's getter & setter methods should you be interested in viewing or modifying the schema:# The schema should be empty here,# since `graph` was initialized prior to ArangoDB Data ingestion (see above).import jsonprint(json.dumps(graph.schema, indent=4))    {        "Graph Schema": [],        "Collection Schema": []    }graph.set_schema()# We can now view the generated schemaimport jsonprint(json.dumps(graph.schema,