Results of 1 - 10 of about 122 for format (0.003 sec.)
- Text Functions 10559
- Text Functions and Operators This section describes functions and operators for examining and manipulating STRING values . Function Description string[index] Extracts a single character using a (1-based) index . string[begin:end] Extracts a
...tring is found within string . Note that collations are not supported. ends_with(string, search_string) Alias for suffix . format(format, ...) Formats a string using the fmt syntax . formatReadableDecimalSize(integer) Converts integer to a human-readab...le representation using units based on powers of 10 (KB, MB, GB, etc.). format_bytes(integer) Converts integer to a human-readable representation using units based on powers of 2 (KiB, MiB, GiB, etc.)...., search_string) Alias for instr . prefix(string, search_string) Returns true if string starts with search_string . printf(format, ...) Formats a string using printf syntax . read_text(source) Returns the content from source (a filename, a list of file... - https://man.mtool.work/duckdb/2.0/sql/functions/text.html
- Storage Versions and Format 10374
- 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
...bility in the storage format. DuckDB 0.10 can read and operate on files created by the previous DuckDB version – DuckDB 0.9. For future DuckDB versions...on released after can read files created by previous versions, starting from this release. We want to ensure that the file format is fully backward compatible. This allows you to keep data stored in DuckDB files around and guarantees that you will be a...B 0.10 can be read by DuckDB 0.9. Forward compatibility is provided on a best effort basis. While stability of the storage format is important – there are still many improvements and innovations that we want to make to the storage format in the future.... - https://man.mtool.work/duckdb/2.0/internals/storage.html
- COPY Statement 10188
- 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
...R '|'); Read a Parquet file into the lineitem table: COPY lineitem FROM 'lineitem.pq' (FORMAT parquet); Read a JSON file into the lineitem table, using auto-detected options: COPY lineitem FROM 'lineitem.json' (FORMA...tem table, omitting quotes: COPY lineitem FROM lineitem.csv; Write a table to a CSV file: COPY lineitem TO 'lineitem.csv' (FORMAT csv, DELIMITER '|', HEADER); Write a table to a CSV file, using double quotes: COPY lineitem TO "lineitem.csv"; Write a ta...csv'; Read the contents of a Parquet file lineitem.parquet into the lineitem table: COPY lineitem FROM 'lineitem.parquet' (FORMAT parquet); Read the contents of a newline-delimited JSON file lineitem.ndjson into the lineitem table: COPY lineitem FROM '... - https://man.mtool.work/duckdb/2.0/sql/statements/copy.html
- Loading JSON 10139
- The DuckDB JSON reader can automatically infer which configuration flags to use by analyzing the JSON file. This will work correctly in most situations, and should be the first option attempted. In rare situations where the JSON reader cann
...Multiple files can be read at once by providing a glob or a list of files. Refer to the multiple files section for more information. Functions for Reading JSON Objects The following table functions are used to read JSON: Function Description read_json...an also be a list of files or a glob pattern. read_ndjson_objects(filename) Alias for read_json_objects with the parameter format set to newline_delimited . read_json_objects_auto(filename) Alias for read_json_objects with the parameter format set to a...ename column is added automatically as a virtual column and this option is only kept for compatibility reasons. BOOL false format Can be one of auto , unstructured , newline_delimited and array . VARCHAR auto hive_partitioning Whether or not to interpr... - https://man.mtool.work/duckdb/2.0/data/json/loading_json.html
- JSON Format Settings 9632
- The JSON extension can attempt to determine the format of a JSON file when setting format to auto . Here are some example JSON files and the corresponding format settings that should be used. In each of the below cases, the format setting w
...but it is included for illustrative purposes. A query of this shape would work in each case: SELECT * FROM filename.json; Format: newline_delimited With format = 'newline_delimited' newline-delimited JSON can be parsed. Each line is a JSON. We use the..."value1"} {"key1":"value2", "key2": "value2"} {"key1":"value3", "key2": "value3"} SELECT * FROM read_json('records.json', format = 'newline_delimited'); key1 key2 value1 value1 value2 value2 value3 value3 Format: array If the JSON file contains a JSON..."key1":"value2", "key2": "value2"}, {"key1":"value3", "key2": "value3"} ] SELECT * FROM read_json('records-in-array.json', format = 'array'); key1 key2 value1 value1 value2 value2 value3 value3 Format: unstructured If the JSON file contains JSON that i... - https://man.mtool.work/duckdb/2.0/data/json/format_settings.html
- Excel Export 8977
- DuckDB supports exporting data to Excel .xlsx files via the excel extension. Please note that .xls files are not supported. To install and load the extension, run: INSTALL excel; LOAD excel; Exporting Excel Sheets To export a table to an Ex
...cel file, use the COPY statement with the FORMAT xlsx option: COPY tbl TO 'output.xlsx' WITH (FORMAT xlsx); The result of a query can also be directly exported to an Excel...file: COPY (SELECT * FROM tbl) TO 'output.xlsx' WITH (FORMAT xlsx); Or: COPY (SELECT * FROM tbl) TO 'output.xlsx'; To write the column names as the first row in the Excel file, use th...e HEADER option: COPY tbl TO 'output.xlsx' WITH (FORMAT xlsx, HEADER true); To name the worksheet in the resulting Excel file, use the SHEET option: COPY tbl TO 'output.xlsx' WIT... - https://man.mtool.work/duckdb/2.0/guides/file_formats/excel_export.html
- Timestamp Functions 8977
- 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
...erts nanoseconds since the epoch to a timestamp. monthname(timestamp) The (English) 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 tim...estamp 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 on fail... - https://man.mtool.work/duckdb/2.0/sql/functions/timestamp.html
- Excel Extension 8939
- The excel extension provides functions to format numbers per Excel's formatting rules by wrapping the i18npool library and to read/write Excel ( .xlsx ) files. However, please note that .xls files are not supported. Installing and Loading T
...install and load it manually, run: INSTALL AND LOAD excel; Excel Scalar Functions Function Description excel_text(number, format_string) Format the given number per the rules given in the format_string text(number, format_string) Alias for excel_text.... SELECT * FROM read_xlsx('test.xlsx', header = true); a b 1.0 2.0 3.0 4.0 Alternatively, the COPY statement with the XLSX format option can be used to import an Excel file into an existing table, in which case the types of the columns in the target ta...coerce the types of the cells in the Excel file. CREATE TABLE test (a DOUBLE, b DOUBLE); COPY test FROM 'test.xlsx' WITH (FORMAT xlsx, HEADER); SELECT * FROM test; Type and Range Inference Because Excel itself only really stores numbers or strings in... - https://man.mtool.work/duckdb/2.0/core_extensions/excel.html
- Writing JSON 8606
- 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
...es.json with the following content: {"name":"Amsterdam","id":1} {"name":"London","id":2} See the COPY statement for more information. GeoJSON New This feature was introduced in DuckDB 2.0. COPY ... (FORMAT GEOJSON) writes a GeoJSON FeatureCollection ....FORMAT GEOJSONL (or ARRAY true with FORMAT GEOJSON ) writes newline-delimited Feature objects. You do not need json_geometry_format for these copy formats. COPY (SEL...ECT 'POINT(0 1)'::GEOMETRY AS geom, 10 AS my_field) TO 'test.json' (FORMAT GEOJSON); COPY (SELECT 'POINT(0 1)'::GEOMETRY AS geom, 10 AS my_field) TO 'test.jsonl' (FORMAT GEOJSONL); Optional ID_COLU... - https://man.mtool.work/duckdb/2.0/data/json/writing_json.html
- Reading and Writing Parquet Files 8420
- Examples Read a single Parquet file: SELECT * FROM 'test.parquet'; Figure out which columns/types are in a Parquet file: DESCRIBE SELECT * FROM 'test.parquet'; Create a table from a Parquet file: CREATE TABLE test AS SELECT * FROM 'test.par
...of a query to a Parquet file using the default compression (Snappy): COPY (SELECT * FROM tbl) TO 'result-snappy.parquet' (FORMAT parquet); Write the results from a query to a Parquet file with specific compression and row group size: COPY (FROM genera...te_series(100_000)) TO 'test.parquet' (FORMAT parquet, COMPRESSION zstd, ROW_GROUP_SIZE 100_000); Export the table contents of the entire database as parquet: EXPORT DA...TABASE 'target_directory' (FORMAT parquet); Parquet Files Parquet files are compressed columnar files that are efficient to load and process. DuckDB provide... - https://man.mtool.work/duckdb/2.0/data/parquet/overview.html
DuckDB 2.0 Documentation / man.mtool.work