You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by lucasl84 October 18, 2024
Hi,
I needed to use the WASM DuckDB for some tests. I was reading the documentation for loading a CSV from a static served file. Is it really too much to ask to have better documentation. In the snippet I'm referring to Apache Arrow is referenced and nowhere imported. Also what c is supposed to be in c.insertCSVFromPath? I got that is the connection, but please avoid this coding/documentation style, is confusing and time wasting (especially for someone that just got started developing or developing with DuckDB). The missing imports I'm referring to are:
import{Int32,Utf8}from'apache-arrow';// Also remove the `arrow.` prefix.
I think examples should always be self-contained: I should be able to copy/paste a snippet and run it without any other extra code or modifications from elsewhere. As I have used DuckDB in the past with Python when providing the columns for CSVs this is done for example with the following types:
In the above snippet the INT, STRING and BOOL types work but in the JS version I need to use Apache Arrow types. Would I also need to use different datatypes library/syntax if I use other existing DuckDB bindings? Couldn't be possible to use plain strings to reference datatypes as above and allow DuckDB behind scenes to do the appropriate conversions for each binding?
Thanks,
Lucas.
The text was updated successfully, but these errors were encountered:
Discussed in duckdb/duckdb#14431
Originally posted by lucasl84 October 18, 2024
Hi,
I needed to use the WASM DuckDB for some tests. I was reading the documentation for loading a CSV from a static served file. Is it really too much to ask to have better documentation. In the snippet I'm referring to Apache Arrow is referenced and nowhere imported. Also what
c
is supposed to be inc.insertCSVFromPath
? I got that is the connection, but please avoid this coding/documentation style, is confusing and time wasting (especially for someone that just got started developing or developing with DuckDB). The missing imports I'm referring to are:I think examples should always be self-contained: I should be able to copy/paste a snippet and run it without any other extra code or modifications from elsewhere. As I have used DuckDB in the past with Python when providing the columns for CSVs this is done for example with the following types:
In the above snippet the
INT
,STRING
andBOOL
types work but in the JS version I need to use Apache Arrow types. Would I also need to use different datatypes library/syntax if I use other existing DuckDB bindings? Couldn't be possible to use plain strings to reference datatypes as above and allow DuckDB behind scenes to do the appropriate conversions for each binding?Thanks,
Lucas.
The text was updated successfully, but these errors were encountered: