⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 7 of about 7 for pipe (0.002 sec.)
CLI Charting with YouPlot 12050
DuckDB can be used with CLI graphing tools to quickly pipe input to stdout to graph your data in one line. YouPlot is a Ruby-based CLI tool for drawing visually pleasing plots on the terminal. It can accept input from other programs by pipi ... o stdout By combining the COPY...TO function with a CSV output file, you can read data from any format DuckDB supports and pipe it to YouPlot. Follow these three steps: First, read all data from input.json : batch duckdb -s "SELECT * FROM read_json(' ... BY 2 DESC LIMIT 10) TO '/dev/stdout' WITH (FORMAT csv, HEADER)" Connecting DuckDB to YouPlot Finally, the data can now be piped to YouPlot! Let's assume we have an input.json file with dates and number of purchases made by somebody on that date. Usi ... ng the query above, we'll pipe the data to the uplot command to draw a plot of the Top 10 Purchase Dates. duckdb -s "COPY (SELECT date, sum(purchases) AS ...
https://man.mtool.work/duckdb/2.0/guides/data_viewers/youplot.html
CREATE MACRO Statement 11123
The CREATE MACRO statement defines a named, callable SQL expression as a database schema object. Macros may declare parameters, which can be referenced by its expression. Once a macro is created, it may be called by referencing its name and ... solved at creation time. For example, the following fails at creation time when the file is not present: CREATE MACRO read_pipe() AS TABLE FROM read_csv('/dev/stdin'); IO Error: No files found that match the pattern "/dev/stdin" To resolve the file n ... a parameter. Supplying a default value keeps the macro callable without arguments: CREATE OR REPLACE TEMPORARY MACRO read_pipe(pipe := '/dev/stdin') AS TABLE FROM read_csv(pipe); FROM read_pipe(); Overloading It is possible to overload a macro based ...
https://man.mtool.work/duckdb/2.0/sql/statements/create_macro.html
Importing Duckbox Tables 9960
The scripts provided in this page work on Linux, macOS, and WSL. By default, the DuckDB CLI client renders query results in the duckbox format , which uses rich, ASCII-art inspired tables to show data. These tables are often shared verbatim ... : we can turn the table into a │ -separated file and read it with DuckDB's CSV reader . Note that the separator is not the pipe character | , instead it is the “Box Drawings Light Vertical” character │ . Loading Duckbox Tables to DuckDB First, we sav ... ease consider the following limitations when running this script: This approach only works if the table does not have long pipe │ characters. It also trims spaces from the table cell values. Make sure to factor in these assumptions when running the s ...
https://man.mtool.work/duckdb/2.0/guides/snippets/importing_duckbox_tables.html
Command Line Client 8124
Installation To use the DuckDB CLI client, visit the CLI installation page . The latest stable version of the DuckDB command line client is 2.0.0. Installation The DuckDB CLI (Command Line Interface) is a single, dependency-free executable. ... details, see the Extension docs . Reading from stdin and Writing to stdout When in a Unix environment, it can be useful to pipe data between multiple commands. DuckDB is able to read data from stdin as well as write to stdout using the file location ... of stdin ( /dev/stdin ) and stdout ( /dev/stdout ) within SQL commands, as pipes act very similarly to file handles. This command will create an example CSV: COPY (SELECT 42 AS woot UNION ALL SELECT 43 ... AS woot) TO 'test.csv' (HEADER); First, read a file and pipe it to the duckdb CLI executable. As arguments to the DuckDB CLI, pass in the location of the database to open, in this cas ...
https://man.mtool.work/duckdb/2.0/clients/cli/overview.html
Output Formats 7670
The .mode dot command may be used to change the appearance of the tables returned in the terminal output. In addition to customizing the appearance, these modes have additional benefits. This can be useful for presenting DuckDB output elsew ... d. For example, .mode csv will set the separator to a comma ( , ). Using .separator "|" will then convert the output to be pipe-separated. .mode csv SELECT 1 AS col_1, 2 AS col_2 UNION ALL SELECT 10 AS col1, 20 AS col_2; col_1,col_2 1,2 10,20 .separa ...
https://man.mtool.work/duckdb/2.0/clients/cli/output_formats.html
COPY Statement 7670
Examples Read a CSV file into the lineitem table, using auto-detected CSV options: COPY lineitem FROM 'lineitem.csv'; Read a CSV file into the lineitem table, using manually specified CSV options: COPY lineitem FROM 'lineitem.csv' (DELIMITE ... categories.csv' (HEADER); Copy the contents of lineitem.tbl into the lineitem table, where the contents are delimited by a pipe character ( | ): COPY lineitem FROM 'lineitem.tbl' (DELIMITER '|'); Copy the contents of lineitem.tbl into the lineitem ta ... TO 'lineitem.csv'; Copy the contents of the lineitem table to the file lineitem.tbl , where the columns are delimited by a pipe character ( | ), including a header line: COPY lineitem TO 'lineitem.tbl' (DELIMITER '|'); Use tab separators to create a ...
https://man.mtool.work/duckdb/2.0/sql/statements/copy.html
Dot Commands 6979
Dot commands are available in the DuckDB CLI client. To use one of these commands, begin the line with a period ( . ) immediately followed by the name of the command you wish to execute. Additional arguments to the command are entered, spac ... or example: Tip macOS users can copy the results to their clipboards using pbcopy by using .once to output to pbcopy via a pipe: .once |pbcopy Combining this with the .headers off and .mode lines options can be particularly effective. Querying the Da ...
https://man.mtool.work/duckdb/2.0/clients/cli/dot_commands.html
PREV 1 NEXT
DuckDB 2.0 Documentation / man.mtool.work