Load data into a knowledge graph

You can create entities and relationships in a knowledge graph to represent existing tabular data. Data in a table's fields can be converted into properties of entities and relationships. A feature class's geometry can be loaded into an entity's spatial feature.

Define how tabular data will be converted to knowledge graph items using the Load Table wizard. As you define the conversion process, you can save your work. The instructions for converting data are saved in the investigation in the current project as a data loading configuration. Existing data loading configurations can be modified to accommodate similar tables and feature classes.

When you run the conversion process, data is loaded into the current investigation's knowledge graph. A new link chart can be created to view and evaluate the results of the conversion process.

A data loading configuration specifies how to read and handle the data in a table. The load table process creates entities and relationships in a knowledge graph to represent the data.

Open the Load Table wizard

Open the Load Table wizard to import tabular data to an investigation's knowledge graph.

  1. Open an investigation in ArcGIS Pro.
  2. On the Investigation tab on the ribbon, in the Load Data group, click Load Table Load Table.

The Load Table wizard appears in a new view alongside its investigation.

Identify the table to load

Specify the table or feature class that contains the data to be converted on the Welcome page in the wizard. If you have an existing data loading configuration that can serve as the basis for this operation, you can import its information to the wizard.

Data loading configurations can only be imported to the wizard from the current investigation. You can copy data loading configurations from another investigation, including from a different project, and import its information.

  1. Click the Browse button Open next to the Source Table text box.
  2. On the dialog box that appears, browse to and click the table or feature class that contains the data to be loaded into the investigation's knowledge graph, and click OK.
  3. If the investigation has a data loading configuration with relevant information for importing the current table's data, click the Data Loading Configuration drop-down arrow and click the appropriate data loading configuration Load Configuration.
  4. Click Next to advance to the Entities page in the wizard.
Tip:

The source table or feature class and an initial data loading configuration can also be specified using the buttons on the Load Table tab on the ribbon. You can change these settings at any point, but you will lose any settings previously defined in the wizard.

Define entities to create in the knowledge graph

Identify fields in the source table or feature class where the data represents entities in the knowledge graph. The source table's fields are listed in the Column Name column of the table.

For example, if the source table describes a company's employees, you can import that information to the knowledge graph and create one Employee entity for each row in the table. The field you choose to represent the entity should be a unique identifier, such as an employee ID number, for an Employee entity type. Other properties such as an employee's full name are not guaranteed to be unique.

Several tables may contain employee information for different offices. After importing one table, when preparing to import the second table, you must consider employees that appear in multiple tables such as a regional sales manager. If you import both tables without specifying how to merge entities, you will end up with two entities in the knowledge graph for the same regional sales manager. You can avoid creating duplicates if the table has data that uniquely identifies an entity, and if existing entities in the knowledge graph have a property containing the same information.

If you choose to merge entities, the data loading process will compare the employee ID number stored in the table's field to the Employee entity type's ID property for each existing Employee instance in the knowledge graph. If an entity of the same type with the same identifier exists in the knowledge graph, data from the table is stored in or associated with the existing knowledge graph entity instead of creating a new instance. That is, entities in the table and entities in the knowledge graph are merged.

In general, it is better to merge entities during the data loading process, if possible. Even if many entities can be merged, errors or gaps in the table or the knowledge graph can prevent some entities from being merged. In this situation, you can merge entities manually after the load table process is complete.

Learn more about merging entities

  1. Check in the Create Entity column for each field in the table where the data uniquely identifies an entity.
  2. For each checked field, click in the Entity Type column and define the entity type for which new instances in the knowledge graph will be created.
    • For an entity type that has already been defined in the knowledge graph, click the drop-down arrow that appears and click the entity type in the list. Start typing in the text box to autocomplete an existing entity type's name.
    • To define a new entity type in the knowledge graph, click in the text box and provide a name for a new entity type. New entity types are identified by an asterisk throughout the wizard. Use existing entity types whenever possible.
    • If a field in the source table specifies the type of entity to create, click the drop-down arrow that appears and click the Column option at the bottom of the drop-down list. The list changes to show all fields in the table. Click the field whose data specifies the type of entity to create in the knowledge graph.
  3. For each checked field, check in the Merge column to compare data in the table with existing entities in the knowledge graph and merge entities if possible.

    If the unique identifier in the table doesn't correspond to an entity's unique property in the graph, a new instance of the entity is created in the knowledge graph.

  4. Click Next to advance to the Relationships page in the wizard.
