Skip to content

JSON query resolving to invalid SQLΒ #9744

@ZmeiGorynych

Description

@ZmeiGorynych

Problem

I have several cube definitions with joins in them (.yaml files in the attachment), and when I try to execute the query contained in the .json file in the attachment, it produces the following sql error:

Failed to execute SQL for views with include_joins=True, error: Error executing SQL: invalid reference to FROM-clause entry for table "views"
LINE 2: LEFT JOIN public.videos AS "main__videos" ON views.video_id ...
                                                     ^
HINT:  Perhaps you meant to reference the table alias "main__views".

The SQL generated is in the .sql file in the attachment

This seems to be a really simple setup, I really don't understand why it produces invalid SQL?

Many thanks,
E.

failing_sql.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionThe issue is a question. Please use Stack Overflow for questions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions