Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions book/src/command/db.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ super db -c 'from logs | ts >= 2018-03-24T17:36:30.090766Z and ts <= 2018-03-24T
When querying data to the [BSUP](../formats/bsup.md) output format,
output from a pool can be easily piped to other commands like `super`, e.g.,
```
super db -f bsup -c 'from logs' | super -f table -c 'count() by field' -
super db -f bsup -c 'from logs' | super -s -c 'count() by field' -
```
Of course, it's even more efficient to run the query inside of the pool traversal
like this:
```
super db -f table -c 'from logs | count() by field'
super db -s -c 'from logs | count() by field'
```
By default, the `query` command scans pool data in sort-key order though
the query optimizer may, in general, reorder the scan to optimize searches,
Expand Down
13 changes: 6 additions & 7 deletions book/src/tutorials/jq.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,13 +451,12 @@ But more powerfully, types can be used anywhere a value can be used and
in particular, they can be grouping keys, e.g.,
```mdtest-command
echo '{x:1,y:2}{s:"foo"}{x:3,y:4}' |
super -f table -c "count() by this['shape']:=typeof(this) | sort count" -
super -s -c "count() by this['shape']:=typeof(this) | sort count" -
```
produces
```mdtest-output
shape count
<{s:string}> 1
<{x:int64,y:int64}> 2
{shape:<{s:string}>,count:1}
{shape:<{x:int64,y:int64}>,count:2}
```
When run over large data sets, this gives you an insightful count of
each "shape" of data in the input. This is a powerful building block for
Expand Down Expand Up @@ -733,7 +732,7 @@ We can take the output from `blend | shapes` and list the fields with
and their "kind". Note that when we do an `unnest this` with records as
input, we get a new record value for each field structured as a key/value pair:
```mdtest-command-skip dir=book/src/tutorials
super -f table -c '
super -s -c '
unnest this
| blend
| shapes
Expand Down Expand Up @@ -967,7 +966,7 @@ to put your clean data into all the right places.
Let's start with something simple. How about we output a "PR Report" listing
the title of each PR along with its PR number and creation date:
```mdtest-command-skip dir=book/src/tutorials
super -f table -c '{DATE:created_at,NUMBER:f"PR #{number}",TITLE:title}' prs.bsup
super -s -c '{DATE:created_at,NUMBER:f"PR #{number}",TITLE:title}' prs.bsup
```
and you'll see this output...
```mdtest-output-skip head
Expand All @@ -986,7 +985,7 @@ Instead of old PRs, we can get the latest list of PRs using the
[`tail` operator](../super-sql/operators/tail.md) since we know the data is sorted
chronologically. This command retrieves the last five PRs in the dataset:
```mdtest-command-skip dir=book/src/tutorials
super -f table -c '
super -s -c '
tail 5
| {DATE:created_at,"NUMBER":f"PR #{number}",TITLE:title}
' prs.bsup
Expand Down
2 changes: 1 addition & 1 deletion cli/outputflags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (f *Flags) SetFormatFlags(fs *flag.FlagSet) {
f.Format = "bsup"
}
fUsage := fmt.Sprintf(
"format for output data [arrows,bsup,csv,db,json,line,parquet,sup,table,tsv,zeek] (default %s)",
"format for output data [arrows,bsup,csv,db,json,line,parquet,sup,tsv,zeek] (default %s)",
f.Format)
fs.Func("f", fUsage, func(s string) error {
f.Format = s
Expand Down
2 changes: 1 addition & 1 deletion runtime/ztests/op/aggregate/count-assign.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spq: c:=count()

flags: -f table
flags: -f csv

input: |
{_path:"conn",foo:"1"}
Expand Down
2 changes: 1 addition & 1 deletion service/ztests/ls-pools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ script: |
# Verify that output flags are honored.
super db ls -f sup | super -i sup -f sup -c "cut name | sort name" -
echo ===
super db ls -f bsup | super -i bsup -f table -c "cut name | sort name" -
super db ls -f bsup | super -i bsup -f csv -c "cut name | sort name" -
echo ===

inputs:
Expand Down
3 changes: 0 additions & 3 deletions sio/anyio/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/superdb/super/sio/lineio"
"github.com/superdb/super/sio/parquetio"
"github.com/superdb/super/sio/supio"
"github.com/superdb/super/sio/tableio"
"github.com/superdb/super/sio/zeekio"
"github.com/superdb/super/vector"
"github.com/superdb/super/vector/vio"
Expand Down Expand Up @@ -54,8 +53,6 @@ func NewWriter(w io.WriteCloser, opts WriterOpts) (vio.PushCloser, error) {
w = newDefuser(w)
}
return w, nil
case "table":
return newDefuser(tableio.NewWriter(w)), nil
case "tsv":
opts.CSV.Delim = '\t'
return newDefuser(csvio.NewWriter(w, opts.CSV)), nil
Expand Down
2 changes: 0 additions & 2 deletions sio/sio.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ func Extension(format string) string {
return ".parquet"
case "sup":
return ".sup"
case "table":
return ".tbl"
case "zeek":
return ".log"
default:
Expand Down
102 changes: 0 additions & 102 deletions sio/tableio/writer.go

This file was deleted.

12 changes: 0 additions & 12 deletions sio/tableio/ztests/flatten.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions sio/tableio/ztests/nested-record-named.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions sio/tableio/ztests/non-record-error.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions sio/tableio/ztests/type-value.yaml

This file was deleted.

Loading