Tip:

At any time, you can save the rules you have defined as a data loading configuration in the investigation. On the Load Table tab on the ribbon, in the Configuration group, click Save. Click Save Save or Save As Save As, and save the rules to a new or existing data loading configuration as appropriate. Because the investigation and the data loading configuration are saved in the project, your changes aren't fully saved until you save the project as well.

Define relationships to create in the knowledge graph

You can establish relationships between entities using the data in the source table or feature class. To create relationships as part of the data loading process, both the origin entity and the destination entity of the relationship must be defined on the Entities page in the wizard. Relationships are described in one direction, from an origin entity to a destination entity.

For example, in a table describing an organization's employees, a field can define the employee's manager. You can define a WorksFor relationship type to capture the association between the employee and their manager. In a WorksFor relationship, both the origin and destination entities can have the Employee entity type. As each row of the table is processed, the current employee is the origin entity of the relationship and the employee who is their manager is the destination entity of the relationship.

As with entities, a relationship defined in the table can be merged with existing relationships in the knowledge graph. When merging relationships, the data loading process will compare the table's entities to existing entities in the knowledge graph and determine whether the origin and destination entities can be merged. If the entities can be merged, the knowledge graph will be examined to see whether a relationship of the same type already exists between the entities; if so, the relationship will be merged as well. For example, if the origin entity can be merged but the destination entity can't, a new relationship is created from the existing origin entity to a new destination entity.

In general, it is better to merge relationships during the data loading process, if possible. As with entities, errors or gaps in the table or the knowledge graph can prevent relationships from being merged. You can merge relationships manually after the load table process is complete.

Learn about merging relationships

  1. Click the empty row at the bottom of the table to define a new relationship.
  2. Click in the Origin Entity column, click the drop-down arrow that appears, and click the entity type defined on the Entities page that is the origin of the relationship.
  3. Click in the Relationship Type column and define the relationship type for which new instances in the knowledge graph will be created.
    • For a relationship type that has already been defined in the knowledge graph, click the drop-down arrow that appears and click the relationship type in the list. Start typing in the text box to autocomplete an existing relationship type's name.
    • To define a new relationship type in the knowledge graph, click in the text box and provide a name for a new relationship type. New relationship types are identified by an asterisk throughout the wizard. Use existing relationship types whenever possible.
    • If a field in the source table specifies the type of relationship to create, click the drop-down arrow that appears and click the Column option at the bottom of the drop-down list. The list changes to show all fields in the table. Click the field whose data specifies the type of relationship to create in the knowledge graph.
  4. Click in the Destination Entity column, click the drop-down arrow that appears, and click the entity type defined on the Entities page that is the destination of the relationship.
  5. Check in the Merge column to compare data in the table with existing entities and relationships in the knowledge graph, and merge entities and relationships if possible.
  6. Click Next to advance to the Properties page in the wizard.

Define properties to create in the knowledge graph

Data from the source table can be stored in properties of entities and relationships in the knowledge graph. To accomplish this, several lists of information are presented for you to work with. There is a list of all fields in the source table or feature class, a list of entities defined on the Entities page in the wizard, and a list of all relationships defined on the Relationships page in the wizard.

  • The Column Names list is divided in two: Unused and Used fields. Fields that identify entities as defined on the Entities page are in use. Remaining fields in the table appear in the unused list.
  • In the Entities list, the entity type is in parentheses, followed by the field name. For example, when an ID field in the table stores an employee number that uniquely identifies the Employee entity, the list shows: (Employee) ID.
  • In the Relationships list, each entry shows the relationship's origin entity, relationship type, and destination entity. For example, when the origin and destination are the Employee entity and WorksFor is the relationship type, the list shows: (Employee) ID WorksFor (Employee) ID.

The above three lists are used to define the rules for converting the source table's data to properties of entities and relationships. When you select an entity or relationship, the Properties table shows the rules already defined.

