Closed spren9er closed 1 week ago
I won’t be able to take a closer look at this until next week (the issue is that Mosaic interprets the table name as schema.table
), but in the meantime here are two ideas:
exec
query)? Then you can query the view as a normal table.sql`’athletes.csv’`
or similar)?Thanks, first workaround (creating a view for it) worked out.
Since views work well for this. I think we also improved escaping of table names in the meantime. I'll close this for now but if you find other issues, we can reopen or log more specific issues.
Quoting is in https://github.com/uwdata/mosaic/issues/378.
Data loading helpers create DuckDB tables/views from parquet, JSON or CSV files. Unfortunately, this process can take a while when data is big. Sometimes — in DuckDB-WASM — it is nicer to register files and run queries directly on them (see
registerFileURL
). Query performance on DuckDB tables is optimal, but queries on parquet files are fast, too.Here, we try to use a registered CSV file (via HTTP) in vgplot:
Note, that references of mosaic clients point now to registered file
athletes.csv
, not a DuckDB table anymore.This works! However, currently not all marks from vgplot are supported with registered files. Connected marks (e.g.
area
,line
) don't work. When replacing above markbarX
byan error is raised:
I think the reason is probably due to some preprocessing of table name, see here. This logic conflicts with registered file name. I tried changing name of registered file
athletes.csv
, but if I omit.csv
suffix, then DuckDB-WASM interprets reference as table.It would be great if vgplot fully works with registered files (via HTTP(S), S3, local storage, etc.).