Can someone please share a best practice for the situation I have encountered?
I mapped about 20 fixed width text files using SSIS to corresponding staging tables. The data flows as intended into these tables. These fixed width text files are large (e.g.: 1500 bytes) with different sub-record types--and thousands of records. The next step is for me to transform the data from staging into their destination tables.
There are many fields in these fixed width text files that have abbreviated codes that correspond to statuses, products, etc. (e.g.: A - apple, B - Banana, C - Cherry, etc.). There are reference tables and appendices in the fixed width text file mapping guide to decode the abbreviations. Sometimes there may be only three or four abbreviations for a field outlined in the guide. Sometimes a field may have an appendix outlining over a hundred possible choices and abbreviations.
In short, do I also need to create dimension tables for EVERY field listed in staging to decode these abbreviations? Or should I hardcode some of these fields in SQL when the options are limited?
CASE WHEN 'A' THEN 'Apple' WHEN 'B' THEN 'Banana' WHEN 'C' THEN 'Cherry' END AS fruit
My instinct is to be consistent and create a dimension table for all of these items but that may mean creating several hundred tables that would likely only be used in the staging process.
What works best here? Any help is appreciated. Thank you.