Skip to content

add ability to list schemas for multiple tables in cloud query - #3952

Closed
zreigz wants to merge 1 commit into
masterfrom
lukasz/prod-5091-add-ability-to-list-schemas-for-multiple-tables-in-cloud
Closed

add ability to list schemas for multiple tables in cloud query#3952
zreigz wants to merge 1 commit into
masterfrom
lukasz/prod-5091-add-ability-to-list-schemas-for-multiple-tables-in-cloud

Conversation

@zreigz

@zreigz zreigz commented Aug 3, 2026

Copy link
Copy Markdown
Member
  • Add SchemaInput.tables for exact multi-table schema lookups
  • Keep existing table LIKE filter for backward compatibility

Test Plan

Test environment: https://console.your-env.onplural.sh/

Checklist

  • I have added a meaningful title and summary to convey the impact of this PR to a user.
  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have deployed the agent to a test environment and verified that it works as expected (required only when changing agent code).

Plural Flow: console

@linear

linear Bot commented Aug 3, 2026

Copy link
Copy Markdown

PROD-5091

@soffi-ai

soffi-ai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Soffi AI Summary

This PR extends the cloud-query gRPC service's Schema RPC to support exact multi-table schema lookups in a single request, improving the efficiency and precision of schema queries used by the AI workbench and other consumers.

Previously, SchemaInput only supported a single optional table field that performed a LIKE-based substring filter (e.g., %aws_ec2_%), which was useful for broad discovery but inefficient when the caller already knows the exact table names. The new tables repeated field accepts a list of exact table names and uses a WHERE table_name = ANY($1) query, bypassing the fuzzy filter entirely. When tables is non-empty it takes precedence over the legacy table field, preserving full backward compatibility.

Changes span the full stack: the .proto definition, the generated Go and Elixir protobuf bindings, the Connection interface and its querySchema implementation, the CloudQueryService handler, and the API reference documentation (including new grpcurl and Postman examples).

Commits

Commit Summary
c27c3fc Adds a tables repeated field to SchemaInput in the CloudQuery protobuf schema, enabling callers to request schemas for multiple exact table names in one RPC call. The connection layer gains a querySchema helper that routes to either an ANY($1) exact-match query (when tables is non-empty) or the existing LIKE-based filter for backward compatibility. The Connection interface, service handler, generated Go/Elixir protobuf bindings, and API reference docs are all updated accordingly.

Deploy in Soffi


Updated: 2026-08-03 09:47 UTC

@zreigz zreigz added the enhancement New feature or request label Aug 3, 2026
@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR extends the cloud-query Schema RPC with an exact multi-table lookup while retaining the existing LIKE-based table filter.

  • Adds SchemaInput.tables to the protobuf contract and generated Go and Elixir bindings.
  • Routes nonempty table lists through a parameterized PostgreSQL ANY query.
  • Documents precedence and usage examples for the new field.

Confidence Score: 5/5

The PR appears safe to merge with no concrete changed-code failure identified.

The protobuf bindings, service plumbing, interface update, parameterized SQL implementation, and documentation consistently implement exact multi-table schema lookup while preserving the existing filter path.

Important Files Changed

Filename Overview
go/cloud-query/api/proto/cloudquery.proto Adds the backward-compatible repeated tables field with clear precedence and exact-match semantics.
go/cloud-query/internal/connection/schema.go Selects exact schemas with a parameterized ANY query when table names are supplied and otherwise preserves the prior LIKE behavior.
go/cloud-query/internal/connection/connection.go Extends the internal Schema interface to carry the exact table list through the connection layer.
go/cloud-query/internal/service/cloudquery_schema.go Passes the new protobuf field from the Schema RPC into the connection implementation.
go/cloud-query/internal/proto/cloudquery/cloudquery.pb.go Regenerates the Go protobuf model and descriptor with the repeated tables field.
lib/cloud_query/cloudquery.pb.ex Regenerates the Elixir protobuf binding to expose the repeated tables field.
go/cloud-query/docs/api-reference.md Documents exact multi-table lookups, precedence, defaults, and example requests.

Reviews (1): Last reviewed commit: "add ability to list schemas for multiple..." | Re-trigger Greptile

@michaeljguarino

Copy link
Copy Markdown
Member

Oh I've implemented this in my pr

@zreigz

zreigz commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Oh I've implemented this in my pr

no worries, I will close it

@zreigz zreigz closed this Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants