⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 10 of about 80 for text (0.006 sec.)
Full-Text Search 12985
DuckDB supports full-text search via the fts extension . A full-text index allows for a query to quickly search for all occurrences of individual words within longer text strings. Example: Shakespeare Corpus Here's an example of building a ... full-text index of Shakespeare's plays. CREATE TABLE corpus AS SELECT * FROM 'https://blobs.duckdb.org/data/shakespeare.parquet'; DE ... SCRIBE corpus; column_name column_type null key default extra line_id VARCHAR YES NULL NULL NULL play_name VARCHAR YES NULL NULL NULL line_number VARCHAR YES NULL NULL NULL speaker ... VARCHAR YES NULL NULL NULL text_entry VARCHAR YES NULL NULL NULL The text of each line is in text_entry , and a unique key for each line is in line_id . C ...
https://man.mtool.work/duckdb/2.0/guides/sql_features/full_text_search.html
Full-Text Search Extension 11519
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 ... put_id VARCHAR Column name of document identifier, e.g., 'document_identifier' input_values... VARCHAR Column names of the text fields to be indexed (vararg), e.g., 'text_field_1' , 'text_field_2' , ..., 'text_field_N' , or '\*' for all columns in in ... trip_accents BOOLEAN Whether to remove accents (e.g., convert á to a ). Defaults to 1 lower BOOLEAN Whether to convert all text to lowercase. Defaults to 1 overwrite BOOLEAN Whether to overwrite an existing index on a table. Defaults to 0 incremental ... query_string VARCHAR The string to search the index for fields VARCHAR Comma-separated list of fields to search in, e.g., 'text_field_2, text_field_N' . Defaults to NULL to search all indexed fields k DOUBLE Parameter k 1 in the Okapi BM25 retrieval ...
https://man.mtool.work/duckdb/2.0/core_extensions/full_text_search.html
Text Types 11191
In DuckDB, strings can be stored in the VARCHAR field. The field allows storage of Unicode characters. Internally, the data is encoded as UTF-8. Name Aliases Description VARCHAR CHAR , BPCHAR , STRING , TEXT Variable-length character string ... VARCHAR(n) CHAR(n) , BPCHAR(n) , STRING(n) , TEXT(n) Variable-length character string. The maximum length n has no effect and is only provided for compatibility Specifying ... a Length Limit Specifying the length for the VARCHAR , STRING and TEXT types is not required and has no effect on the system. Specifying the length will not improve performance or reduce storag ... SING COMPRESSION clause. For example, to apply zstd compression, run: CREATE TABLE tbl (s VARCHAR USING COMPRESSION zstd); Text Type Values Values of the text type are character strings, also known as string values or simply strings. At runtime, stri ...
https://man.mtool.work/duckdb/2.0/sql/data_types/text.html
Create Synthetic Data 10067
DuckDB lets you quickly generate synthetic datasets by combining a few building blocks: functions and clauses that generate rows , functions that generate values to fill those rows, and extensions that generate whole benchmark datasets. Thi ... e value most recently produced: CREATE SEQUENCE id_seq START 100; SELECT nextval('id_seq') AS id FROM range(3); Generating Text with Faker For realistic-looking names, addresses and other text, you can call the Faker Python package through the Python ... db.sqltypes import * from faker import Faker fake = Faker() def random_date(): return fake.date_between() def random_short_text(): return fake.text(max_nb_chars=20) def random_long_text(): return fake.text(max_nb_chars=200) con = duckdb.connect() con ... .create_function("random_date", random_date, [], DATE, type="native", side_effects=True) con.create_function("random_short_text", random_short_text, [], VARCHAR, type="native", side_effects=True) con.create_function("random_long_text", random_long_te ...
https://man.mtool.work/duckdb/2.0/guides/snippets/create_synthetic_data.html
Directly Reading Files 10013
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 ... metadata such as the file size and last modified time. read_text The read_text table function reads from the selected source(s) to a VARCHAR . Each file results in a single row with the c ... ontent field holding the entire content of the respective file. SELECT size, parse_path(filename), content FROM read_text('test/sql/table_function/files/*.txt'); size parse_path(filename) content 12 [test, sql, table_function, files, one.txt] H ... est, sql, 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_blob instead. read_text also sup ...
https://man.mtool.work/duckdb/2.0/guides/file_formats/read_file.html
Timestamp Functions 9561
This section describes functions and operators for examining and manipulating TIMESTAMP values . See also the related TIMESTAMPTZ functions . Timestamp Operators The table below shows the available mathematical operators for TIMESTAMP types ... ish) name of the month. strftime(timestamp, format) Converts timestamp to string according to the format string . strptime(text, format-list) Converts the string text to timestamp applying the format strings in the list until one succeeds. Throws an ... error on failure. To return NULL on failure, use try_strptime . strptime(text, format) Converts the string text to timestamp according to the format string . Throws an error on failure. To return NULL ... et_width is a number of months or coarser units, else 2000-01-03 00:00:00 . Note that 2000-01-03 is a Monday. try_strptime(text, format-list) Converts the string text to timestamp applying the format strings in the list until one succeeds. Returns NU ...
https://man.mtool.work/duckdb/2.0/sql/functions/timestamp.html
Relational API 8780
The Relational API builds a query one step at a time from Python. A relation, a DuckDBPyRelation , is a piece of SQL text: the methods of the Transformation and Functions sections return a new relation whose text extends the one they were c ... alled on. Lazy Evaluation Building a relation runs nothing: DuckDB binds the text once to learn the columns and their types, and holds no data. For example, a relation over a billion rows is built at once ... ucket") print(rel.sql_query()) FROM range(1_000_000_000) t(id) SELECT id, id % 7 AS bucket sql_query() returns exactly the text that runs. The query runs when a method of the Output section reads the relation, and it runs again on every read, so each ... that exports the Arrow PyCapsule interface. Example import duckdb import pyarrow as pa ids = pa.array([1], type=pa.int8()) texts = pa.array(['a'], type=pa.string()) example_table = pa.table([ids, texts], names=["id", "text"]) duckdb_conn = duckdb.con ...
https://man.mtool.work/duckdb/2.0/clients/python/relational_api.html
Expression API 8602
The Expression class represents an instance of an expression . Why Would I Use the Expression API? Use expressions to build filters and computed columns in Python. They are useful when column names or conditions depend on your code. import ... is passed to a method of a relation , such as select , filter , aggregate or sort . str() of an expression returns its SQL text, with the identifiers quoted and every operation in parentheses: print((col("a") > 1) & col("b")) (("a" > 1) AND "b") The ... n(condition, value) fn(name, *args) FunctionExpression(name, *args) star(exclude=...) StarExpression(exclude=...) sql_expr(text) SQLExpression(text) coalesce(*values) CoalesceOperator(*values) a Python function, such as lambda x: x * 2 LambdaExpressi ... A Python value in an operation is a constant. This holds for a string too: col("s") == "x" compares the column s with the text x . Use col("x") to compare with the column x , and lit("x") to make a constant explicit: rel = duckdb.sql("SELECT * FROM ...
https://man.mtool.work/duckdb/2.0/clients/python/expression.html
Dot Commands 8328
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 ... nal colors and their names. See the 8-bit colors section .echo ⟨on/off⟩ Turn command echo on or off .edit Open an external text editor to edit a query. \e can be used as an alias. See the external editor mode section .excel Display the output of the ... CODE .headers ⟨on/off⟩ Turn display of headers on or off . Does not apply to duckbox mode .help ⟨-all⟩ ⟨PATTERN⟩ Show help text for PATTERN . Use .help shortcuts to display keyboard shortcuts .highlight ⟨on/off⟩ Toggle syntax highlighting in the shel ... ith ARGS... in a system shell .show Show the current values for various settings .singleline Set single-line mode .startup_text ⟨none/version/all⟩ Controls the start-up text displayed when launching the CLI. Set this as the first line in ~/.duckdbrc ...
https://man.mtool.work/duckdb/2.0/clients/cli/dot_commands.html
Lance Extension 8273
The lance extension adds support for reading and writing Lance tables. Lance is a modern lakehouse format optimized for ML/AI workloads, with native cloud storage support. Installing and Loading You can install the lance extension from Duck ... :FLOAT[4], k = 5, prefilter = true ) ORDER BY _distance ASC; See the SQL reference for full parameter documentation . Full-Text Search (FTS) -- Search a text column, returning BM25-like scores in `_score` SELECT id, text, _score FROM lance_fts( '⟨pat ... h/to/dataset.lance⟩', 'text', 'puppy', k = 10, prefilter = true ) ORDER BY _score DESC; See the SQL reference for full parameter documentation . Hybri ... d Search (Vector + FTS) -- Combine vector and text scores, returning `_hybrid_score` in addition to `_distance` / `_score` SELECT id, _hybrid_score, _distance, _score FROM l ...
https://man.mtool.work/duckdb/2.0/core_extensions/lance.html
PREV 1 2 3 4 5 6 7 8 NEXT
DuckDB 2.0 Documentation / man.mtool.work