-
Notifications
You must be signed in to change notification settings - Fork 14
feat: add JSON lines, Arrow IPC stream, and Parquet output formats #26
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -19,5 +19,5 @@ databow is a command-line tool for querying databases. | |||||
| - **Interactive SQL shell** - Execute SQL queries with command history and intuitive navigation | ||||||
| - **Syntax highlighting** - SQL queries highlighted for improved readability | ||||||
| - **Formatted output** - Results displayed in clean, aligned tables with dynamic column width | ||||||
| - **File export** - Export query results to JSON, CSV, or Arrow IPC files | ||||||
| - **File export** - Export query results to JSON, JSON lines, CSV, Arrow IPC, Arrow IPC stream, or Parquet files | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's OK to be less pedantic about IPC stream vs. IPC file here and in the README
Suggested change
|
||||||
| - **Fast and lightweight** - Built in Rust for high performance and minimal resource usage | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -108,11 +108,14 @@ databow --driver duckdb --query "SELECT 42 AS the_answer" --output result.json | |||||
|
|
||||||
| The output format is inferred from the file extension: | ||||||
|
|
||||||
| | Extension | Format | | ||||||
| |-----------------|-----------| | ||||||
| | `.json` | JSON | | ||||||
| | `.csv` | CSV | | ||||||
| | `.arrow`, `.ipc`| Arrow IPC | | ||||||
| | Extension | Format | | ||||||
| |-----------------|------------------| | ||||||
| | `.json` | JSON | | ||||||
| | `.jsonl` | JSON lines | | ||||||
| | `.csv` | CSV | | ||||||
| | `.arrow`, `.ipc`| Arrow IPC (file) | | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The naming conventions of the Rust library might have you believing otherwise, but unmodified "Arrow IPC" does not imply the file format, so I'd recommend dropping the parens here
Suggested change
|
||||||
| | `.arrows` | Arrow IPC stream | | ||||||
| | `.parquet` | Parquet | | ||||||
|
|
||||||
| ## --help | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -143,7 +143,7 @@ $ databow --profile warehouse --file query.sql | |||||
| └───────────────────┘ | ||||||
| ``` | ||||||
|
|
||||||
| Instead of printing query results to stdout, the [`--output` argument](/reference/#-output) can be used to write results to JSON, CSV, or Arrow IPC files: | ||||||
| Instead of printing query results to stdout, the [`--output` argument](/reference/#-output) can be used to write results to JSON, JSON lines, CSV, Arrow IPC, Arrow IPC stream, or Parquet files: | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ```console | ||||||
| $ databow --profile warehouse --query "SELECT * FROM penguins" --output penguins.csv | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.