turbot / steampipe-plugin-googlesheets

Use SQL to instantly query spreadsheets, sheets, and cell data from Google Sheets. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/turbot/googlesheets
Apache License 2.0
31 stars 0 forks source link

Automatically create each sheet into a table when no sheet is specified in the spc does not auto-populate Closes #13 #32

Closed ParthaI closed 1 year ago

ParthaI commented 1 year ago

Example query results

Results ``` > .inspect googlesheets +---------------------------------------------------+------------------------------------------------------------------------+ | table | description | +---------------------------------------------------+------------------------------------------------------------------------+ | B-Brief-Outcome(Manual-TestResults(SDK5.5.0-rc.0) | Retrieves data from B-Brief-Outcome(Manual-TestResults(SDK5.5.0-rc.0). | | googlesheets_cell | Retrieve information of cells of a sheet in a spreadsheet. | | googlesheets_sheet | Retrieve the sheet in a given spreadsheet. | | googlesheets_spreadsheet | Retrieve the metadata of given spreadsheet. | +---------------------------------------------------+------------------------------------------------------------------------+ > select * from "B-Brief-Outcome(Manual-TestResults(SDK5.5.0-rc.0)" +--------------------------------------------+----------------------------------+--------------------------------------------------------+-----------------------------------------------------------------> | Observation in brief | B | C | D > | Based on two people config with the follow | | | > +--------------------------------------------+----------------------------------+--------------------------------------------------------+-----------------------------------------------------------------> | | | | > | | SDK 5.5.5-rc.0 | | > | | 3 min 59 sec | | > | | Works fine | Works fine | No significant time difference > | | | | > | | 3 min 20 sec | | > | | Works Fine in both person's case | Results in Error in both person's case | Primary Error > | | | | > | | | | ERROR: failed to start plugin 'hub.steampipe.io/plugins/turbot/a> | | | | > | | | | ERROR: query timeout exceeded (240s) > | | SDK 5.4.1 | | > | | SDK 5.4.1 | SDK 5.5.5-rc.0 | Remarks > | | Works fine for Madhushree Ray | Works fine for Madhushree Raywith much increased time | Raj got this error for SDK 5.5.5-rc.0 > | | | | Section 1.1 till 1.12 > | | Works fine for Rajesh Mohanty | Ends in error for Rajesh Mohanty | > | | | | ERROR: failed to start plugin 'hub.steampipe.io/plugins/turbot/a> | | | | OR > | | | | ERROR: query timeout exceeded (240s) (Sec 1.12) > | | | | Only 1 with aws iam generate-credential-report (1.10) (Can be ig> | | | | > | | | | NOTE: The experience for "Benchmark Section - 2 with SDK 5.5.0-r> | | | | aws_compliance.benchmark.cis_v150_2" was not similar to the abov> | | | | > | | | | We can test controls involving cis_v150_1_16 (iam_policy_all_att> +--------------------------------------------+----------------------------------+--------------------------------------------------------+-----------------------------------------------------------------> > select * from "benchmark check - SDK version 4.1.13" +------------------------------------------------------------------------------------------------------------------------------------------+------------+--------------------------------------------------------------------------------------------------------------------> | benchmark name | owner | run 1 > +------------------------------------------------------------------------------------------------------------------------------------------+------------+--------------------------------------------------------------------------------------------------------------------> | audit_manager_control_tower | Madhushree | Summary > | | | > | | | OK ................ 466 [========= ] > | | | SKIP ............ 0 [ ] > | | | INFO ............ 0 [ ] > | | | ALARM ........ 71 [== ] > | | | ERROR ....... 2 [= ] > | | | > | | | TOTAL ......... 73 / 539 [==========] > | | | > | hipaa | Raj | > | Try 1- increasing the increased_time_out to 10 without max_parallel -- if this works, then it's related to more APi issues than the SDK. | | > | | | > | Test setup | | > | AWS Plugin with NEW BRANCH & CLI Steampipe v0.19.0-alpha.2 & v0.18.5 | | > | | | > | steampipe check benchmark.hipaa --output csv --export=benchmark.hipaa_timeout_10_multi_auth_agg_new_branch_rc6_run1.csv | | > | steampipe check benchmark.hipaa --output csv --export=benchmark.hipaa_timeout_10_multi_auth_agg_new_branch_rc6_run2.csv | | > | rbi_cyber_security | Madhushree | Summary > | | | > | | | OK ................ 1,821 [======= ] > | | | SKIP ............ 15 [= ] > | | | INFO ............. 0 [ ] > | | | ALARM ........ 1,018 [==== ] > | | | ERROR ........ 1 [= ] > | | | > | | | TOTAL ....... 1,019 / 2,855 [==========] > | HIPAA | Priyanka | Summary > | steampipe check benchmark.hipaa_164_308_a_1_ii_b | | > | NEW BRANCH | | OK ............. 1,597 [======== ] > | STEAMPIPE_CACHE=true | | SKIP .................. 5 [= ] > | region "*" single-account="Dev-aab" | | INFO ............ 0 [ ] > | STEAMPIPE_QUERY_TIMEOUT=1000 | | ALARM ................. 576 [=== ] > | | | ERROR ....................... 0 [ ] > | | | > | | | TOTAL .................. 576 / 2,178 [==========] > | hipaa | Madhushree | Summary > | | | > | | | OK ........... 6,143 [====== ] > | | | SKIP .......194 [= ] > | | | INFO .............. 0 [ ] > | | | ALARM ......... 4,716 [===== ] > | | | ERROR ......... 11 [= ] > | | | > | | | TOTAL ....... 4,727 / 11,064 [==========] > | | | > | cis_v130 | Madhushree | Summary > | | | > | | | OK .................. 669 [======= ] > | | | SKIP .............. 18 [= ] > | | | INFO ............. 5 [= ] > | | | ALARM .......... 398 [==== ] > | | | ERROR ......... 5 [= ] > | | | > | | | TOTAL ............ 403 / 1,095 [==========] > | hipaa | Raj | > | Try 1- increasing the increased_time_out to 10 without max_parallel -- if this works, then it's related to more APi issues than the SDK. | | > | | | > | Test setup | | > | AWS Plugin with SDK 4.1.13 & CLI Steampipe v0.19.0-alpha.2 & v0.18.5 | | > | | | > | To narrow down above issue, we executed the below with no data | Raj | Summary > | steampipe check benchmark.hipaa_164_308_a_1_ii_b | | > | steampipe check benchmark.hipaa_164_308_a_1_ii_b | | OK ........ 936 [======= ] > | | | SKIP ............. 3 [= ] > | This resulted the control rendering different outcomes | | INFO ............ 0 [ ] > | | | ALARM ........ 577 [==== ] > | | | ERROR ........... 0 [ ] > > select * from "Test Plan - Overall Result" +------------+---------+-----------------------------------------------------------------------------------------+-------------+------------------------------------+ | Test cases | B | Credentials | Test Status | _ctx | +------------+---------+-----------------------------------------------------------------------------------------+-------------+------------------------------------+ | | | localstack | | {"connection_name":"googlesheets"} | | | | SSO credentials - 3 accounts with aggregator | | {"connection_name":"googlesheets"} | | | | SSO credentials - 1 account | | {"connection_name":"googlesheets"} | | | | govcloud - select * from should give zero results (no error) | | {"connection_name":"googlesheets"} | | | | regions = [ "us-*" ], AWS_REGION=eu-west-1 - should give results for eu-west-1 only | | {"connection_name":"googlesheets"} | | | | regions = [ "eu-west-2" ] - should give results for eu-west-2 only | | {"connection_name":"googlesheets"} | | | | Regions | | {"connection_name":"googlesheets"} | | | | govcloud account, regions = [ "*" ] - should give results for all regions in partition | | {"connection_name":"googlesheets"} | | | dsadfsa | regions not set - should give results for default region only | | {"connection_name":"googlesheets"} | | | | Service regions: | | {"connection_name":"googlesheets"} | | | | govcloud - select * from aws_vpc should give results for all regions | | {"connection_name":"googlesheets"} | | | | Access & Secret key pair in config - 1 account | | {"connection_name":"googlesheets"} | | | | govcloud account, regions = [ "us-*" ] | | {"connection_name":"googlesheets"} | | | | regions = [] - should give results for ??? | | {"connection_name":"googlesheets"} | | | | regions = [], AWS_REGION=ap-south-1 - should give results for ap-south-1 only | | {"connection_name":"googlesheets"} | | | | EC2 IAM role - 1 account | | {"connection_name":"googlesheets"} | | | | regions = [ "*" ] - should give results for all regions in partition | | {"connection_name":"googlesheets"} | | | | EC2 IAM role - 3 accounts with aggregator | | {"connection_name":"googlesheets"} | | | | Other methods? | | {"connection_name":"googlesheets"} | | | | Access & Secret key & Session token in config - 1 account | | {"connection_name":"googlesheets"} | | | | china account | | {"connection_name":"googlesheets"} | | | | regions = [], AWS_REGION=eu-west-1 - should give results for eu-west-1 only | | {"connection_name":"googlesheets"} | +------------+---------+-----------------------------------------------------------------------------------------+-------------+------------------------------------+ > select * from "Test Plan - Overall Result" +------------+-----------------------------------------------------------------------------------------+-------------+------------------------------------+ | Test cases | Credentials | Test Status | _ctx | +------------+-----------------------------------------------------------------------------------------+-------------+------------------------------------+ | | regions = [ "*" ] - should give results for all regions in partition | | {"connection_name":"googlesheets"} | | | regions = [ "us-*" ], AWS_REGION=eu-west-1 - should give results for eu-west-1 only | | {"connection_name":"googlesheets"} | | | regions = [], AWS_REGION=eu-west-1 - should give results for eu-west-1 only | | {"connection_name":"googlesheets"} | | | regions = [], AWS_REGION=ap-south-1 - should give results for ap-south-1 only | | {"connection_name":"googlesheets"} | | | regions not set - should give results for default region only | | {"connection_name":"googlesheets"} | | | regions = [] - should give results for ??? | | {"connection_name":"googlesheets"} | | | Access & Secret key pair in config - 1 account | | {"connection_name":"googlesheets"} | | | regions = [ "eu-west-2" ] - should give results for eu-west-2 only | | {"connection_name":"googlesheets"} | | | Access & Secret key & Session token in config - 1 account | | {"connection_name":"googlesheets"} | | | Other methods? | | {"connection_name":"googlesheets"} | | | china account | | {"connection_name":"googlesheets"} | | | SSO credentials - 3 accounts with aggregator | | {"connection_name":"googlesheets"} | | | EC2 IAM role - 1 account | | {"connection_name":"googlesheets"} | | | localstack | | {"connection_name":"googlesheets"} | | | govcloud account, regions = [ "us-*" ] | | {"connection_name":"googlesheets"} | | | govcloud account, regions = [ "*" ] - should give results for all regions in partition | | {"connection_name":"googlesheets"} | | | Service regions: | | {"connection_name":"googlesheets"} | | | govcloud - select * from aws_vpc should give results for all regions | | {"connection_name":"googlesheets"} | | | SSO credentials - 1 account | | {"connection_name":"googlesheets"} | | | govcloud - select * from should give zero results (no error) | | {"connection_name":"googlesheets"} | | | EC2 IAM role - 3 accounts with aggregator | | {"connection_name":"googlesheets"} | | | Regions | | {"connection_name":"googlesheets"} | +------------+-----------------------------------------------------------------------------------------+-------------+------------------------------------+ Time: 1.0s. Rows fetched: 22. Hydrate calls: 0. ```