Skip to content

Commit c9dd284

Browse files
committed
add pipes
1 parent 9d95d66 commit c9dd284

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

tinybird/pipes/vercel_cache_stats.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SQL >
1010
countIf(event.proxy.vercelCache = 'HIT') as cache_hits,
1111
round(countIf(event.proxy.vercelCache = 'HIT') * 100.0 / count(), 2) as hit_rate
1212
FROM vercel_logs
13-
WHERE event.proxy.vercelCache != ''
13+
WHERE event.proxy.vercelCache::String != ''
1414
AND event_time >= {{DateTime(date_from, '2024-01-01 00:00:00')}}
1515
AND event_time <= {{DateTime(date_to, '2024-12-31 23:59:59')}}
1616
GROUP BY hour

tinybird/pipes/vercel_errors.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SQL >
1010
count() as total_requests,
1111
round(countIf(event.proxy.statusCode >= 400) * 100.0 / count(), 2) as error_rate
1212
FROM vercel_logs
13-
WHERE event.proxy.statusCode != 0
13+
WHERE event.proxy.statusCode::Int32 != 0
1414
AND event_time >= {{DateTime(date_from, '2024-01-01 00:00:00')}}
1515
AND event_time <= {{DateTime(date_to, '2024-12-31 23:59:59')}}
1616
GROUP BY hour

tinybird/pipes/vercel_requests_by_status.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SQL >
99
count() as count,
1010
round(count() * 100.0 / sum(count()) OVER (), 2) as percentage
1111
FROM vercel_logs
12-
WHERE event.proxy.statusCode != 0
12+
WHERE event.proxy.statusCode::Int32 != 0
1313
AND event_time >= {{DateTime(date_from, '2024-01-01 00:00:00')}}
1414
AND event_time <= {{DateTime(date_to, '2024-12-31 23:59:59')}}
1515
GROUP BY status

tinybird/pipes/vercel_response_times.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ SQL >
1717
extractAll(event.message, 'Duration: ([0-9]+) ms')[1] as duration
1818
FROM vercel_logs
1919
WHERE event_type = 'stdout'
20-
AND event.message LIKE '%Duration:%'
20+
AND event.message::String LIKE '%Duration:%'
2121
AND event_time >= {{DateTime(date_from, '2024-01-01 00:00:00')}}
2222
AND event_time <= {{DateTime(date_to, '2024-12-31 23:59:59')}}
2323
)

tinybird/pipes/vercel_top_paths.pipe

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SQL >
1010
round(avg(if(event.proxy.statusCode >= 400, 1, 0)) * 100, 2) as error_rate,
1111
round(avg(if(event.proxy.vercelCache = 'HIT', 1, 0)) * 100, 2) as cache_hit_rate
1212
FROM vercel_logs
13-
WHERE event.proxy.path != ''
13+
WHERE event.proxy.path::String != ''
1414
AND event_time >= {{DateTime(date_from, '2024-01-01 00:00:00')}}
1515
AND event_time <= {{DateTime(date_to, '2024-12-31 23:59:59')}}
1616
GROUP BY path

0 commit comments

Comments
 (0)