I am new to postgres and DW, and I have to design a DATE Dimension as given in book. I saw many places on the web and I did not succeed so far, can some explain how to populate fields like 'Fiscal Week', 'Fiscal Month', 'Fiscal Half year'
Thank you
I guess that you want 10 years Date Dimension table with all columns presented in Figure 2.4 (based on Google Books). Check in documentation:
to_charwith Table 9-21 for template patternsdate_partgenerate_series(start, stop, step interval)To get all days within 10 years you could write:
According to Figure 2.5 create table as e.g.:
Insert command:
I hope this gives you some framework and starting point.