Problem
--json-path already selects the nested array used as rows for JSON input, but its current validation does not correctly account for per-URL --input-format.
This valid command can fail because -I json is attached to the preceding URL while --json-path validation checks only the global input format:
sql-pipe --url https://api.example.com/items -I json --json-path data.items 'SELECT * FROM url0'
--json-path is also global, while --input-format and --http-header support per-URL configuration.
Proposed Behavior
--json-path after a --url applies to that URL.
--json-path before any URL remains the global value for files and stdin.
- A URL-specific path overrides the global path.
- Different JSON URLs may use different row-array paths.
- The path remains simple dot-separated key navigation, not full JSONPath.
sql-pipe --url users=https://api.example.com/users -I json --json-path data.users --url orders=https://api.example.com/orders -I json --json-path results.orders 'SELECT * FROM users JOIN orders ON users.id = orders.user_id'
Acceptance Criteria
References
Problem
--json-pathalready selects the nested array used as rows for JSON input, but its current validation does not correctly account for per-URL--input-format.This valid command can fail because
-I jsonis attached to the preceding URL while--json-pathvalidation checks only the global input format:sql-pipe --url https://api.example.com/items -I json --json-path data.items 'SELECT * FROM url0'--json-pathis also global, while--input-formatand--http-headersupport per-URL configuration.Proposed Behavior
--json-pathafter a--urlapplies to that URL.--json-pathbefore any URL remains the global value for files and stdin.sql-pipe --url users=https://api.example.com/users -I json --json-path data.users --url orders=https://api.example.com/orders -I json --json-path results.orders 'SELECT * FROM users JOIN orders ON users.id = orders.user_id'Acceptance Criteria
UrlInput.--url ... -I json --json-path ....--json-pathis omitted.References
--json-path.