steampipe-plugin-sdk icon indicating copy to clipboard operation
steampipe-plugin-sdk copied to clipboard

Join query not working correctly when used with a where clause with key columns used for `joining` and `where` clause

Open LalitLab opened this issue 4 years ago • 3 comments

https://github.com/turbot/steampipe-plugin-aws/pull/659#issuecomment-923254224 The following query works fine:

select name, ps.arn
from aws.aws_ssoadmin_permission_set as ps
join aws.aws_ssoadmin_instance as i on ps.instance_arn = i.arn

The following does not:

select name, ps.arn
from aws.aws_ssoadmin_permission_set as ps
join aws.aws_ssoadmin_instance as i on ps.instance_arn = i.arn
where ps.arn = 'arn:aws:sso:::permissionSet/ssoins-1234567890abcef/ps-1234567890abcef';

The latter results in a call to getSsoAdminPermissionSet, but when that function tries to read d.KeyColumnQuals["arn"] there is no value - even though there's an appropriate value in the WHERE clause in that query. I'm not sure if I'm doing something wrong or if this is a potential bug? (I've declared the columns required in Table.Get)

LalitLab avatar Sep 21 '21 07:09 LalitLab

Log file database-2021-09-21.log

LalitLab avatar Sep 21 '21 07:09 LalitLab

@kaidaguerre CC

binaek avatar Jun 23 '23 12:06 binaek