Hello @FCB developer ,
I apologize for the delay in the answer, I think I answered it previously but the answer probably didn't go through.
For your question, I see two things that are problematic in your query:
The "any" after attributes basically says, that you want to filter such CIs where there is at least some attribute without any business terms. But you want such CIs, where there are no business terms on all terms. So the key word is actually all
.
Second thing, using the property "schema" doesn't work for all CIs because this property isn't populated for all technologies. Usually it works with standard relational databases, but for some other (big data, S3, ...) this property is empty. It is safer to use the property $parent
which means usually schema, but it can be also a folder (in S3), database (Teradata) etc. So I would change the query like this:
$parent.name is 'cli_dwh' and attributes.all(termInstances.count() == 0)
I tested it and it seems to work.
Btw this query only takes into account terms on attributes, if you would like to also consider terms on the CI itself, you need to add "and termInstances.count() == 0
" at the beginning, middle or the end of the current query.
Kind regards,
Anna