Skip to content
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

Update JSON output to be consistent across pipelings - also handle duplicate column names #375

Closed
pskrbasu opened this issue Jun 3, 2024 · 0 comments · Fixed by #376
Closed
Assignees
Labels
enhancement New feature or request

Comments

@pskrbasu
Copy link
Collaborator

pskrbasu commented Jun 3, 2024

Update Powerpipe JSON output to align all cases around a single format.
Cases:

  • steampipe query --output json
  • powerpipe query run --output json
  • snapshot data format
  • Pipes query API

Proposed format:

{
  "columns": [
    {
      "name": "foo",
      "data_type": "int4"
    },
    {
      "name": "foo_{random4}",
      "data_type": "int4",
      "original_name": "foo"
    }
  ],
  "rows": [
    {
      "foo": 1,
      "foo_{random4}": 2
    }
  ],
  "metadata": {
   ...
  }
}
@pskrbasu pskrbasu added the enhancement New feature or request label Jun 3, 2024
@pskrbasu pskrbasu self-assigned this Jun 3, 2024
@pskrbasu pskrbasu linked a pull request Jun 3, 2024 that will close this issue
@kaidaguerre kaidaguerre changed the title Update JSON output Update JSON output to be consistent across pipelings - also handle duplicate column names Jun 5, 2024
kaidaguerre pushed a commit that referenced this issue Jun 5, 2024
…plicate column names. Closes #375

* update json output to include columns field and duplicate columns
* add name generator
* check unique name
kaidaguerre added a commit that referenced this issue Jun 7, 2024
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 a pull request may close this issue.

1 participant