turbot / steampipe-plugin-turbot

Use SQL to instantly query the Turbot CMDB. Open source CLI. No DB required.

Home Page:https://hub.steampipe.io/plugins/turbot/turbot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

filter column is not populated if no qual is provided for filter

kaidaguerre opened this issue · comments

Describe the bug
no values are returned for filter column if it is not passed as a qual

select
    id, filter
from
    turbot_demo.turbot_resource
where
    resource_type_uri = 'tmod:@turbot/aws-iam#/resource/types/accessKey'
and
    filter = '$.turbot.custom.createTimestamp:<=T-30d'

returns

+-----------------+-----------------------------------------+
| id              | filter                                  |
+-----------------+-----------------------------------------+
| 209793964907564 | $.turbot.custom.createTimestamp:<=T-30d |
| 216255846230771 | $.turbot.custom.createTimestamp:<=T-30d |
| 245280856563960 | $.turbot.custom.createTimestamp:<=T-30d |
| 215084373625757 | $.turbot.custom.createTimestamp:<=T-30d |
| 203192415818086 | $.turbot.custom.createTimestamp:<=T-30d |
| 241433740146509 | $.turbot.custom.createTimestamp:<=T-30d |
| 241434343667200 | $.turbot.custom.createTimestamp:<=T-30d |
| 224758800125111 | $.turbot.custom.createTimestamp:<=T-30d |
| 241434545526718 | $.turbot.custom.createTimestamp:<=T-30d |
| 245281067298667 | $.turbot.custom.createTimestamp:<=T-30d |
+-----------------+-----------------------------------------+

but

select
    id, filter
from
    turbot_demo.turbot_resource
where
    resource_type_uri = 'tmod:@turbot/aws-iam#/resource/types/accessKey'

returns

+-----------------+--------+
| id              | filter |
+-----------------+--------+
| 209793964907564 | <null> |
| 224758800125111 | <null> |
| 216255846230771 | <null> |
| 241434343667200 | <null> |
| 215084373625757 | <null> |
| 245280856563960 | <null> |
| 203192415818086 | <null> |
| 241434545526718 | <null> |
| 241433740146509 | <null> |
| 245281067298667 | <null> |
+-----------------+--------+

Steampipe version (steampipe -v)
v0.13.0

Plugin version (steampipe plugin list)
v0.4.0

To reproduce
run queries abovve

Expected behavior
filter column should. be populated

Additional context
n/a