Skip to content

Add dataset schema command - #126

Merged
nitisht merged 1 commit into
parseablehq:mainfrom
pratik50:datasetSchemaFix
Oct 3, 2026
Merged

nitisht merged 1 commit into
parseablehq:mainfrom
pratik50:datasetSchemaFix

Conversation

@pratik50

@pratik50 pratik50 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #120

  • Add new cmd pb dataset schema <dataset> to show field names and types.
  • Add -o json for the full schema and list the command.
  • Add tests for output and missing datasets.

Summary by CodeRabbit

  • New Features
    • Added pb dataset schema <dataset> to display dataset field names and types in text or JSON format.
    • Added the schema command to the available read-only commands.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: 90596cda-84f6-4f9a-84ed-26bade21d7b9

📥 Commits

Reviewing files that changed from the base of the PR and between 25493c9 and 66aed51.

📒 Files selected for processing (6)
  • README.md
  • cmd/agent.go
  • cmd/agent_test.go
  • cmd/dataset_schema.go
  • cmd/dataset_schema_test.go
  • main.go

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

The pull request adds pb dataset schema <dataset> with text and JSON output. It registers the command under dataset, includes it in the read-only agent catalog, and adds README examples.

Changes

Dataset schema

Layer / File(s) Summary
Fetch and render dataset schema
cmd/dataset_schema.go, cmd/dataset_schema_test.go
The command fetches and validates a dataset schema. It outputs the raw response in JSON mode or field names and types in text mode. Tests check both output formats and not-found handling.
Register and document the command
main.go, cmd/agent.go, cmd/agent_test.go, README.md
The command is registered under dataset and added to the read-only agent catalog. The catalog test and README examples include the command.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant CLI as pb CLI
  participant Command as SchemaDatasetCmd
  participant API as Dataset schema API
  CLI->>Command: Run schema command
  Command->>API: GET dataset schema
  API-->>Command: Schema response
  Command-->>CLI: Write JSON or rendered fields
Loading

Merge Risk: ⚪ Minimal · up to 66aed

The schema command appears consistent with the requested text and JSON behavior and read-only catalog integration. No actionable merge-blocking issue is established; normal test checks should pass before merging.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR implements the coding requirements in issue #120. It registers pb dataset schema <dataset>, supports text output with field names and types, supports -o json, and adds the command to the re…
Out of Scope Changes check ✅ Passed The changed files support issue #120. The command implementation, registration, catalog entries, README entry, and automated tests directly support the schema command objective. No unrelated change is…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: adding the dataset schema command.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@nitisht

nitisht commented Oct 3, 2026

Copy link
Copy Markdown
Member

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nitisht
nitisht merged commit dc8ed51 into parseablehq:main Oct 3, 2026
3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No way to get a dataset's schema (pb dataset info has no fields, and there's no schema command in pb agent)

2 participants