Preview up to 1000 rows from a table.
kbc remote table preview [table] [flags]
-H, --storage-api-host <string>
connection.keboola.com
--changed-since <string>
Date may be written in any format compatible with strtotime.
--changed-until <string>
Date may be written in any format compatible with strtotime.
--columns <string>
--format <string>
json
, csv
, and pretty
. (default pretty
)
csv
is formatted according to RFC 4180.
json
is formatted as follows:
{
"columns": ["Id", "Name", "Region"],
"rows": [
["Id0", "Name0", "Region0"],
["Id1", "Name1", "Region1"],
["Id2", "Name2", "Region2"]
]
}
-o, --out <string>
--force
--out
, the file will be overwritten if it already exists.--limit <int>
--order <string>
Accepts a comma-separated list of column+order pairs, such as First_Name,Last_Name=desc
.
If the order for a column is not specified, it defaults to ascending, such as First_Name
in the example above.
--where <string>
Accepts a semicolon-separated list of expressions, each of which specifies a column and a comparison to one or more values, such as First_Name=Ivan,Pavel;Birth_Date>=1990-01-01
Preview a table in the terminal:
➜ kbc remote table preview in.c-demo-keboola-ex-google-drive-1234567.account
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Id ┃ Name ┃ Region ┃ First_Order ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━╋━━━━━━━━━━━━━━┫
┃ f030ed64cbc8babbe50901a26675a2ee ┃ CSK Auto ┃ US West ┃ 2015-01-23 ┃
┃ 06c0b954b0d2088e3da2132d1ba96f31 ┃ AM/PM Camp ┃ Global ┃ 2015-02-04 ┃
┃ fffe0e30b4a34f01063330a4b908fde5 ┃ Super Saver Foods ┃ Global ┃ 2015-02-06 ┃
┃ 33025ad4a425b6ee832e76beb250ae1c ┃ Netcore ┃ Global ┃ 2015-03-02 ┃
┃ ... ┃ ... ┃ ... ┃ ... ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━━━━━━┛
Preview a table with where filters and ordering, and output the result to a CSV file:
➜ kbc remote table preview in.c-demo-keboola-ex-google-drive-1234567.account \
--where Age>23 \
--order Age=asc \
--limit 1000 \
--format csv \
--out accounts-preview.csv
Fetching the data, please wait.
Table "in.c-gdrive.account" preview successfully written to "accounts-preview.csv".
Preview a table in the terminal without knowing its ID:
➜ kbc remote table preview
? Table: [Use arrows to move, type to filter]
> in.c-my-bucket.data
in.c-demo-keboola-ex-google-drive-1234567.account
in.c-facebook-extractor.uses
...
(down arrow pressed)
➜ kbc remote table preview
? Table: [Use arrows to move, type to filter]
in.c-my-bucket.data
> in.c-demo-keboola-ex-google-drive-1234567.account
in.c-facebook-extractor.uses
...
(enter pressed)
➜ kbc remote table preview
? Table: in.c-demo-keboola-ex-google-drive-1234567.account
Fetching the data, please wait.
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Id ┃ Name ┃ Region ┃ First_Order ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━╋━━━━━━━━━━━━━━┫
┃ f030ed64cbc8babbe50901a26675a2ee ┃ CSK Auto ┃ US West ┃ 2015-01-23 ┃
┃ 06c0b954b0d2088e3da2132d1ba96f31 ┃ AM/PM Camp ┃ Global ┃ 2015-02-04 ┃
┃ fffe0e30b4a34f01063330a4b908fde5 ┃ Super Saver Foods ┃ Global ┃ 2015-02-06 ┃
┃ 33025ad4a425b6ee832e76beb250ae1c ┃ Netcore ┃ Global ┃ 2015-03-02 ┃
┃ ... ┃ ... ┃ ... ┃ ... ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━━━━━━┛