-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com-ghec:databricks/dbt-databricks into…
… bump_python_sdk_version
- Loading branch information
Showing
13 changed files
with
109 additions
and
49 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{% macro databricks__split_part(string_text, delimiter_text, part_number) %} | ||
|
||
{% set delimiter_expr %} | ||
|
||
-- escape if starts with a special character | ||
case when regexp_extract({{ delimiter_text }}, '([^A-Za-z0-9])(.*)', 1) != '_' | ||
then concat('\\', {{ delimiter_text }}) | ||
else {{ delimiter_text }} end | ||
|
||
{% endset %} | ||
|
||
{% if part_number >= 0 %} | ||
|
||
{% set split_part_expr %} | ||
|
||
get(split( | ||
{{ string_text }}, | ||
{{ delimiter_expr }} | ||
), {{ part_number - 1 if part_number > 0 else part_number }}) | ||
|
||
{% endset %} | ||
|
||
{% else %} | ||
|
||
{% set split_part_expr %} | ||
|
||
get(split( | ||
{{ string_text }}, | ||
{{ delimiter_expr }} | ||
), | ||
length({{ string_text }}) | ||
- length( | ||
replace({{ string_text }}, {{ delimiter_text }}, '') | ||
) + 1 + {{ part_number }} | ||
) | ||
|
||
{% endset %} | ||
|
||
{% endif %} | ||
|
||
{{ return(split_part_expr) }} | ||
|
||
{% endmacro %} |
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
databricks-sql-connector>=3.5.0, <4.0 | ||
dbt-spark>=1.9.0b1, <2.0 | ||
dbt-core>=1.9.0b1, <2.0 | ||
dbt-spark>=1.8.0, <2.0 | ||
dbt-core>=1.8.7, <2.0 | ||
dbt-common>=1.10.0, <2.0 | ||
dbt-adapters>=1.7.0, <2.0 | ||
databricks-sdk==0.36.0 | ||
keyring>=23.13.0 | ||
protobuf<5.0.0 | ||
pydantic>=1.10.0, <2 |
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