For LDM ADDv2, should I label TIME typed fields wi...
# gooddata-platform
p
For LDM ADDv2, should I label TIME typed fields with the
d
(date) or
a
(attribute) prefix?
m
You mean TIME as time without date, right? In that case you will need to use 'a' prefix and treat it as a string (probably even convert it to string) since GoodData hosted does not support time directly. If you need to group by hours etc., you ca use this approach where you build your own "time dimension" as a separate dataset from attributes and connect it tonyour data: https://community.gooddata.com/metrics-and-maql-kb-articles-43/data-modeling-time-221
p
OK, thanks for the info!
So then can I do a Metric that does the difference between two TIME fields, or should I precompute?
m
Attributes can not be used for mathematical operations. So either you will need to pre-compute. Or, if you would need some calculation with time within MAQL, I would suggest to also load the value as a fact i.e. as # of seconds from the beginning of day. Then you can use these facts to calculate difference. The result will be a number (i.e. number of seconds if you do what I described above) and then you can format this number using the modulo formatting to i.e. days, hours and minutes as described here: https://help.gooddata.com/pages/viewpage.action?pageId=86795624#FormattingNumbersinInsightsandReports-Format