opensearch-project / opensearch-project/sql-cli

[FEATURE] Command-line option to output JSON response

Open
#13 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
9
Forks
24
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem?
When I use sli-cli in command-line mode (i.e., opensearchsql -p '<query> sometime I would like to get the raw JSON output from the SQL plugin so that I can post process it with other tools.

What solution would you like?
A command-line option, like --json that in conjunction with -q option makes sql-cli output JSON documents.

What alternatives have you considered?
Using OpenSearch SQL REST API directly. This gets very repetitive after a while.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the command-line argument handling and the query output path used with -q. Add the requested --json behavior and verify that command-line queries produce raw JSON documents suitable for downstream processing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.