Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using a DuckDB view as source which makes use of CTEs #79

Open
IvoMoor opened this issue Apr 15, 2024 · 0 comments
Open

Error when using a DuckDB view as source which makes use of CTEs #79

IvoMoor opened this issue Apr 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@IvoMoor
Copy link
Collaborator

IvoMoor commented Apr 15, 2024

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"?

@IvoMoor IvoMoor added the bug Something isn't working label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant