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

`aws_wafregional_rule` table returns inconsistent results

Open misraved opened this issue 1 year ago • 0 comments

Describe the bug On running queries for aws_wafregional_rule table, the results are very inconsistent. Please take a look at the different sets of results below:

select name, title from aws_wafregional_rule where rule_id = 'b96dfdd7-a60f-45d9-1234-709c24123456'
+----------------+----------------+
| name           | title          |
+----------------+----------------+
| test1213 | test1213 |
| test1213 | test1213 |
| test1213 | test1213 |
+----------------+----------------+

Time: 20ms. Rows fetched: 3 (cached). Hydrate calls: 0.

select name, title from aws_wafregional_rule where rule_id = 'b96dfdd7-a60f-45d9-1234-709c24123456'
+----------------+----------------+
| name           | title          |
+----------------+----------------+
| test1213 | test1213 |
| test1213 | test1213 |
| test1213 | test1213 |
+----------------+----------------+

Time: 20ms. Rows fetched: 3 (cached). Hydrate calls: 0.
> .cache off
> .cache clear
> select name, title from aws_wafregional_rule where rule_id = 'b96dfdd7-a60f-45d9-1234-709c24123456'
+------+-------+
| name | title |
+------+-------+
+------+-------+

Time: 0.8s.
> select * from aws_wafregional_rule
+------+-----+---------+-------------+------------+-------+------+-----------+--------+------------+------+
| name | arn | rule_id | metric_name | predicates | title | akas | partition | region | account_id | _ctx |
+------+-----+---------+-------------+------------+-------+------+-----------+--------+------------+------+
+------+-----+---------+-------------+------------+-------+------+-----------+--------+------------+------+

Time: 0.7s.

select name, title from aws_wafregional_rule where rule_id = 'b96dfdd7-a60f-45d9-1234-709c24123456'
Error: get call returned 8 results - the key column is not globally unique (SQLSTATE HV000)

Steampipe version (steampipe -v) Example: v0.16.0-rc.11

Plugin version (steampipe plugin list) Example: v0.73.0 Also tested it out from the sdk_v4 branch which includes the v4.0.2 Steampipe plugin SDK version.

To reproduce

  1. Run steampipe query
  2. Test select * from aws_wafregional_rule
  3. Test select * from aws_wafregional_rule where rule_id='xxxxx'

Expected behavior The table should return consistent results

Additional context Add any other context about the problem here.

misraved avatar Aug 23 '22 14:08 misraved