Skip to content

Add tables aws_s3tables_namespace, aws_s3tables_table and aws_s3tables_table_bucket #2498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 21, 2025

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented May 16, 2025

Integration test logs

Logs
Add passing integration test logs here

Example query results

Results
> select
  t.name as table_name,
  t.format as table_format,
  t.type as table_type,
  n.namespace as namespace_name,
  b.name as bucket_name,
  t.created_at,
  t.modified_at
from
  aws_s3tables_table t
  join aws_s3tables_namespace n on t.namespace_id = n.namespace_id
  join aws_s3tables_table_bucket b on n.table_bucket_id = b.table_bucket_id
order by
  b.name, n.namespace, t.name;
+---------------+--------------+------------+------------------------+-----------------------+---------------------------+---------------------------+
| table_name    | table_format | table_type | namespace_name         | bucket_name           | created_at                | modified_at               |
+---------------+--------------+------------+------------------------+-----------------------+---------------------------+---------------------------+
| daily_sales   | ICEBERG      | customer   | parth_test_namespace_1 | partha-table-bucket-2 | 2025-05-07T18:24:06+05:30 | 2025-05-07T18:24:07+05:30 |
| daily_sales   | ICEBERG      | customer   | partha_namespace_1     | partha-test-bucket-1  | 2025-05-07T18:25:24+05:30 | 2025-05-07T18:25:25+05:30 |
| daily_sales_1 | ICEBERG      | customer   | partha_namespace_1     | partha-test-bucket-1  | 2025-05-07T18:26:42+05:30 | 2025-05-07T18:26:43+05:30 |

@ParthaI ParthaI requested a review from misraved May 16, 2025 11:05
@ParthaI ParthaI self-assigned this May 16, 2025
@ParthaI ParthaI marked this pull request as draft May 16, 2025 11:05
@ParthaI ParthaI changed the title Issue 2403 Add table aws_s3tables_namespace, aws_s3tables_table and aws_s3tables_table_bucket May 16, 2025
@ParthaI ParthaI changed the title Add table aws_s3tables_namespace, aws_s3tables_table and aws_s3tables_table_bucket Add tables aws_s3tables_namespace, aws_s3tables_table and aws_s3tables_table_bucket May 16, 2025
@ParthaI ParthaI linked an issue May 16, 2025 that may be closed by this pull request
@ParthaI ParthaI marked this pull request as ready for review May 16, 2025 11:39
@cbruno10 cbruno10 requested a review from Copilot May 19, 2025 18:47
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for AWS S3 Tables by introducing three new Steampipe tables (aws_s3tables_table_bucket, aws_s3tables_namespace, and aws_s3tables_table) along with documentation, SDK client wiring, and region matrix logic.

  • Added the S3Tables Go SDK dependency and client factory
  • Implemented Steampipe table definitions for table buckets, namespaces, and tables (list/get/hydrate)
  • Added docs for the three new tables and registered them in the plugin

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
go.mod Added github.com/aws/aws-sdk-go-v2/service/s3tables
docs/tables/aws_s3tables_table_bucket.md Documentation for the aws_s3tables_table_bucket table
docs/tables/aws_s3tables_table.md Documentation for the aws_s3tables_table table
docs/tables/aws_s3tables_namespace.md Documentation for the aws_s3tables_namespace table
aws/service.go Introduced S3TablesClient to create the S3 Tables client
aws/multi_region.go Added S3TablesRegionsMatrix for service region support
aws/plugin.go Registered the three new tables in the plugin
aws/table_aws_s3tables_table_bucket.go Table definition and list/get logic for table buckets
aws/table_aws_s3tables_namespace.go Table definition and list/get logic for namespaces
aws/table_aws_s3tables_table.go Table definition and list/get logic for tables
Comments suppressed due to low confidence (1)

docs/tables/aws_s3tables_table.md:2

  • The title contains a duplicated word 'Tables'. Consider changing it to 'Query AWS S3 Tables using SQL' to avoid redundancy.
title: "Steampipe Table: aws_s3tables_table - Query AWS S3 Tables Tables using SQL"

Copy link
Contributor

@misraved misraved left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ParthaI please take a look at the review comments. Thanks!!


commonColumnData, err := getCommonColumns(ctx, d, nil)
if err != nil {
plugin.Logger(ctx).Error("S3TablesRegionsMatrix", "connection_name", d.Connection.Name, "unable to get partition name", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the error message correct? In the above function we are trying to get the common columns data

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to plugin.Logger(ctx).Error("S3TablesRegionsMatrix", "getCommonColumns", "unable to get common column info", err)

Copy link
Contributor

@misraved misraved left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ParthaI please take a look at the minor review comments

@misraved misraved merged commit dcc3e8e into main May 21, 2025
1 check passed
@misraved misraved deleted the issue-2403 branch May 21, 2025 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add aws_s3tables_bucket and aws_s3tables_table tables
2 participants