By default, each entity has a rule for saving data from the field that uniquely identifies it to a property in the knowledge graph. This rule has a lock icon Locked Property on its row in the Properties table; it can't be removed without changing how the entity is defined. If there isn't a direct match between the field name and the property name, the entity has an exclamation point icon Error next to it in the Entities list. The rule in the Properties table will also be considered invalid. Update the rule to identify the correct property name. You can't run the data loading operation until the error is fixed.

  1. The first entity in the Entities list is selected by default, and the rule that defines this entity appears in the Properties table. Continue with this entity or select another graph item.
  2. Click the empty row at the bottom of the Properties table.
  3. Click in the Property Name column and define a property for the selected graph item.
    • For a property that has already been defined in the knowledge graph, click the drop-down arrow that appears and click the property in the list. Start typing in the text box to autocomplete an existing property name.
    • To define a new property in the knowledge graph, click in the text box and provide a name for a new property. New properties are identified by an asterisk throughout the wizard. Use existing properties whenever possible.
  4. For existing properties, the data type appears in the Data Type column. For a new property, click the drop-down arrow and click the appropriate data type.
  5. Click in the Property Value column and define a rule for storing data in the graph item's property.
    • Click the drop-down arrow that appears, and click the field in the table whose data will be stored in the knowledge graph. The field will move from Unused to Used in the Column Names list.
    • Type a value in the text box that will be saved in this property for all graph items defined in the table. The value will be validated against the property's data type; if text is provided for an integer property, the value won't be stored.
  6. Check in the Use For Merge column to include the property when comparing data in the table with existing graph items in the knowledge graph to determine whether they can be merged.

    Items are merged if all identified fields and properties match. New items are created when items can't be merged.

  7. Select another graph item in the Entities or Relationships list and define additional rules to convert data in the source table to graph item properties in the knowledge graph.
  8. Click Next to advance to the Spatial page in the wizard.
Note:

You can drag a field from the Column Names list to the Properties table. The field appears automatically in the Property Value column. If the field name and property name match, the property name appears automatically in the Property Name column. If the field name and property name don't match, the name of the field will appear in the Property Name column as the name of a new property that will be created for the graph item.

Define spatial features for entities

Identify fields in the source table or feature class where the data represents entities in the knowledge graph. The entities defined on the Entities page in the wizard are listed in the Entity column of the table.

Only the WGS84 coordinate system is supported for knowledge graphs. All features and coordinates will be assumed to use this coordinate system.

  1. Check in the Create Spatial column for each entity if data in the table can be used to define a spatial feature.
  2. For existing entities, the data type appears in the Geometry Type column. For new checked entities, with an asterisk next to the entity name, click the drop-down arrow and click the appropriate geometry type.

    Spatial features are stored in the property of the entity indicated in the Spatial Property Name column. The property name cannot be changed.

  3. For each checked entity, define how its spatial feature will be created. Click the entity in the table. Below the table, the Input Spatial Format drop-down list appears. Click the drop-down list and click the appropriate option for the spatial data stored in the source table or feature class.
    • Geometry—The shape stored in the geometry field of the source feature class will be saved to the entity in the knowledge graph. Use the Input Geometry Field drop-down list that appears to identify the geometry field. Only fields storing shapes defined in the ArcGIS geometry format can be stored in the knowledge graph.
    • Coordinates—The entity's spatial feature will be constructed from data in the table. Specify fields containing the feature's coordinates. The fields in the source table appear in the Available Fields list. For each field that stores spatial coordinates, click the field and click Add; the field is added to the Selected Fields list.
  4. Click Next to advance to the Review and Run page in the wizard.

Review the configuration and load the data

The Review and Run page in the wizard displays a summary of entities, relationships, and properties that will be created in the knowledge graph. The Run button remains unavailable until all problems identified in the wizard are corrected.

  1. Review all the rules for loading data from the source table or feature class to entities, relationships, properties, and spatial features in a knowledge graph.
  2. To save the final set of rules for future use, check Save configuration. Click the drop-down arrow for the list that appears, and click the name of an existing data loading configuration to overwrite it. Alternatively, type a name to store the rules in a new data loading configuration.
  3. Check Display the result in a new link chart upon completion to add the entities and relationships created by the data conversion process to a new link chart for your review.
  4. Click Run Run.
  5. If any errors are found during the data loading process, a warning appears at the bottom of the page. Click the View Details link in the warning.

    A dialog box appears showing the list of errors. For example, a null value in a table or property or a data type mismatch prevents two entities from being merged and results in an error.

  6. To keep the list and review it later as you evaluate the results of the conversion process, click the Copy button Copy. Open a text editor and paste the copied messages, and save them to a text file.
  7. Close the Load Table view.

Related topics