arcgis.graph module

KnowledgeGraph

class arcgis.graph.KnowledgeGraph(url, *, gis=None)

Provides access to a Knowledge Graph’s datamodel and properties, as well as methods to search and query the graph.

Argument

Description

url

Knowledge Graph URL

gis

an authenticated arcigs.gis.GIS object.

# Connect to a Knowledge Graph:

gis = GIS(url="url",username="username",password="password")

knowledge_graph = KnowledgeGraph(url, gis=gis)
property datamodel

Returns the datamodel for the Knowledge Graph Service

classmethod fromitem(item)

Returns the KnowledgeGraph Service from an Item

property properties

returns the properties of the service

query(query)

Queries the Knowledge Graph using openCypher

Learn more about querying a knowledge graph

Argument

Description

query

Required String. Allows you to return the entities and relationships in a graph, as well as the properties of those entities and relationships, by providing an openCypher query.

Returns

List[list]

search(search, category='both')

Allows for the searching of the properties of entities, relationships, or both in the graph using a full-text index.

Learn more about searching a knowledge graph

Argument

Description

search

Required String. The search to perform on the knowledge graph.

category

Optional String. The category is the location of the full text search. This can be isolated to either the entities or the relationships. The default is to look in both.

The allowed values are: both, entities, relationships

Returns

List[list]

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.