Results of 1 - 6 of about 6 for Checksum (0.001 sec.)
- Calculating a Database Checksum 12667
- To calculate a database checksum, use a commutative operation such as bit_xor on all columns, all rows, and all tables. First, create a table macro that performs this for each table: CREATE OR REPLACE MACRO table_checksum(table_name) AS TAB
...LE SELECT bit_xor(value) AS table_checksum FROM ( UNPIVOT ( SELECT bit_xor(md5_number(COLUMNS(*)::VARCHAR)) FROM query_table(table_name) ) ON columns(*) ); You need...l this macro for all tables. In the CLI, you can do so by dynamically generating a SQL file: .mode list .headers off .once checksum_all_tables.sql SELECT printf('CREATE OR REPLACE TABLE table_checksums (checksum UHUGEINT);') UNION ALL SELECT printf('INSE...RT INTO table_checksums FROM table_checksum(''%s'');', table_name) FROM duckdb_tables() WHERE NOT internal; .mode duckbox Read the SQL file back... - https://man.mtool.work/duckdb/2.0/guides/snippets/database_checksum.html
- Sharing Macros 10218
- DuckDB has a powerful macro mechanism that allows creating shorthands for common tasks. Sharing a Scalar Macro First, we define a macro that pretty-prints a non-negative integer as a short string with thousands, millions, and billions (with
...─────────┤ │ 42k │ └─────────┘ Sharing a Table Macro It's also possible to share table macros. For example, we created the checksum macro as follows: duckdb compute_table_checksum.duckdb CREATE MACRO checksum(table_name) AS TABLE SELECT bit_xor(md5_numbe...STALL httpfs; You can attach to the remote endpoint and use the macro: ATTACH 'https://blobs.duckdb.org/data/compute_table_checksum.duckdb' AS compute_table_checksum_db; CREATE TABLE stations AS FROM 'https://blobs.duckdb.org/stations.parquet'; .mode lin...e FROM compute_table_checksum_db.checksum('stations'); id = 207501589970998739957162925925638303138 code = 126327004005066229305810236187733612209 uic =... - https://man.mtool.work/duckdb/2.0/guides/snippets/sharing_macros.html
- Crashes 8810
- DuckDB is thoroughly tested via an extensive test suite. However, bugs can still occur and these can sometimes lead to crashes. This page contains practical information on how to troubleshoot DuckDB crashes. Types of Crashes There are a few
...rrors” page . Corrupted database or WAL file: DuckDB displays the following error: console Corrupt database file: computed checksum [...] does not match stored checksum [...] in block at location [...] If the WAL file gets corrupted, DuckDB will display:...console Failure while replaying WAL file "[...].wal": Corrupt WAL file: entry at byte position [...] computed checksum [...] does not match stored checksum [...] Similarly to internal errors, calls to a database after encountering these erro...rs will return a FATAL error . Most often the checksum error is the symptom of a faulty disk. If you encounter such an error with DuckDB, please run a disk check on the machine... - https://man.mtool.work/duckdb/2.0/guides/troubleshooting/crashes.html
- CREATE MACRO Statement 7878
- 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
...define macros on arbitrary tables, use the query_table function . For example, the following macro computes a column-wise checksum on a table: CREATE MACRO checksum(tbl) AS TABLE SELECT bit_xor(md5_number(COLUMNS(*)::VARCHAR)) FROM query_table(tbl); CRE...ATE TABLE tbl AS SELECT unnest([42, 43]) AS x, 100 AS y; SELECT * FROM checksum('tbl'); A table macro's expression is bound when the macro is created, so file names written directly into the expression... - https://man.mtool.work/duckdb/2.0/sql/statements/create_macro.html
- Guides 7659
- The guides section contains compact how-to guides that are focused on achieving a single goal. For API references and examples, see the rest of the documentation. Note that there are many tools using DuckDB, which are not covered in the off
...macros Analyzing a Git repository Importing duckbox tables Copying an in-memory database to a file Calculating a database checksum Troubleshooting Command line Crashes Out of memory errors Glossary and Offline Docs Glossary of terms Browsing offline... - https://man.mtool.work/duckdb/2.0/guides/overview.html
- Storage Versions and Format 7549
- Compatibility Backward Compatibility Backward compatibility refers to the ability of a newer DuckDB version to read storage files created by an older DuckDB version. Version 0.10 is the first release of DuckDB that supports backward compati
...'v1.0.0'); COPY FROM DATABASE file1 TO converted_file; Storage Header DuckDB files start with a uint64_t which contains a checksum for the main header, followed by four magic bytes ( DUCK ), followed by a version number in a uint64_t . Files created in... - https://man.mtool.work/duckdb/2.0/internals/storage.html
PREV
1
NEXT
DuckDB 2.0 Documentation / man.mtool.work