Active IQ Unified Manager Discussions

Issues with filer return results and Natural Keys.

olson
3,717 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
3,725 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
3,726 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
3,717 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