Skip to content

JSON output format for sql command status #97

@LonwoLonwo

Description

@LonwoLonwo

Sometimes it is not enough to have exit codes for pipelines for errors.
Especially for complex logic (e.g., if we have connection issues, report to Slack). Should have the ability to parse log output, not to use grep/awk.
Also, the JSON format can avoid issues with specific symbols for outputs.

In a first approach, we can add it only for the sql command.

Example:

dbvr sql --sql="SELECT 1" -con=sap_hana-16fd231c424-6d9a8c69f6c97ad7 --outputLog=json
# Ok: {"status": "ok", "rows": 1}
# Error: {"status": "error", "code": 1, "message": "Connection failed", "details": {...}}

Metadata

Metadata

Labels

p:CORETicket for the Core Teamv:dbvrv:dbvr CEFor dbvr Community ticketswikiTo mark documentation tickets or tickets which should have extra documentation
No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions