Hello again, quick follow-up question to metadata-...
# troubleshoot
g
Hello again, quick follow-up question to metadata-models-custom. I can't seem to get my array (the distinctValues column) to display in the UI. Here are how my pdl files are configured: File: distinctColValues.pdl
Copy code
namespace com.mycompany.dq

record distinctColValues {
  column: string
  distinctValues: array[string]
}
File: distinctValues.pdl
Copy code
namespace com.mycompany.dq

@Aspect = {
  "name": "distinctValues",
  "autoRender": true,
  "renderSpec": {
    "displayType": "tabular", // or properties
    "key": "distinct_key",
    "displayName": "Distinct Values"
  }
}
record distinctValues {
  distinct_key: array[distinctColValues]
}
}
I put some screenshots below. I see the data in GraphQL, just not in the UI Any help would be appreciated, thanks!
b
hey andreas! so for a
tabular
display type, you have
distinctValues
set up properly, but here we're expecting
distinctColValues
to be an object of key: value pairs. So what we're doing is getting the keys (in this case they would be
column
and
distinctValues
and making those the columns in the view. Then the values would be the row values. And then every
distinctColValues
object would be a new row here.
so in other words,
distinctValues
shouldn't be an array, a string, or boolean, or some other primitive type that isn't a collection
g
@bulky-soccer-26729 Ah ok, that makes sense. Thanks! So just to make sure I understand, it looks like for custom metadata there is no option for presenting the data similar to sample values in the stats tab? Maybe a workaround for now is just a comma separated list passed in as a string as part of a key-value pair
b
ahh yeah unfortunately not right now 😕 but yeah that could definitely work! stringify that list is a good call for now
g
@bulky-soccer-26729 Cool, sounds good. Thanks again!
b
of course!