We will now construct our Fact table. You can see the workflow below.
What I did here, wasÂ
1) replace the sector name by the sector ID (first Value Lookup node)
2) replace the subsector name by the subsector ID (second Value Lookup node)
3) extract the 'year' part from the start_time columns
4) get rid of the superfluous columns
5) write the results to the 'emission_facts' table
Below you can see the resulting fact table. Notice it is a lot more 'compact' than the original staging table, but still contains all the relevant information.
On the next page we will be creating some interesting graphs on this data !