2. Register tables
Our catalog is created and we can start registering tables in it.
Step 1: Select Data¶
We'll utilize the four tables of our Grocery Datasets:
Table | Description |
---|---|
GROCERYINVOICE | Grocery invoice details, containing the timestamp and the total amount of the invoice |
INVOICEITEMS | The grocery product item details within each invoice, including the quantity, total cost, discount applied, and product ID |
GROCERYCUSTOMER | Customer details, including their name, address, and date of birth |
GROCERYPRODUCT | The product group description for each grocery product |
Step 2: Locate Your data¶
From the menu, go to the Explore section and access the source tables.
You will find the four tables under the "DEMO_DATASETS" database and the "GROCERY" schema.
Step 3: Understand Table Types¶
For accurate feature derivation, FeatureByte needs to understand the 'roles' of the various tables.
Identify each table's type:
- GROCERYINVOICE: Event table (captures specific business events).
- INVOICEITEMS: Item table (details about events).
- GROCERYCUSTOMER: Slowly Changing Dimension (SCD) table (customer details that change over time).
- GROCERYPRODUCT: Dimension table (descriptive, static data).
Step 4: Register the GROCERYINVOICE table as an Event Table¶
1. Select the Table¶
- Choose the GROCERYINVOICE table.
- Click on "Register New Table".
2. Define the table type.¶
Select 'event table'.
3. Identify its key columns¶
- Event ID: GroceryInvoiceGuid
- Event Timestamp Column: Timestamp
- Event Timestamp Timezone Column: tz_offset
- Record Creation Timestamp Column Name: record_available_at
4. Assign the name 'GROCERYINVOICE' to the table¶
5. Set Up Default Feature Job¶
- For consistent data handling in event tables, establish a default feature job setting.
- Click 'autofill recommended settings' to analyze the data availability in the source table.
- Once analysis is complete, settings are automatically filled.
- Optionally, download the analysis report.
6. Finalize Registration¶
Confirm your settings and complete the process by clicking "Register Table".
Step 4: Register the INVOICEITEMS table as an Item Table¶
1. Select the Table¶
- Choose the INVOICEITEMS table.
- Click on "Register New Table".
2. Define the table type.¶
Select 'item table'.
3. Identify the Event Table it is associated with¶
- Event Table: GROCERYINVOICE
4. Identify its key columns¶
- Item ID Column: GroceryInvoiceItemGuid
- Event ID Column: GroceryInvoiceGuid
- Record Creation Timestamp Column Name: record_available_at
5. Assign the name 'INVOICEITEMS' to the table¶
6. Finalize Registration¶
Confirm your settings and complete the process by clicking "Register Table".
Step 5: Register the GROCERYCUSTOMER table as a SCD Table¶
1. Select the Table¶
- Choose the GROCERYCUSTOMER table.
- Click on "Register New Table".
2. Define the table type.¶
Select 'scd table'.
3. Identify its key columns¶
- Natural Key Column: GroceryCustomerGuid
- Surrogate Key Column: RowID
- Effective Timestamp Column: ValidFrom
- Current Flag Column: CurrentRecord
- Record Creation Timestamp Column: record_available_at
4. Assign the name 'GROCERYCUSTOMER' to the table¶
5. Finalize Registration¶
Confirm your settings and complete the process by clicking "Register Table".
Step 6: Register the GROCERYPRODUCT table¶
1. Select the Table¶
- Choose the GROCERYPRODUCT table.
- Click on "Register New Table".
2. Define the table type.¶
Select 'dimension table'.
3. Identify its key columns¶
- Dimension ID Column: GroceryProductGuid
4. Assign the name 'GROCERYPRODUCT' to the table¶
5. Finalize Registration¶
Confirm your settings and complete the process by clicking "Register Table".
Step 7: Review Registered Tables¶
Verify the registration by checking the Table Catalog under the 'Explore' section.