3. Register Entities
What is an Entity?
In FeatureByte, an Entity represents real-world objects or concepts. While entities are typically associated with a primary key or foreign key in the data, they can also be represented by categorical columns that define groups of related objects. For example, a City entity may represent multiple customers, and a Product Group entity may encompass multiple products, even though neither is explicitly used as a foreign key.
Step 1: Identify Entities in Your Data¶
In the Grocery dataset, we identified six entities.
Name | Description |
---|---|
customer | A grocery customer |
invoice | A record of the customer's purchase |
item | An individual item on the invoice |
product | A product available in the store for purchase |
productgroup | A category or group a product falls under |
frenchstate | A region in France |
Step 2: Decide their Serving Name¶
An Entity's Serving Name is the unique identifier used to recognize the entity during a serving request in FeatureByte. You can choose any name that suits your needs, provided it is not already assigned to another entity.
Name | Description | Serving Name |
---|---|---|
customer | A grocery customer | GROCERYCUSTOMERGUID |
invoice | A record of the customer's purchase | GROCERYINVOICEGUID |
item | An individual item on the invoice | GROCERYINVOICEITEMGUID |
product | A product available in the store for purchase | GROCERYPRODUCTGUID |
productgroup | A category or group a product falls under | PRODUCTGROUP |
frenchstate | A region in France | FRENCHSTATE |
Step 3: Register Entities¶
Navigate to the Entity catalog from the 'Explore' section of the menu.
Repeat this for each entity:
- Click
.
- Fill in the form: the Entity's Name, its Serving Name and optionally its description.
- Confirm by clicking
.
Step 4: Review Registered Entities¶
Verify the registration by checking the Entity Catalog under the 'Explore' section.
Step 5: Tag Columns Representing Entities¶
From the menu, navigate to the 'Explore' section and access the Table catalog.
For each table, navigate to the 'Columns' tab and associate relevant columns with the entities they represent.
In GROCERYINVOICE,
- GroceryInvoiceGuid identifies invoice.
- GroceryCustomerGuid represents customer.
In INVOICEITEMS,
- GroceryInvoiceItemGuid identifies item.
- GroceryInvoiceGuid represents invoice.
- GroceryProductGuid represents product.
In GROCERYCUSTOMER,
- GroceryCustomerGuid identifies customer.
- State represents frenchstate.
In GROCERYPRODUCT,
- GroceryProductGuid identifies product.
- ProductGroup represents productgroup.
Step 6: Review Entities Relationships¶
Verify the relationships established by the tagging.
Navigate to the Table Catalog, click to verify the table diagram established by the tagging.