Hi, I'm wondering why I can add a column to a data...
# gooddata-platform
k
Hi, I'm wondering why I can add a column to a dataset that's specified as a timestamp (Postgres data type) but after it's added it shows as numeric. It seems like the source type of timestamp is forceably coerced to either string or number? Yet on another dataset, when I added it by dragging it onto the LDM, the system saw that a column was a timestamp, and added it as a key separated at the bottom of the dataset, and also created a separate Date type dataset that references the dataset it came from. Why is there such different behavior for 2 columns that have the same exact source type? See screenshots:
m
Hi Kurt, in GoodData Cloud, date/timestamp datasets are entities of their own, meaning that they have this data type pre-assigned from when the platform queries your database to create the LDM. If you add a new column to a dataset, it can only be either an attribute or a fact. That's why when you drag and drop the date dataset to the canvas, it is correctly identified as such.
m
Just to add to that, if you need to add a new date to your dataset, depending on whether you want it to be a brand new date dimension or reference to an existing one, you either add new date dimension to your model and then drag an arrow from it (or any existing one) to your dataset. Then just make sure to also map the reference in the dataset to the right date/datetime column in your table. I agree that it is not as straightforward as adding a new fact or attribute, but it is probably because in case of date, it is treated more like a reference to other object.