⌘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 19 for differ (0.001 sec.)
Caveats 12396
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 ... from physical content of fields: a = c[0], -- Indeed, field is equal to empty list without space... b != c[0], -- ... but different from empty list with space. FROM ( SELECT '[]'::JSON AS a, '[ ]'::JSON AS b, '[[]]'::JSON AS c, '[[ ]]'::JSON AS d ); ( ...
https://man.mtool.work/duckdb/2.0/data/json/caveats.html
Profiling Queries 11918
DuckDB supports profiling queries via the EXPLAIN and EXPLAIN ANALYZE statements. EXPLAIN To see the query plan of a query without executing it, run: EXPLAIN ⟨query⟩; The output of EXPLAIN contains the estimated cardinalities for each opera ... answer; explain_key explain_value sql SELECT CAST(3 AS INTEGER) AS answer Because the output is the optimized plan, it can differ substantially from the input query (for example through join reordering, constant folding, or subquery introduction). The ...
https://man.mtool.work/duckdb/2.0/sql/statements/profiling.html
Python DB API 10518
The standard DuckDB Python API provides a SQL interface compliant with the DB-API 2.0 specification described by PEP 249 similar to the SQLite Python API . Connection To use the module, you must first create a DuckDBPyConnection object that ... .sql() and duckdb.execute() use the default connection; the first function that needs it creates it. Some module functions differ from connection methods; see Connection Object and Module . The special value :default: and the duckdb.default_connection( ... print(rows) [('hammer',)] Parameter names are not case sensitive: the key "ABC" binds $abc , so do not pass two keys that differ only in case. Insert a row with ? placeholders, and several rows with executemany() , which runs the statement once for ea ...
https://man.mtool.work/duckdb/2.0/clients/python/dbapi.html
Comparisons 10057
Comparison Operators The table below shows the standard comparison operators. Whenever either of the input arguments is NULL , the output of the comparison is NULL . Operator Description Example Result < less than 2 < 3 true > greater than ... DISTINCT FROM equal, including NULL NULL IS NOT DISTINCT FROM NULL true Combination Casting When performing comparison on different types, DuckDB performs Combination Casting . These casts were introduced to make interactive querying more convenient a ... S NOT NULL (non-standard) An explicit collation on any input to BETWEEN applies to the entire BETWEEN expression. This can differ from writing the comparisons separately, where the explicit collation applies only to the comparison that contains it: SEL ...
https://man.mtool.work/duckdb/2.0/sql/expressions/comparison_operators.html
Combining Schemas 9579
Examples Read a set of CSV files combining columns by position: SELECT * FROM read_csv('flights*.csv'); Read a set of CSV files combining columns by name: SELECT * FROM read_csv('flights*.csv', union_by_name = true); Combining Schemas When ... ng from multiple files, we have to combine schemas from those files. That is because each file has its own schema that can differ from the other files. DuckDB offers two ways of unifying schemas of multiple files: by column position and by column name ... om a later file cause an error. This works correctly as long as all files have the same schema. If the schema of the files differs, you might want to use the union_by_name option to allow DuckDB to construct the schema by reading all of the names inste ... geles, CA This is equivalent to the SQL construct UNION ALL . Union by Name If you are processing multiple files that have different schemas, perhaps because columns have been added or renamed, it might be desirable to unify the columns of different fi ...
https://man.mtool.work/duckdb/2.0/data/multiple_files/combining_schemas.html
SET VARIABLE and RESET VARIABLE Statements 9579
DuckDB supports the definition of SQL-level variables using the SET VARIABLE and RESET VARIABLE statements. Variable Scopes DuckDB supports two levels of variable scopes: Scope Description SESSION Variables with a SESSION scope are local to ... VARIABLE my_var = 30; SET VARIABLE my_var = 100; SELECT 20 + getvariable('my_var') AS total; total 120 Variables can have different types: SET VARIABLE my_date = DATE '2018-07-13'; SET VARIABLE my_string = 'Hello world'; SET VARIABLE my_map = MAP {'k1 ... ame and getvariable('name') return the same value: SELECT $my_var = getvariable('my_var') AS same; same true The two forms differ when the variable is not set: getvariable returns NULL , while a $name reference raises an error. SELECT $undefined_var; I ...
https://man.mtool.work/duckdb/2.0/sql/statements/set_variable.html
AsOf Join 8657
What is an AsOf Join? Time series data is not always perfectly aligned. Clocks may be slightly off, or there may be a delay between cause and effect. This can make connecting two sets of ordered data challenging. AsOf joins are a tool for s ... is fine for the ticker column because the value is the same in both tables. However, for the when column, the values might differ between the two tables due to the >= condition used in the AsOf join. The AsOf join is designed to match each row in the l ...
https://man.mtool.work/duckdb/2.0/guides/sql_features/asof_join.html
Samples 8657
Samples are used to randomly select a subset of a dataset. Examples Select a sample of exactly 5 rows from tbl using reservoir sampling: SELECT * FROM tbl USING SAMPLE 5; Select a sample of approximately 10% of the table using system sampli ... rs to queries faster, as they reduce the amount of data that needs to pass through the query engine. DuckDB supports three different types of sampling methods: reservoir , bernoulli and system . By default, DuckDB uses reservoir sampling when an exact ... nly reservoir sampling supports sampling a fixed number of rows. Samples are probabilistic, that is to say, samples can be different between runs unless the seed is specifically specified. Specifying the seed only guarantees that the sample is the same ... re not necessarily consistent even with a fixed seed. Reproducible Samples Sampling is probabilistic, so a query returns a different sample on each run unless the seed is fixed. The seed is a non-negative integer and can be specified in two equivalent ...
https://man.mtool.work/duckdb/2.0/sql/samples.html
Data Ingestion 8179
This page contains examples for data ingestion to Python using DuckDB. First, import the DuckDB package: import duckdb Then, proceed with any of the following sections. CSV Files CSV files can be read using the read_csv function, called eit ... rrays, relations and Arrow objects. The masked elements in a NumPy masked array are NULL . In a dict of arrays, names that differ only in case get a suffix, so the keys a and A become the columns a and A_1 . Use register() to give a DataFrame or Arrow ... old a single chunk. A query that depends on the order of rows without an ORDER BY , such as one using first() , can return different rows between runs. Custom Arrow Objects DuckDB can also consume any object that implements the Arrow PyCapsule interfac ...
https://man.mtool.work/duckdb/2.0/clients/python/data_ingestion.html
Python API 8179
Installation To use the DuckDB Python client, visit the Python installation page . The latest stable version of the DuckDB Python client is 2.0.0. Installation The DuckDB Python API can be installed using pip : pip install duckdb . Please s ... method of a connection object is also a function of the duckdb module, which runs it on a global in-memory database. A few differ: duckdb.df(frame) builds a relation from a DataFrame, as con.from_df(frame) does, while con.df() fetches the result of exe ... because the duckdb module uses a shared global database, which can cause hard to debug issues if used from within multiple different packages. Using Connections in Parallel Python Programs A connection runs one call at a time. A call from another threa ...
https://man.mtool.work/duckdb/2.0/clients/python/overview.html
PREV 1 2 NEXT
DuckDB 2.0 Documentation / man.mtool.work