Skip to content

Commit 97d233e

Browse files
committed
feat: rename some column names for consistency with the rest of the code
Signed-off-by: Raúl Santos <4837+borfast@users.noreply.github.com>
1 parent 4e5ad20 commit 97d233e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
SCHEMA >
22
`id` UInt64 `json:$.record.id`,
3-
`projectId` UUID `json:$.record.project_id`,
4-
`keyword` String `json:$.record.keyword`,
3+
`insightsProjectId` UUID `json:$.record.insights_project_id`,
4+
`slug` String `json:$.record.slug`,
55
`dataTimestamp` DateTime64(3) `json:$.record.data_timestamp`,
66
`volume` UInt64 `json:$.record.volume`,
77
`updatedAt` DateTime64(3) `json:$.record.updated_at`
88

99
ENGINE ReplacingMergeTree
1010
ENGINE_PARTITION_KEY toYear(dataTimestamp)
11-
ENGINE_SORTING_KEY projectId
11+
ENGINE_SORTING_KEY dataTimestamp
1212
ENGINE_VER updatedAt

services/libs/tinybird/pipes/search_volume.pipe

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ DESCRIPTION >
44
NODE searchVolume_pipe
55
SQL >
66
%
7-
SELECT projectId, keyword, dataTimestamp, volume, updatedAt
8-
FROM searchVolume
7+
SELECT insightsProjectId, slug, dataTimestamp, volume, updatedAt
8+
FROM searchVolume FINAL
99
WHERE
1010
1 = 1
1111
{% if defined(startDate) %}
@@ -28,5 +28,5 @@ SQL >
2828
)
2929
}}
3030
{% end %}
31-
{% if defined(projectId) %} AND searchVolume.projectId = {{ projectId }} {% end %}
32-
{% if defined(keyword) %} AND searchVolume.projectId = {{ keyword }} {% end %}
31+
{% if defined(insightsProjectId) %} AND searchVolume.insightsProjectId = {{ insightsProjectId }} {% end %}
32+
{% if defined(slug) %} AND searchVolume.slug = {{ slug }} {% end %}

0 commit comments

Comments
 (0)