Creating a knowledge graph can be a long and labour-intensive process. The ability to import a table of concepts and facts is built into every FactNexus EKG Knowledge Graph and that functionality can be accessed using the Graph API or by uploading a file using the Graph Control Panel.
A knowledge graph is, however, much more complex in its structure than a table. If your table is to be imported, it must be of a set format and it must adhere to a few rules.
First Row Column Headings
The first column heading carries the ConceptID that describes your new concepts. In the example table above that describing concept is Laptop (@1~19788). If the describing concept you need doesn't already exist in your knowledge graph, create it using your Graph WorkSpace.
The first column is always a label column, but you can use the "label" heading to give your concept additional labels.
A "digest" column heading tells table-to-graph to use this column as a digest or synopsis for the new concept. Try to keep these short.
Fact describing ConceptID
All other columns carry the facts that connect to each new concept. A new concept will be created to represent the fact if required. Each new fact needs a describing ConceptID, which table-to-graph expects to find in its column heading. In the example table above we have created describing concepts for "Computer Brand" and "Computer Model".
- Upload using Import Tables Action at your Graph Control Panel or
- Use the /table API.
Your table must be saved as a CSV (comma-separated values) file before it can be imported.
Table-to-graph using the /table API
- POST to /table to upload your table and commence loading it your graph.
- GET /table/status to check on the status of your most recent up load.
- If a ConceptID exists in your table, it will be used as a connection. e.g. the Apple computer brand (@3782~200164) in the above example.
- Each knowledge graph "remembers" the table entries it has used to create facts. So if you use the same fact label and column heading in another table import the same graph concept will be attached. e.g. if "IdeaPad" under "@3782~300009" (as in the above example) is used in a second import, the same fact concept will be used.
- A concept created from a table row can and should be rich in labels, digest information and facts. A concept created from a fact column won't have much information however, so you may need to go back and "flesh it out" using Graph WorkSpace.
- The FactNexus EKG Graph API can be used to automate graph creation. This includes the creation of describing concepts, the extraction and creation of multiple tables from a data source, and the delivery of those tables to your graph using the /table API.
An import can't be undone. You should create a snapshot as a backup before importing any table. Even better would be to work on a shapshot and only make it public when you're happy with it.