-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from fivetran/bug/databricks-get-url-parameter
Bug/databricks get url parameter
- Loading branch information
Showing
7 changed files
with
64 additions
and
34 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
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,20 @@ | ||
{% macro extract_url_parameter(field, url_parameter) -%} | ||
|
||
{{ adapter.dispatch('extract_url_parameter', 'fivetran_utils') (field, url_parameter) }} | ||
|
||
{% endmacro %} | ||
|
||
|
||
{% macro default__extract_url_parameter(field, url_parameter) -%} | ||
|
||
{{ dbt_utils.get_url_parameter(field, url_parameter) }} | ||
|
||
{%- endmacro %} | ||
|
||
|
||
{% macro spark__extract_url_parameter(field, url_parameter) -%} | ||
|
||
{%- set formatted_url_parameter = "'" + url_parameter + "=([^&]+)'" -%} | ||
nullif(regexp_extract({{ field }}, {{ formatted_url_parameter }}, 1), '') | ||
|
||
{%- endmacro %} |