Skip to content

Commit 8795210

Browse files
authored
Merge pull request #48 from tinybirdco/fix-logs-daily-dimensions-mv
Fix logs_daily_dimensions_mv extra columns
2 parents 8acaa0e + 08c2068 commit 8795210

File tree

6 files changed

+18
-16
lines changed

6 files changed

+18
-16
lines changed

.github/workflows/tinybird-cd.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v3
1818
- name: Install Tinybird CLI
19-
run: curl -LsSf https://api.tinybird.co/static/install.sh | sh
20-
- name: Authenticate
21-
run: tb auth --host https://api.europe-west2.gcp.tinybird.co --token ${{ secrets.TB_ADMIN_TOKEN }}
19+
run: curl https://tinybird.co | sh
2220
- name: Deploy project
23-
run: tb --cloud deploy
21+
run: tb --cloud --host https://api.europe-west2.gcp.tinybird.co --token ${{ secrets.TB_ADMIN_TOKEN }} deploy

.github/workflows/tinybird-ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v3
2626
- name: Install Tinybird CLI
27-
run: curl -LsSf https://api.tinybird.co/static/install.sh | sh
27+
run: curl https://tinybird.co | sh
2828
- name: Build project
2929
run: tb build
3030
- name: Test project
31-
run: tb test run
31+
run: tb test run
32+
- name: Deploy check
33+
run: tb --cloud --host https://api.europe-west2.gcp.tinybird.co --token ${{ secrets.TB_ADMIN_TOKEN }} deploy --check

tinybird/datasources/logs_daily_dimensions.datasource

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ SCHEMA >
1616
ENGINE "AggregatingMergeTree"
1717
ENGINE_PARTITION_KEY "toYYYYMM(date)"
1818
ENGINE_SORTING_KEY "date, environment, service, level, request_method, status_code, host, request_path, user_agent"
19-
ENGINE_PRIMARY_KEY "date, environment, service, level"
19+
ENGINE_PRIMARY_KEY "date, environment, service, level"
20+
21+
FORWARD_QUERY >
22+
SELECT *

tinybird/datasources/logs_daily_timeseries.datasource

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ SCHEMA >
1818
ENGINE "AggregatingMergeTree"
1919
ENGINE_PARTITION_KEY "toYYYYMM(date)"
2020
ENGINE_SORTING_KEY "date, environment, service, level, request_method, status_code, request_path, user_agent"
21-
ENGINE_PRIMARY_KEY "date, environment, service, level"
21+
ENGINE_PRIMARY_KEY "date, environment, service, level"
22+
23+
FORWARD_QUERY >
24+
SELECT *

tinybird/datasources/logs_range_15m.datasource

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ ENGINE "AggregatingMergeTree"
1010
ENGINE_PARTITION_KEY "toYYYYMM(start_ts)"
1111
ENGINE_SORTING_KEY "start_ts, end_ts, environment, service, level"
1212
ENGINE_PRIMARY_KEY "start_ts, end_ts, environment"
13+
14+
FORWARD_QUERY >
15+
SELECT *

tinybird/materializations/logs_daily_dimensions_mv.pipe

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,7 @@ SQL >
1313
request_path,
1414
user_agent,
1515
host,
16-
countState() as count,
17-
avgState(response_time) as avg_response_time,
18-
sumState(response_time) as sum_response_time,
19-
minState(response_time) as min_response_time,
20-
maxState(response_time) as max_response_time,
21-
quantileState(0.5)(response_time) as median_response_time,
22-
quantileState(0.9)(response_time) as p90_response_time,
23-
quantileState(0.99)(response_time) as p99_response_time
16+
countState() as count
2417
FROM logs
2518
GROUP BY
2619
date,

0 commit comments

Comments
 (0)