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

Natural key issue

rogerhinson
3,925 Views

Hey all,

 

I'm trying to get the list of exports for a given qtree using the actual_path.  I've got a query that runs fine in Toad, but doesn't run in WFA.

 

SELECT
  nfs_export.actual_path AS 'actual_path',
  export_path,
  qtree_id,
  ro_hosts,
  rw_hosts,
  root_hosts,
  vfiler.name AS 'vfiler.name',
  vfiler.ip_address,
  array.ip
FROM
  storage.nfs_export
LEFT JOIN
  storage.qtree ON qtree.id = storage.nfs_export.qtree_id
LEFT JOIN
  storage.vfiler ON vfiler.id = storage.nfs_export.vfiler_id
LEFT JOIN
  storage.array ON array.id = storage.nfs_export.array_id
WHERE
  export_path = ${qtree_path}
 

 

My error in WFA is:

 

Filter 'Filter exports by qtree' returned attributes does not contain all natural keys. Filter's returned attributes '[actual_path, export_path, ip, ip_address, qtree_id, ro_hosts, root_hosts, rw_hosts, vfiler.name]' , dictionary entry natural keys '[vfiler.name, export_path, vfiler.array.ip]'

 

I THINK I'm just missing vfiler.array.ip, but I can't figure out how to add it.  I tried adding it to vfiler.ip_address, but then I get the error:

 

Failed to execute filter 'Filter exports by qtree' with parameters: {qtree_path=/vol/rogertest_nfs_20150324142302/rogertest_000}

 

Can someone help me out?  Also, why do queries work in Toad and then fail in WFA?  Does Toad not care about the natural keys?

 

Thanks,

Roger

 

1 ACCEPTED SOLUTION

rogerhinson
3,910 Views

Nevermind..  I forgot quotes around my variable.

 

Here's the working filter.

 

SELECT
    nfs_export.actual_path AS 'actual_path',
    export_path,
    ro_hosts,
    rw_hosts,
    root_hosts,
    vfiler.name AS 'vfiler.name',
    array.ip AS 'vfiler.array.ip'
FROM
    storage.nfs_export
LEFT JOIN
    storage.qtree
        ON qtree.id = nfs_export.qtree_id
LEFT JOIN
    storage.vfiler
        ON vfiler.id = nfs_export.vfiler_id
LEFT JOIN
    storage.array
        ON array.id = nfs_export.array_id
WHERE
    export_path = "${qtree_path}"

 

View solution in original post

1 REPLY 1

rogerhinson
3,911 Views

Nevermind..  I forgot quotes around my variable.

 

Here's the working filter.

 

SELECT
    nfs_export.actual_path AS 'actual_path',
    export_path,
    ro_hosts,
    rw_hosts,
    root_hosts,
    vfiler.name AS 'vfiler.name',
    array.ip AS 'vfiler.array.ip'
FROM
    storage.nfs_export
LEFT JOIN
    storage.qtree
        ON qtree.id = nfs_export.qtree_id
LEFT JOIN
    storage.vfiler
        ON vfiler.id = nfs_export.vfiler_id
LEFT JOIN
    storage.array
        ON array.id = nfs_export.array_id
WHERE
    export_path = "${qtree_path}"

 

Public