Skip to content

Commit

Permalink
Increase redshift path inputs to use max varchar instead of default 2…
Browse files Browse the repository at this point in the history
…56 (Close #26)
  • Loading branch information
agnessnowplow committed Aug 14, 2023
1 parent 55c01ce commit 7620dc9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions macros/path_transformations/create_udfs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
{% set trim_long_path %}
-- Returns the last snowplow__path_lookback_steps channels in the path if snowplow__path_lookback_steps > 0,
-- or the full path otherwise.
create or replace function {{target.schema}}.trim_long_path(path varchar, snowplow__path_lookback_steps integer)
create or replace function {{target.schema}}.trim_long_path(path varchar(max), snowplow__path_lookback_steps integer)
returns varchar
stable
AS $$
Expand Down Expand Up @@ -211,7 +211,7 @@
{% set remove_if_not_all %}
-- Returns the path with all copies of targetElem removed, unless the path consists only of
-- targetElems, in which case the original path is returned.
create or replace function {{target.schema}}.remove_if_not_all(path varchar, target_elem varchar)
create or replace function {{target.schema}}.remove_if_not_all(path varchar(max), target_elem varchar)
returns varchar
stable
AS $$
Expand All @@ -237,7 +237,7 @@
{% set remove_if_last_and_not_all %}
-- Returns the path with all copies of targetElem removed from the tail, unless the path consists
-- only of targetElems, in which case the original path is returned.
create or replace function {{target.schema}}.remove_if_last_and_not_all(path varchar, target_elem varchar)
create or replace function {{target.schema}}.remove_if_last_and_not_all(path varchar(max), target_elem varchar)
returns varchar
stable
AS $$
Expand Down Expand Up @@ -268,7 +268,7 @@
{% set unique %}
-- Returns the unique/identity transform of the given path array.
-- E.g. [D, A, B, B, C, D, C, C] --> [D, A, B, B, C, D, C, C].
create or replace function {{target.schema}}.unique_path(path varchar)
create or replace function {{target.schema}}.unique_path(path varchar(max))
returns varchar
stable
AS $$
Expand All @@ -283,7 +283,7 @@
-- Sequential duplicates are collapsed.
-- E.g. [D, A, B, B, C, D, C, C] --> [D, A, B, C, D, C].

create or replace function {{target.schema}}.exposure_path(path varchar)
create or replace function {{target.schema}}.exposure_path(path varchar(max))
returns varchar
stable
AS $$
Expand All @@ -307,7 +307,7 @@
-- Returns the first transform of the given path array.
-- Repeated channels are removed.
-- E.g. [D, A, B, B, C, D, C, C] --> [D, A, B, C].
create or replace function {{target.schema}}.first_path(path varchar)
create or replace function {{target.schema}}.first_path(path varchar(max))
returns varchar
stable
AS $$
Expand All @@ -330,7 +330,7 @@
-- Returns the frequency transform of the given path array.
-- Repeat events are removed, but tracked with a count.
-- E.g. [D, A, B, B, C, D, C, C] --> [D(2), A(1), B(2), C(3)].
create or replace function {{target.schema}}.frequency_path(path varchar)
create or replace function {{target.schema}}.frequency_path(path varchar(max))
returns varchar
stable
AS $$
Expand Down

0 comments on commit 7620dc9

Please sign in to comment.