Results of 1 - 10 of about 14 for infer (0.001 sec.)
- JSON Overview 11955
- DuckDB supports SQL functions that are useful for reading values from existing JSON and creating new JSON data. JSON is supported with the json extension which is shipped with most DuckDB distributions and is auto-loaded on first use. If yo
...Y and LIST data types but 0-based indexing for the JSON data type . Examples Loading JSON Read a JSON file from disk, auto-infer options: SELECT * FROM 'todos.json'; Use the read_json function with custom options: SELECT * FROM read_json('todos.json',..., columns = {userId: 'UBIGINT', id: 'UBIGINT', title: 'VARCHAR', completed: 'BOOLEAN'}); Read a JSON file from stdin, auto-infer options: cat data/json/todos.json | duckdb -c "SELECT * FROM read_json('/dev/stdin')" Read a JSON file into a table: CREAT... - https://man.mtool.work/duckdb/2.0/data/json/overview.html
- Excel Import 10800
- DuckDB supports reading Excel .xlsx files. However, .xls files are not supported. Importing Excel Sheets Use the read_xlsx function in the FROM clause of a query: SELECT * FROM read_xlsx('test_excel.xlsx'); Alternatively, you can omit the r
...ead_xlsx function and let DuckDB infer it from the extension: SELECT * FROM 'test_excel.xlsx'; However, if you want to be able to pass options to control the imp...olumns: SELECT * FROM read_xlsx('test_excel.xlsx', range = 'E:Z'); If no range parameter is provided, DuckDB automatically infers the range as the rectangular region of cells between the first row of consecutive non-empty cells and the first empty row...xcel.xlsx', header = true); By default, the first row is treated as a header if all the cells in the first row (within the inferred or supplied range) are non-empty strings. To disable this behavior, set header to false . Detecting Types When not impo... - https://man.mtool.work/duckdb/2.0/guides/file_formats/excel_import.html
- CSV Import 10415
- Examples The following examples use the flights.csv file. Read a CSV file from disk, auto-infer options: SELECT * FROM 'flights.csv'; Use the read_csv function with custom options: SELECT * FROM read_csv('flights.csv', delim = '|', header =
...'DATE', 'UniqueCarrier': 'VARCHAR', 'OriginCityName': 'VARCHAR', 'DestCityName': 'VARCHAR' }); Read a CSV from stdin, auto-infer options: cat flights.csv | duckdb -c "SELECT * FROM read_csv('/dev/stdin')" Read a CSV file into a table: CREATE TABLE ont...ave a schema. The CSV reader needs to cope with all of these different situations. The DuckDB CSV reader can automatically infer which configuration flags to use by analyzing the CSV file using the CSV sniffer . This will work correctly in most situat... - https://man.mtool.work/duckdb/2.0/data/csv/overview.html
- CSV Import 10415
- To read data from a CSV file, use the read_csv function in the FROM clause of a query: SELECT * FROM read_csv('input.csv'); Alternatively, you can omit the read_csv function and let DuckDB infer it from the extension: SELECT * FROM 'input.c
... - https://man.mtool.work/duckdb/2.0/guides/file_formats/csv_import.html
- Excel Extension 10030
- 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
...nction instead. The following named parameters are supported. Option Type Default Description header BOOLEAN automatically inferred Whether to treat the first row as containing the names of the resulting columns. sheet VARCHAR automatically inferred T...s. ignore_errors BOOLEAN false Whether to ignore errors and silently replace cells that can't be cast to the corresponding inferred column type with NULL 's. range VARCHAR automatically inferred The range of cells to read, in spreadsheet notation. For...example, A1:B2 reads the cells from A1 to B2. If not specified the resulting range will be inferred as rectangular region of cells between the first row of consecutive non-empty cells and the first empty row spanning th... - https://man.mtool.work/duckdb/2.0/core_extensions/excel.html
- Parquet Import 9260
- To read data from a Parquet file, use the read_parquet function in the FROM clause of a query: SELECT * FROM read_parquet('input.parquet'); Alternatively, you can omit the read_parquet function and let DuckDB infer it from the extension: SE
... - https://man.mtool.work/duckdb/2.0/guides/file_formats/parquet_import.html
- Loading JSON 8875
- 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
...types contained within the JSON file (e.g., {key1: 'INTEGER', key2: 'VARCHAR'} ). If auto_detect is enabled these will be inferred STRUCT (empty) dateformat Specifies the date format to use when parsing dates. See Date Format VARCHAR iso maximum_dept...zone offsets (e.g., 2024-01-01T12:00:00+05:00 ) and fractional seconds (e.g., 2024-01-01T12:00:00.123Z ) are automatically inferred as TIMESTAMPTZ . VARCHAR iso union_by_name Whether the schemas of multiple JSON files should be unified BOOL false map_...shold Controls the threshold for number of columns whose schema will be auto-detected; if JSON schema auto-detection would infer a STRUCT type for a field that has more than this threshold number of subfields, it infers a MAP type instead. Set to -1 t... - https://man.mtool.work/duckdb/2.0/data/json/loading_json.html
- JSON Format Settings 8489
- 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
...as not needed, as DuckDB was able to infer it correctly, but it is included for illustrative purposes. A query of this shape would work in each case: SELECT * FROM f... - https://man.mtool.work/duckdb/2.0/data/json/format_settings.html
- Hive Partitioning 8489
- Examples Read data from a Hive partitioned dataset: SELECT * FROM read_parquet('orders/*/*/*.parquet', hive_partitioning = true); Write a table to a Hive partitioned dataset: COPY orders TO 'orders' (FORMAT parquet, PARTITION_BY (year, mont
...read: orders └── year=2022 └── month=11 ├── file4.parquet └── file5.parquet Auto-detection By default the system tries to infer if the provided files are in a hive partitioned hierarchy. And if so, the hive_partitioning flag is enabled automatically.... - https://man.mtool.work/duckdb/2.0/data/partitioning/hive_partitioning.html
- Python Function API 6966
- You can create a DuckDB user-defined function (UDF) from a Python function so it can be used in SQL queries. Similarly to regular functions , they need to have a name, a return type and parameter types. Creating Functions To register a Pyth
...return type must be annotated or given as return_type ; otherwise create_function raises InvalidInputException: Could not infer the return type, please set it explicitly . NULL Handling By default when functions receive a NULL value, this instantly r... - https://man.mtool.work/duckdb/2.0/clients/python/function.html
DuckDB 2.0 Documentation / man.mtool.work