NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Active IQ Unified Manager Discussions

Issues with filer return results and Natural Keys.

olson
4,905 Views

Greetings,

                    I am building a filer for a project and ran into a issue. given the following filter:

select  aggregate.name as "aggregate.name"

from cm_storage.aggregate, cm_storage.cluster, cm_storage.node

where

node.id = aggregate.node_id

and cluster.id = node.cluster_id

and cluster.name = '${Clustername}'

order by  aggregate.available_size_mb

I am getting this error.

Filter 'test' returned attributes does not contain all natural keys. Filter's returned attributes '[aggregate.name]' , dictionary entry natural keys '[node.name, name, node.cluster.primary_address]'

I have attempted to modify this to include what I believe to be the rest of the natural keys

select  aggregate.name as 'aggregate.name',node.name as 'node.name', aggregate.name as 'aggregate.name', node.primary_address as 'node.cluster.primary_address'

from cm_storage.aggregate, cm_storage.cluster, cm_storage.node

where

node.id = aggregate.node_id

and cluster.id = node.cluster_id

and cluster.name = '${Clustername}'

order by  aggregate.available_size_mb

Filter 'test' returned attributes does not contain all natural keys. Filter's returned attributes '[aggregate.name, node.cluster.primary_address, node.name]' , dictionary entry natural keys '[node.name, name, node.cluster.primary_address]'

I would have expected the second query to correct the issue however I think I am missing something.

Thanks for your help

1 ACCEPTED SOLUTION

sinhaa
4,913 Views

The required natural keys are : '[node.name, name, node.cluster.primary_address]'

Try this:

select  aggregate.name as 'name',node.name as 'node.name', aggregate.name as 'aggregate.name', node.primary_address as 'node.cluster.primary_address'

from cm_storage.aggregate, cm_storage.cluster, cm_storage.node

where

node.id = aggregate.node_id

and cluster.id = node.cluster_id

and cluster.name = '${Clustername}'

order by  aggregate.available_size_mb

I just used aggregate.name as 'name' instead of aggregate.name as 'aggregate.name'

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

2 REPLIES 2

sinhaa
4,914 Views

The required natural keys are : '[node.name, name, node.cluster.primary_address]'

Try this:

select  aggregate.name as 'name',node.name as 'node.name', aggregate.name as 'aggregate.name', node.primary_address as 'node.cluster.primary_address'

from cm_storage.aggregate, cm_storage.cluster, cm_storage.node

where

node.id = aggregate.node_id

and cluster.id = node.cluster_id

and cluster.name = '${Clustername}'

order by  aggregate.available_size_mb

I just used aggregate.name as 'name' instead of aggregate.name as 'aggregate.name'

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

olson
4,905 Views

So in the primary table all name references should be direct? This case cm_storage.aggreagate

That worked great!

Thanks for your help,

John

Public