Results of 1 - 10 of about 30 for content (0.002 sec.)
- Directly Reading Files 15043
- DuckDB allows directly reading files via the read_text and read_blob functions. These functions accept a filename, a list of filenames, or a glob pattern. They output the content of each file as a VARCHAR or BLOB , respectively, along with
...t The read_text table function reads from the selected source(s) to a VARCHAR . Each file results in a single row with the content field holding the entire content of the respective file. SELECT size, parse_path(filename), content FROM read_text('test/s...ql/table_function/files/*.txt'); size parse_path(filename) content 12 [test, sql, table_function, files, one.txt] Hello World! 2 [test, sql, table_function, files, three.txt] 42 10 [test, s...ql, table_function, files, two.txt] Foo Bar\nFöö Bär DuckDB first validates the file content as valid UTF-8. If read_text attempts to read a file with invalid UTF-8, DuckDB throws an error suggesting to use read_blo... - https://man.mtool.work/duckdb/2.0/guides/file_formats/read_file.html
- Caveats 11664
- Equality Comparison Warning Currently, equality comparison of JSON files can differ based on the context. In some cases, it is based on raw text comparison, while in other cases, it uses logical content comparison. The following query retur
...ns true for all fields: SELECT a != b, -- Space is part of physical JSON content. Despite equal logical content, values are treated as not equal. c != d, -- Same. c[0] = d[0], -- Equality because space w...as removed from physical content of fields: a = c[0], -- Indeed, field is equal to empty list without space... b != c[0], -- ... but different from empty l... - https://man.mtool.work/duckdb/2.0/data/json/caveats.html
- Full-Text Search Extension 10803
- Full-Text Search is an extension to DuckDB that allows for search through strings, similar to SQLite's FTS5 extension . Installing and Loading The fts extension will be transparently autoloaded on first use from the official extension repos
...used. Example Usage Create a table and fill it with text data: CREATE TABLE documents ( document_identifier VARCHAR, text_content VARCHAR, author VARCHAR, doc_version INTEGER ); INSERT INTO documents VALUES ('doc1', 'The mallard is a dabbling duck that...he cat is a domestic species of small carnivorous mammal.', 'Laurens Kuiper', 2 ); Build the index, and make both the text_content and author columns searchable. PRAGMA create_fts_index( 'documents', 'document_identifier', 'text_content', 'author' ); Se...e author field index for documents that are authored by Muhleisen . This retrieves doc1 : SELECT document_identifier, text_content, score FROM ( SELECT *, fts_main_documents.match_bm25( document_identifier, 'Muhleisen', fields := 'author' ) AS score FRO... - https://man.mtool.work/duckdb/2.0/core_extensions/full_text_search.html
- SELECT Statement 8821
- The SELECT statement retrieves rows from the database. Examples Select all columns from the table tbl : SELECT * FROM tbl; Select the rows from tbl : SELECT j FROM tbl WHERE i = 3; Perform an aggregate grouped by the column i : SELECT i, su
...each table, the rowid pseudocolumn returns the row identifiers based on the physical storage. CREATE TABLE t (id INTEGER, content VARCHAR); INSERT INTO t VALUES (42, 'hello'), (43, 'world'); SELECT rowid, id, content FROM t; rowid id content 0 42 hello... - https://man.mtool.work/duckdb/2.0/sql/statements/select.html
- Utility Functions 8642
- Scalar Utility Functions The functions below are difficult to categorize into specific function types and are broadly useful. Name Description alias(column) Return the name of the column. can_cast_implicitly(source_value, target_value) Whet
...es . If the optional by_name parameter is set to true , it uses UNION ALL BY NAME semantics. read_blob(source) Returns the content from source (a filename, a list of filenames, or a glob pattern) as a BLOB . See the read_blob guide for more details. rea...d_text(source) Returns the content from source (a filename, a list of filenames, or a glob pattern) as a VARCHAR . The file content is first validated to be...ple | query_table(['t1', 't2']) | | Result | (the union of the two tables) | read_blob(source) | Description | Returns the content from source (a filename, a list of filenames, or a glob pattern) as a BLOB . See the read_blob guide for more details. | |... - https://man.mtool.work/duckdb/2.0/sql/functions/utility.html
- Reclaiming Space 8123
- DuckDB uses a single-file format, which has some inherent limitations w.r.t. reclaiming disk space. CHECKPOINT To reclaim space after deleting rows, use the CHECKPOINT statement . VACUUM The VACUUM statement does not trigger vacuuming delet
...e following example, we first connect to the original database db1 , then the new (empty) database db2 . Then, we copy the content of db1 to db2 . ATTACH 'db1.db' AS db1; ATTACH 'db2.db' AS db2; COPY FROM DATABASE db1 TO db2;... - https://man.mtool.work/duckdb/2.0/operations_manual/footprint_of_duckdb/reclaimi...
- Blob Functions 8041
- This section describes functions and operators for examining and manipulating BLOB values . Function Description arg1 || arg2 Concatenates two strings, lists, or blobs. Any NULL input results in NULL . See also concat(arg1, arg2, ...) and l
...Returns the MD5 hash of the blob as a HUGEINT . octet_length(blob) Number of bytes in blob . read_blob(source) Returns the content from source (a filename, a list of filenames, or a glob pattern) as a BLOB . See the read_blob guide for more details. rep...ytes in blob . | | Example | octet_length('\xAA\xBB'::BLOB) | | Result | 2 | read_blob(source) | Description | Returns the content from source (a filename, a list of filenames, or a glob pattern) as a BLOB . See the read_blob guide for more details. | |... - https://man.mtool.work/duckdb/2.0/sql/functions/blob.html
- Writing JSON 7960
- The contents of tables or the result of queries can be written directly to a JSON file using the COPY statement. For example: CREATE TABLE cities AS FROM (VALUES ('Amsterdam', 1), ('London', 2)) cities(name, id); COPY cities TO 'cities.json
...'; This will result in cities.json with the following content: {"name":"Amsterdam","id":1} {"name":"London","id":2} See the COPY statement for more information. GeoJSON New This featur... - https://man.mtool.work/duckdb/2.0/data/json/writing_json.html
- DELETE Statement 7960
- The DELETE statement removes rows from the table identified by the table-name. If the WHERE clause is not present, all records in the table are deleted. If a WHERE clause is supplied, then only those rows for which the WHERE clause results
...HERE i = 2; Delete all rows in the table tbl : DELETE FROM tbl; USING Clause The USING clause allows deleting based on the content of other tables or subqueries. RETURNING Clause The RETURNING clause allows returning the deleted values. It uses the same... - https://man.mtool.work/duckdb/2.0/sql/statements/delete.html
- Dot Commands 7863
- 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
...cimal_sep ⟨SEP⟩ Set the decimal separator used when rendering numbers. Only for duckbox mode .dump ⟨TABLE⟩ Render database content as SQL. TABLE is a LIKE pattern for the tables to dump .display_colors ⟨bold/underline⟩ Display all terminal colors and th...querying the database schema with SQL , but the CLI has additional dot commands that can make it easier to understand the contents of a database. The .tables command will return a list of tables in the database. It has an optional argument that will fi...kers(animal VARCHAR); The --indent option (alias --format ) forces pretty-printing, which is the default. Dumping Database Content as SQL The .dump command renders the database content as SQL statements, including both schema definitions and data. This... - https://man.mtool.work/duckdb/2.0/clients/cli/dot_commands.html
DuckDB 2.0 Documentation / man.mtool.work