Hi! Maybe I posted an incorrect channel, any help ...
# ui
k
Hi! Maybe I posted an incorrect channel, any help here? https://datahubspace.slack.com/archives/C02R2NBJXD1/p1662573875219999
plus1 1
b
hey Atul! where in the UI are you displaying these fields for your custom aspect? without changing frontend code, in order to set a specific order I believe you'll want to update whatever resolver you have in order to get these custom fields to the UI.
k
Thanks Chris! Where/how do i specify the resolver.. I was following the example .pdl in the metadata-models-custom folder. So yes i am using a custom aspect as define in that example.. i wasnt sure where to make the resolver change
b
okay actually after looking into this some more I don't believe there's a way to force a specific order for custom aspects. Basically we're retrieving the data for the aspect from your document store and returning that to the ui. From the example it will be a list of rules. However, the resolver that returns this data is meant to be generalized and data agnostic, meaning we can't set a sort on the data because we don't really know what it is and what to sort off of. Same thing with changing the frontend data
are you seeing a different random order of your custom data every time you go into the new tab? or is it consistently the same order?
one thing we would be able to do is add table sorting into the UI for these custom fields so that you could click a column and assort ascending or descending (it would have to be built dynamic for all different types of data). However that would be a new feature and would have to be something that we prioritize building
k
So I am not as concerned with sort order of the rows. It more about the order in which columns appear. Imagine field name for data quality showing up somewhere in the middle and something not important as the first column... That's what I am trying to fix.
b
oooo gotcha sorry for my misunderstanding. and it's not in the order that the fields are in for the data you pipe in? for example in the example data:
Copy code
{
     "field": "my_event_data", 
     "isFieldLevel": false, 
     "type": "isNull", 
     "checkDefinition": "n/a", 
     "url": "<https://github.com/datahub-project/datahub/blob/master/checks/nonNull.sql>" 
     },
are they not showing up in column order
field
,
isFieldLevel
,
type
,
checkDefinition
,
url
?
k
Correct, so maybe checkdefinition is first column on UI, and something else is next, then field name and so on..
b
okay understood. is the order consistent when you come back time and again?
k
Yes the order is consistent