Spaces:
Running
Running
Julius Kibunjia
Srihari Thyagarajan
commited on
Update duckdb/009_loading_json.py
Browse filesCo-authored-by: Srihari Thyagarajan <[email protected]>
duckdb/009_loading_json.py
CHANGED
@@ -78,7 +78,7 @@ def _(mo):
|
|
78 |
|
79 |
For greater control over how the JSON is read, we can directly call the [`read_json`](https://duckdb.org/docs/stable/data/json/loading_json#the-read_json-function) function. It supports a few different arguments — some common ones are:
|
80 |
|
81 |
-
- `format='array'` or `format='newline_delimited'` - the former tells DuckDB that the rows should be read from a top-level JSON array while latter means the rows should be read from JSON objects separated by a newline (JSONL/NDJSON).
|
82 |
- `ignore_errors=true` - skips lines with parse errors when reading newline delimited JSON.
|
83 |
- `columns={columnName: type, ...}` - lets you set types for individual columns manually.
|
84 |
- `dateformat` and `timestampformat` - controls how DuckDB attempts to parse [Date](https://duckdb.org/docs/stable/sql/data_types/date) and [Timestamp](https://duckdb.org/docs/stable/sql/data_types/timestamp) types. Use the format specifiers specified in the [docs](https://duckdb.org/docs/stable/sql/functions/dateformat.html#format-specifiers).
|
|
|
78 |
|
79 |
For greater control over how the JSON is read, we can directly call the [`read_json`](https://duckdb.org/docs/stable/data/json/loading_json#the-read_json-function) function. It supports a few different arguments — some common ones are:
|
80 |
|
81 |
+
- `format='array'` or `format='newline_delimited'` - the former tells DuckDB that the rows should be read from a top-level JSON array while the latter means the rows should be read from JSON objects separated by a newline (JSONL/NDJSON).
|
82 |
- `ignore_errors=true` - skips lines with parse errors when reading newline delimited JSON.
|
83 |
- `columns={columnName: type, ...}` - lets you set types for individual columns manually.
|
84 |
- `dateformat` and `timestampformat` - controls how DuckDB attempts to parse [Date](https://duckdb.org/docs/stable/sql/data_types/date) and [Timestamp](https://duckdb.org/docs/stable/sql/data_types/timestamp) types. Use the format specifiers specified in the [docs](https://duckdb.org/docs/stable/sql/functions/dateformat.html#format-specifiers).
|