Skip to content

Support MotherDuck views #822

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

Merged
merged 17 commits into from
Jun 16, 2025
Merged

Support MotherDuck views #822

merged 17 commits into from
Jun 16, 2025

Conversation

JelteF
Copy link
Collaborator

@JelteF JelteF commented Jun 5, 2025

This adds support for creating, querying and syncing VIEWs from MotherDuck.

Views created by CREATE VIEW get created in MotherDuck if one of the
following conditions is met:

  1. The view is created in a ddb$ schema.
  2. The query of the view accesses DuckDB tables or DuckDB views.
  3. duckdb.force_motherduck_views is set to true.

Fixes #474

@JelteF JelteF force-pushed the duckdb-views branch 2 times, most recently from 2d8df06 to 4904c78 Compare June 5, 2025 16:01
@@ -63,7 +63,7 @@ jobs:

# If main or tag, then push to `pgduckdb/pgduckdb`
git fetch --tags --force
if [ "$BRANCH" = "main" ] || git rev-parse --verify $BRANCH^{tag} > /dev/null 2>&1; then
if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "duckdb-views" ] || git rev-parse --verify $BRANCH^{tag} > /dev/null 2>&1; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this change? You want to publish a docker version for this branch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah it's so people can test this stuff easily without merging the PR. I'll make sure to remove it before we merge this.

return;
}

elog(WARNING, "AAAA: %s", create_query.c_str());
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume it's a leftover? :-)
Not sure how to catch these without running MD tests?

@JelteF JelteF added this to the 1.0.0 milestone Jun 11, 2025
@JelteF JelteF merged commit 12dee2e into main Jun 16, 2025
18 checks passed
@JelteF JelteF deleted the duckdb-views branch June 16, 2025 15:41
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.

2 participants