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 Timestamp Column: Timestamp
- Event ID Column: GroceryInvoiceGuid
- Event Timestamp Timezone Column: tz_offset
- Event Timestamp Timezone Offset: Not Applicable
4. Assign the name 'GROCERYINVOICE' to the table¶
- The table description is inherited from the source table
5. Set Up Default Feature Job¶
- Record Creation Timestamp Column Name: record_available_at
- 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 and the main columns¶
- Event Table: GROCERYINVOICE
- Item ID Column: GroceryInvoiceItemGuid
- Event ID Column: GroceryInvoiceGuid
4. Assign the name 'INVOICEITEMS' to the table¶
- The table description is inherited from the source table
5. Select record creation timestamp column name¶
- Record Creation Timestamp Column Name: record_available_at
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 'Slowly Changing Dimension Table'.
3. Identify its key columns¶
- Natural Key Column: GroceryCustomerGuid
- Surrogate Key Column: RowID
- Effective Timestamp Column: ValidFrom
- End Timestamp Column: Not Applicable
- Current Flag Column: CurrentRecord
4. Assign the name 'GROCERYCUSTOMER' to the table¶
- The table description is inherited from the source table
5. Select record creation timestamp column name¶
- Record Creation Timestamp Column: record_available_at
6. 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¶
- The table description is inherited from the source table
5. Select record creation timestamp column name¶
- Leave this field blank
6. 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.