According to Kimball's dimensional modeling best practices, avoiding string values in the fact table is highly recommended. The fact table should contain numeric values that can be used for aggregation and analysis.
In your case, the "Leave Type" and "ApprovalStatus" columns are string values that indicate the type of leave taken and the approval status of the leave, respectively. We call them descriptive attributes since they provide additional context to the leave fact data.
You must create separate dimension tables for "Leave Type" and "ApprovalStatus" and then reference them using foreign keys in your fact table.
For example, you can create a "dim_leave_type" dimension table with columns like "leave_type_key" (primary key) and "leave_type_description". Similarly, you can create a "dim_approval_status" dimension table with columns like "approval_status_key" (primary key) and "approval_status_description".
Instead of storing the actual text values for "Leave Type" and "ApprovalStatus" in your fact table, you can use the foreign keys referencing the respective dimension tables. This way, you maintain the integrity of the dimensional model and enable efficient querying and analysis by leveraging the numeric keys.
Separating the descriptive attributes into dimension tables allows you to easily manage and update the values without modifying the fact table structure. It also allows for better flexibility and scalability in your data model.