Skip to content

Commit 8d0dd98

Browse files
authored
fix filter (#14)
1 parent 68a8b99 commit 8d0dd98

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tinybird/endpoints/log_timeseries.pipe

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,10 @@ SQL >
112112
{% if defined(user_agent) and user_agent != [''] %}
113113
AND user_agent in {{Array(user_agent)}}
114114
{% end %}
115-
{% if defined(message) and message != '' %}
116-
AND message like concat('%', {{String(message)}}, '%')
115+
{% if date_diff_in_hours(start_date, end_date) <= 24 * 7 %}
116+
{% if defined(message) and message != '' %}
117+
AND message like concat('%', {{String(message)}}, '%')
118+
{% end %}
117119
{% end %}
118120
GROUP BY date
119121
ORDER BY date

0 commit comments

Comments
 (0)