A view that makes use of CTEs in a duckdb file cannot be used as a source. When trying to select it, the console shows an error indicating that the table could not be found.
Steps to reproduce:
Create a duckdb file with a table:
create table Cities as select * from (values ('Amsterdam', 1), ('London', 2)) Cities(Name, Id);
On top create a view that uses a CTE:
create or replace view v_cities as select * from Cities;
Use the created duckdb file as a source and select the view. Huey will show an indicator that it is loading the metadata, but when opening the console, it turns out that there is an error:
Uncaught (in promise) Error: Catalog Error: Table with name Cities does not exist! Did you mean "xxx.Cities"?
A view that makes use of CTEs in a duckdb file cannot be used as a source. When trying to select it, the console shows an error indicating that the table could not be found.
Steps to reproduce: Create a duckdb file with a table:
create table Cities as select * from (values ('Amsterdam', 1), ('London', 2)) Cities(Name, Id);
On top create a view that uses a CTE:
create or replace view v_cities as select * from Cities;
Use the created duckdb file as a source and select the view. Huey will show an indicator that it is loading the metadata, but when opening the console, it turns out that there is an error:
Uncaught (in promise) Error: Catalog Error: Table with name Cities does not exist! Did you mean "xxx.Cities"?