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

feat: adding ability to specify table/view type #3253

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

benfdking
Copy link
Contributor

@benfdking benfdking commented Oct 15, 2024

No description provided.

@benfdking benfdking closed this Oct 15, 2024
@benfdking benfdking deleted the working_on_secure_views branch October 15, 2024 10:56
@benfdking benfdking restored the working_on_secure_views branch October 15, 2024 11:00
@benfdking benfdking reopened this Oct 15, 2024
sqlmesh/core/engine_adapter/base.py Outdated Show resolved Hide resolved
sqlmesh/core/engine_adapter/base.py Outdated Show resolved Hide resolved
sqlmesh/core/engine_adapter/base.py Show resolved Hide resolved
tests/core/engine_adapter/test_duckdb.py Show resolved Hide resolved
sqlmesh/core/engine_adapter/base.py Outdated Show resolved Hide resolved
sqlmesh/core/engine_adapter/base.py Outdated Show resolved Hide resolved
@benfdking
Copy link
Contributor Author

benfdking commented Oct 16, 2024

Two issues:

  • Not working in duckdb with
MODEL (
    name sqlmesh_example.full_model,
    kind FULL,
    cron '@daily',
    grain item_id,
    audits (assert_positive_order_ids),
    physical_properties (
      creatable_type = TEMP
    )
  );

  SELECT
    item_id,
    COUNT(DISTINCT id) AS num_orders,
  FROM
    sqlmesh_example.incremental_model
  GROUP BY item_id
  • Change is marked as non-breaking

@benfdking benfdking marked this pull request as draft October 17, 2024 12:47
@benfdking benfdking force-pushed the working_on_secure_views branch 6 times, most recently from 01f4f3b to 6f6430e Compare October 22, 2024 12:20
@benfdking
Copy link
Contributor Author

MODEL (
    name sqlmesh_example.full_model,
    kind FULL,
    cron '@daily',
    grain item_id,
    audits (assert_positive_order_ids),
    virtual_properties (
      creatable_type = SECURE
    ),
    physical_properties (
      creatable_type = TRANSIENT
    )
  );

  SELECT
    item_id,
    COUNT(DISTINCT id) AS num_orders,
  FROM
    sqlmesh_example.incremental_model
  GROUP BY item_id

In Snowflake gives you a secure view and a transient physical layer.

@benfdking benfdking marked this pull request as ready for review October 22, 2024 13:22
Copy link
Contributor

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

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

Nice work 🎉

@benfdking benfdking merged commit 7877a50 into main Oct 23, 2024
23 checks passed
@benfdking benfdking deleted the working_on_secure_views branch October 23, 2024 15:45
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.

3 participants