The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to reigister at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Active IQ Unified Manager Discussions

problem with a filter

solal

hey guys.

when trying to re-write a filter i have to do something similar but a bit else,

i encounter the following error while trying to save the filter's query:

Filter 'Filter luns for DS by name prefix in a specific volume' returned attributes does not contain all natural keys. Filter's returned attributes '[id, name, num_part]' , dictionary entry natural keys '[array.ip, name]'

i tried the containing query in a query builder in Toad and it returned data fine.

ideas?


SELECT

    storage.lun.name,

    storage.volume.id,

    SUBSTRING_INDEX(storage.lun.name,

    '${lun_name_prefix}',

    -1) AS num_part

FROM

    storage.volume,

    storage.lun

WHERE

   storage.lun.volume_id = storage.volume.id

    AND storage.lun.name LIKE '${lun_name_prefix}%'

ORDER by

    num_part desc

thanks!

solal.

1 ACCEPTED SOLUTION

ag
NetApp

Hi Solal,

Try this:

SELECT

    storage.lun.name as 'name',

    storage.array.ip as 'array.ip',

    storage.volume.id,

    SUBSTRING_INDEX(storage.lun.name,

    '${lun_name_prefix}',

    -1) AS num_part

FROM

    storage.volume,

    storage.lun,

    storage.array

WHERE

    storage.lun.volume_id = storage.volume.id

    AND storage.lun.name LIKE '${lun_name_prefix}%'

    AND storage.array.id = storage.volume.array_id

ORDER by

    num_part desc

View solution in original post

3 REPLIES 3

ag
NetApp

Hi Solal,

Try this:

SELECT

    storage.lun.name as 'name',

    storage.array.ip as 'array.ip',

    storage.volume.id,

    SUBSTRING_INDEX(storage.lun.name,

    '${lun_name_prefix}',

    -1) AS num_part

FROM

    storage.volume,

    storage.lun,

    storage.array

WHERE

    storage.lun.volume_id = storage.volume.id

    AND storage.lun.name LIKE '${lun_name_prefix}%'

    AND storage.array.id = storage.volume.array_id

ORDER by

    num_part desc

View solution in original post

solal

Hey Anil.

Thanks for that!

What was it? I understand the array.ip row was missing, right? I didn't write it coherently...

Why does it affect this query?

Thanks,

Soli.

ag
NetApp

Hi Solal,

The filter should return all the natural keys for the object being filtered. It can return other attributes as well but it SHOULD return the natural keys at least.

For dictionary object volume, the natural keys are:

1. array(reference)

2. name

For a reference, you will have to return all the natural keys of that Object. In this case it is the array that is being referenced.

The only natural key in array is the IP, i.e. "array.ip".

Hope this helps

-Anil

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public