This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamically switch references for
model_run_results_v4
(#50)
Signed-off-by: Yu ISHIKAWA <yuu.ishikawa@gmail.com> Signed-off-by: Yu ISHIKAWA <yuu.ishikawa@gmail.com>
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{% macro get_dbt_minor_version(version) %} | ||
{% set re = modules.re %} | ||
{% set pattern = '[\.][^\.]+$' %} | ||
{% set dbt_minor_version = re.sub(pattern, '', version) %} | ||
{{ return(dbt_minor_version) }} | ||
{% endmacro %} | ||
|
||
{% macro test_get_dbt_minor_version() %} | ||
{% set result = get_dbt_minor_version("1.0.3") %} | ||
{% if result != "1.0" %} | ||
{{ exceptions.raise_compiler_error("Expected 1.0, but " ~ result) }} | ||
{% endif %} | ||
|
||
{% set result = get_dbt_minor_version("1.1.0") %} | ||
{% if result != "1.1" %} | ||
{{ exceptions.raise_compiler_error("Expected 1.1, but " ~ result) }} | ||
{% endif %} | ||
|
||
{% set result = get_dbt_minor_version("1.1.1") %} | ||
{% if result != "1.1" %} | ||
{{ exceptions.raise_compiler_error("Expected 1.1, but " ~ result) }} | ||
{% endif %} | ||
|
||
{% set result = get_dbt_minor_version("1.2.0-rc1") %} | ||
{% if result != "1.2" %} | ||
{{ exceptions.raise_compiler_error("Expected 1.2, but " ~ result) }} | ||
{% endif %} | ||
{% 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