How to create a reference table in Snowflake that picks up the column name and the column value together as a result to be referenced in another SQL Query ?
Suppose on I have an Item Table ( as shown below - )
| ITEM_NAME|ORDER_TYPE | REGION|
|:--------|:----------:|------:|
| Godan | Return| North|
And I have a set of rules as mentioned below
- If Item name is '%NAME% then YES
- IF Region is 'NORTH' then NO etc
What would be the best possible way to create a reference table in Snowflake containing the results of these rules which can be later accessed by any other view in Snowflake(Column and Value together) or and ETL Tool ?