Custom Date Dimensions

In GoodData, you can add to a project a custom date dimension with different structure of months, weeks etc. - typical example is financial year that runs from April to March.

GoodData has plenty of templates created, so when faced with this first investigate whether a convenient/fitting dimension template exists. We also have one Keboola custom template (that has normal calendar years but contains extended week calculations - so you can select any day of the week as the starting one. This was originally created for a client who wanted Friday - Thursday weeks).

If there is not a custom dimension that fits your needs, you need to raise GoodData and have one created. Attached are two documents that would guide you how to specify it for them. You want to provide the .csv, ideally have the customer generate it so they have responsibility over the data. Also, make sure there is enough time (the dimension is "long enough" in the past and for the future. It is going to be pain one day to have to replace it, so make sure it doesn't have to happen before your retirement age).

Once the template exists (it will take GoodData at least two weeks to deploy it), use the following steps to deploy it:

  • add the dimension to the project in https://secure.gooddata.com/gdc/md/{pid}/ldm/manage2 run MAQL: 
    INCLUDE TEMPLATE "URN:{template_name}:DATE" MODIFY (IDENTIFIER "financialday", TITLE "FinancialDay");
    IMPORTANT - while you can choose the TITLE freely, do NOT use capital letters in the identifier (our GD Writer does not support it).
  • tell GD writer in KBC project about the dimension - in SAPI, go to the GD writer's bucket, and find table "date_dimensions".

notice the "template" filled in, also that "isExported" needs to be "1" - otherwise the writer will attempt to create the dimension.
Once this is done, the writer UI will normally offer the dimension for data to connect to it.

That's it!

Ċ
Marcus Wong,
Oct 29, 2014, 10:51 AM
ċ
fiscal_calendar.csv
(3935k)
Marcus Wong,
Oct 29, 2014, 10:55 AM
Comments