-
Notifications
You must be signed in to change notification settings - Fork 98
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
Update Dependencies to dbt-semantic-interfaces~=0.3.0
#809
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: Dependencies | ||
body: Update to dbt-semantic-interfaces~=0.3.0. | ||
time: 2023-10-12T14:19:30.799362-07:00 | ||
custom: | ||
Author: plypaul | ||
PR: "809" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from __future__ import annotations | ||
|
||
from typing import Optional | ||
|
||
from dbt_semantic_interfaces.implementations.filters.where_filter import PydanticWhereFilter | ||
from dbt_semantic_interfaces.protocols import WhereFilter, WhereFilterIntersection | ||
|
||
|
||
def merge_to_single_where_filter(where_filter_intersection: WhereFilterIntersection) -> Optional[WhereFilter]: | ||
"""Returns a single where filter that is equivalent to the given intersection.""" | ||
if len(where_filter_intersection.where_filters) == 0: | ||
return None | ||
|
||
if len(where_filter_intersection.where_filters) == 1: | ||
return where_filter_intersection.where_filters[0] | ||
|
||
each_where_filter_condition = [ | ||
"( " + where_filter.where_sql_template + " )" for where_filter in where_filter_intersection.where_filters | ||
] | ||
|
||
return PydanticWhereFilter(where_sql_template=" AND ".join(each_where_filter_condition)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,8 @@ dependencies = [ | |
"MarkupSafe==2.0.1", # pandas implicitly requires this version | ||
"PyYAML~=6.0", | ||
"click>=7.1.2", | ||
"dbt-core~=1.6.0", | ||
"dbt-semantic-interfaces~=0.2.0", | ||
"dbt-core~=1.7.0rc1", | ||
"dbt-semantic-interfaces~=0.3.0", | ||
"graphviz>=0.18.2, <0.21", | ||
"halo~=0.0.31", | ||
"more-itertools>=8.10.0, <10.2.0", | ||
|
@@ -75,7 +75,7 @@ sql-client-packages = [ | |
] | ||
|
||
dbt-postgres = [ | ||
"dbt-postgres~=1.6.0", | ||
"dbt-postgres~=1.7.0rc1", | ||
] | ||
|
||
dbt-bigquery = [ | ||
|
@@ -114,9 +114,13 @@ exclude = [ | |
description = "Environment for development. Includes a DuckDB-backed client." | ||
features = [ | ||
"dev-packages", | ||
"dbt-duckdb", | ||
"sql-client-packages", | ||
] | ||
# Temporary workaround for installing the dbt-duckdb adapter until it's updated to support dbt-core~=1.7.0rc1. | ||
post-install-commands = [ | ||
"pip install duckdb>=0.7.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, we need to manually install the adapter dependencies? That's a bummer. |
||
"pip install --no-deps dbt-duckdb~=1.6.0", | ||
] | ||
|
||
[tool.hatch.envs.dev-env.env-vars] | ||
MF_TEST_ADAPTER_TYPE="duckdb" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. DAY could be wrong, and then it'll throw a less helpful error, but at least it'll work for daily granularities and error out otherwise.