Hi! I have a question on the sorting order of an a...
# gooddata-platform
j
Hi! I have a question on the sorting order of an attribute, where the numbers seems to be sorted alphabetically rather than numerically. I also tried changing the setting for the sorting to be descending and no change. Thanks in advance for the help!
b
Hi Josefin, you have basically two options 1. to make the attribute integer instead of varchar 2. to use custom sort label https://help.gooddata.com/pages/viewpage.action?pageId=107721973
m
Just a note @Josefin Gruvander, if you change the data type of the attribute to Integer, please note that for some internal reason, you will not be able to load NULL value to it (the dataload will fail in this case). So if you go this way, please make sure you modify the NULL/empty value in your database to some integer value i.e. -1 or 999.
j
I changed it to integer, both in the database view that is mapped to the dataset and in the attribute, but it didn't solve the sorting problem. I was able to reload the data to the workspace. Is there a setting I've missed somewhere?
m
Hmm, that is odd. Were you able to publish the model changes successfully? Wasn’t there some error? From what I can see on the back-end, the physical column is still VARCHAR but there is “columnSynchronize” with type INTEGER (basically a request to change the type to integer. https://brandranalytics-dev.on.gooddata.com/gdc/md/whr4wo8i857mlyius0p1w78kmvrulu3i/obj/1274 and I do not see a record of synchronization of the dataset here: https://brandranalytics-dev.on.gooddata.com/#s=/gdc/workspaces/whr4wo8i857mlyius0p1w78kmvrulu3i[…]|/gdc/md/whr4wo8i857mlyius0p1w78kmvrulu3i/obj/1325 Normally during the model change publishing, this should synchronize automatically. What you can do is either force synchronization of the dataset again. I see two options: A) go to https://brandranalytics-dev.on.gooddata.com/gdc/md/whr4wo8i857mlyius0p1w78kmvrulu3i/ldm/manage2: and paste
SYNCHRONIZE {dataset.vanswers} PRESERVE DATA;
into the textfield there and click submit. or B) Using the Data Model UI, add some dummy attribute to this dataset, publish the model change and then again remove that attribute and publish the change. Both these should re-synchronize the dataset and propagate the change of the data type which for some reason did not propagate yet.
j
alright, many thanks, that solved it!