ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data.Knowledge Namespace / KnowledgeGraphConnectionProperties Class
Members Example

In This Topic
    KnowledgeGraphConnectionProperties Class
    In This Topic
    Represents the properties used to connect to a knowledge graph datastore.
    Syntax
    Public NotInheritable Class KnowledgeGraphConnectionProperties 
       Inherits ArcGIS.Core.Data.Connector
    public sealed class KnowledgeGraphConnectionProperties : ArcGIS.Core.Data.Connector 
    Remarks
    Knowledge graphs can use either a service url to a knowledge graph service or path to a file-based knowledge graph
    Example
    Get service Uri from KG datastore
    {
      await QueuedTask.Run(() =>
      {
        //Create a connection properties
        var kg_props =
                new KnowledgeGraphConnectionProperties(new Uri(url));
        //Connect to the KnowledgeGraph datastore
        //KnowledgeGraph datastores contain tables and feature classes
        using (var kg = new KnowledgeGraph(kg_props))
        {
          var connector = kg.GetConnector() as KnowledgeGraphConnectionProperties;
          var uri = connector.PathOrURL;
          var serviceUri = uri.AbsoluteUri;
        }
      });
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.Data.Connector
          ArcGIS.Core.Data.Knowledge.KnowledgeGraphConnectionProperties

    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.2 or higher.
    See Also