Hi everyone, I am trying to map a date dimension t...
# gooddata-platform
k
Hi everyone, I am trying to map a date dimension to my data, but I am getting an error (see below). The data are from BQ, in
yyyy-mm-dd
format, which should be okay according to this. However, the data type of date column in my data is string, is it the problem, must the column be a date data type?
m
Hi Karel, may I know how are you loading the data to your workspace?
k
Hi, I am using Google BigQuery Data Source in Data Integration Console.
m
In that case, can you please make sure the data type for the date column in your table is “Date”? GoodData-BigQuery Integration Details - Gooddata Free
k
That is the thing, I am not sure I am able to do it. I can have type "Timestamp" though, it could work, right (based on the table you provided)?
m
The change needs to be done on Bigquery side first. The answer here may give you an idea on how to do it: https://stackoverflow.com/questions/36071216/how-to-change-a-column-type-of-a-bigquery-table-by-querying-and-exporting-to-its
j
Or you can create a view, where you CAST the column to one of supported data types.
k
Thank you for your suggestions. Creating a view could work, rewriting the whole table (every day) is not sustainable. However, could you please help me with the "Timestamp solution"? That would be the cleanest solution. I changed the way how my data are written into BigQuery and the column is now timestamp. After this, it is possible to map my data to the date dimension. However, when creating an insight, all date values appear as "(empty value)". Do you have any ideas, what the problem is? Should I change somehow the date template for the date dimension?
m
Timestamps are not supported natively by our platform, it would only be possible to declare the date part of your timestamp as date data type, however, the following article goes over how to set up a custom time dimension: Using a Custom Time Dimension in a Logical Data Model - Gooddata Free