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

fix: support all model methods in dbt projects #3161

Merged
merged 2 commits into from
Sep 21, 2024
Merged

fix: support all model methods in dbt projects #3161

merged 2 commits into from
Sep 21, 2024

Conversation

tobymao
Copy link
Contributor

@tobymao tobymao commented Sep 20, 2024

No description provided.

@tobymao tobymao force-pushed the toby/dbt_model branch 2 times, most recently from 2b91ed3 to 0814e81 Compare September 20, 2024 15:50
sqlmesh/dbt/manifest.py Outdated Show resolved Hide resolved
@tobymao tobymao force-pushed the toby/dbt_model branch 2 times, most recently from a685b0e to 5047544 Compare September 20, 2024 20:55
@@ -289,10 +294,21 @@ def sqlmesh_model_kwargs(self, context: DbtContext) -> t.Dict[str, t.Any]:
jinja_macros = model_context.jinja_macros.trim(
self.dependencies.macros, package=self.package_name
)

model_node: AttributeDict[str, t.Any] = AttributeDict(
Copy link
Member

Choose a reason for hiding this comment

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

btw, I don't think you need to convert to AttributeDict since the validator within JinjaMacros should take of that.

@@ -31,6 +31,7 @@ def test_manifest_helper(caplog):
assert models["top_waiters"].dependencies == Dependencies(
refs={"sushi.waiter_revenue_by_day", "waiter_revenue_by_day"},
variables={"top_waiters:revenue", "top_waiters:limit"},
model_attrs={"columns"},
Copy link
Member

Choose a reason for hiding this comment

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

can we also check some other attribute, eg. config?

@tobymao tobymao merged commit df0ec3c into main Sep 21, 2024
22 of 23 checks passed
@tobymao tobymao deleted the toby/dbt_model branch September 21, 2024 02: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.

2 participants