duckdb-wasm
duckdb-wasm copied to clipboard
Attaching duckdb types while fetching data
When I fetch data from duckdb wasm, I guess type of data base on Apache Arrow Field. Sometimes, type couldn't be guessed exactly.
Eg, For this query "SELECT -9223372036854775809;"
.
- DuckDB Type
HUGEINT
- Apache Arrow store it as
DECIMAL
Another example: JSON
type is store as Utf8
type in Apache Arrow.
Please let me know if having any way to retrieve exactly type from duckdb.
If you insert into a table, you could query the table metadata! https://duckdb.org/docs/sql/information_schema
Hi @Alex-Monahan ,
For Select from table
, I could retrieve data types from Duckdb.
I mainly focus on SELECT from values
. Eg: SELECT interval 1 day;
Thanks