Skip to content

Allow reading query for qlever materialized-view from Qleverfile - #326

Open
ullingerc wants to merge 2 commits into
qlever-dev:mainfrom
ullingerc:materialized-view-from-qleverfile
Open

Allow reading query for qlever materialized-view from Qleverfile#326
ullingerc wants to merge 2 commits into
qlever-dev:mainfrom
ullingerc:materialized-view-from-qleverfile

Conversation

@ullingerc

@ullingerc ullingerc commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

If the user calls qlever materialized-view NAME QUERY without a QUERY, we now look if a view with name NAME is defined in the Qleverfile and if yes, use that query. Useful for rewriting a view defined in the Qleverfile. Closes #315

If the user calls `qlever materialized-view NAME QUERY` without a `QUERY`, we now look if a view with name `NAME` is defined in the `Qleverfile` and if yes, use that query. Useful for rewriting a view defined in the `Qleverfile`.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a convenience fallback for the qlever materialized-view CLI command: when the query argument is omitted, the command now attempts to read the corresponding query from MATERIALIZED_VIEWS in the Qleverfile (matching the configuration key used by qlever index). This supports iterating on and reloading views defined in the Qleverfile against a running server (per #315).

Changes:

  • If view_query is omitted, attempt to load it from [index] MATERIALIZED_VIEWS in the Qleverfile.
  • Improve the error message when no query is available from CLI or Qleverfile.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/qlever/commands/materialized_view.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow materialized views to be created from Qleverfile via CLI

2 participants