Configure Table Metadata
After you create a graph, review the inferred metadata for every table so Kumo Relational can identify entities, interpret column values, and use the correct event times when building prediction context.
Access a table through graph["table_name"]; you do not need to construct table objects directly.
Inspect inferred metadata
Continue with the graph created in Create a graph:
The output shows each table’s inferred primary key, time columns, and column types. Access the tables that you need to correct:
Configure keys and timestamps
A primary key uniquely identifies each row in a table. A time column identifies when a row became available to the prediction workflow. Set these fields when inference did not select the intended columns:
Use an end-time column only when a record stops being valid at a known time. The time column should represent when an event became available to the prediction workflow.
Tables can use composite primary keys when one column is not sufficient to identify a row. Configure the complete ordered set of key columns, and ensure every corresponding composite foreign key uses compatible physical and semantic types in the same order.
Every component must be present, non-null, and use a physical type that the SDK can combine into a composite identifier, also called a foldable type. Floating-point columns cannot be components of a composite identity. When you request predictions for entities with a composite key, pass one tuple per entity in the same order:
Refer to Time and End-Time Columns for selection guidance, entity-table validity rules, and current sampling behavior for related tables.
Correct semantic types
A semantic type tells Kumo Relational how to interpret a column’s values, regardless of how those values are physically stored. Correct an inferred semantic type when it does not match the column’s role:
A semantic type assignment must be compatible with the column’s physical data type. Refer to Data Types and Semantic Types for the supported combinations.
Metadata checklist
- Each table’s primary key values are non-null and unique.
- Foreign-key columns use values and physical data types that are compatible with those of the referenced keys.
- The time column represents when an event became available to the prediction workflow.
- Identifier columns use the
IDsemantic type. - Free-form language uses the
textsemantic type, and low-cardinality labels use thecategoricalsemantic type. - End-time columns are used only when records stop being valid at a known time.
Inspect the result after making corrections: