Load Table To Knowledge Graph (Knowledge Graph)

Summary

Loads data from a table or feature class into a knowledge graph.

Usage

  • Use this tool to create entities and relationships in a knowledge graph from existing tabular data. Data in a table's fields can be converted into properties of entities and relationships.

  • A data loading configuration file is required to load data into a knowledge graph. A data loading configuration file specifies how to read and handle the data in a table. It can also create provenance records to specify the source material from which the data was derived. Create a data load configuration file using the Load Table wizard.

  • When the Input Data parameter value is a feature class, identify the geometry field in the attribute table. When the Input Data parameter value is a table, identify one or more fields containing coordinates that define the entity's geometry. Only the WGS84 coordinate system is supported for knowledge graphs. It is assumed that all features and coordinates will use this coordinate system.

    Learn more about defining spatial features to entities

Parameters

LabelExplanationData Type
Target Knowledge Graph

The knowledge graph that will be updated.

Workspace; String; Map; String; Knowledge Graph Layer
Input Data

The table or feature class that will be loaded into the knowledge graph.

Table View
Data Loading Configuration

The data loading configuration file that will be used to load the Input Data parameter value into the knowledge graph.

File

Derived Output

LabelExplanationData Type
Updated Knowledge Graph

The updated knowledge graph.

Workspace

arcpy.kg.LoadTableToKnowledgeGraph(target_knowledge_graph, in_dataset, data_loading_configuration)
NameExplanationData Type
target_knowledge_graph

The knowledge graph that will be updated.

Workspace; String; Map; String; Knowledge Graph Layer
in_dataset

The table or feature class that will be loaded into the knowledge graph.

Table View
data_loading_configuration

The data loading configuration file that will be used to load the in_dataset parameter value into the knowledge graph.

File

Derived Output

NameExplanationData Type
updated_knowledge_graph

The updated knowledge graph.

Workspace

Code sample

LoadTableToKnowledgeGraph example (stand-alone script)

The following code sample demonstrates creating a knowledge graph service using the LoadTableToKnowledgeGraph function with default parameters.

# Description: Load tabular data from a .csv file into a knowledge graph.

# Import system modules
import arcpy

# Set local variables
target_knowledge_graph = 'MyKnowledgeGraph'
in_dataset = 'data_load.csv'
data_loading_configuration = 'data_load_config_sample.ldcfg'

# Call the LoadTableToKnowledgeGraph tool to load data_load.csv into 
# "MyKnowledgeGraph" as defined by data_load_config_sample.ldcfg.
arcpy.kg.LoadTableToKnowledgeGraph(target_knowledge_graph, in_dataset,
                                   data_loading_configuration)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics