Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test moving data #2

Merged
merged 6 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tinyenv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=0.0.0
VERSION=0.0.2
2 changes: 1 addition & 1 deletion datasources/demo_analytics_events.datasource
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DESCRIPTION >
Sample user navigation events based on our starter kit
Sample user navigation events based on our starter kit VERSION=0.0.1

SCHEMA >
`timestamp` DateTime `json:$.timestamp`,
Expand Down
6 changes: 6 additions & 0 deletions deploy/cd-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
source .tinyenv

tb --semver ${VERSION} deploy --v3
tb --semver ${VERSION} pipe populate tmp_move_unchanged_data
tb --semver ${VERSION} pipe populate tmp_move_changed_data
13 changes: 13 additions & 0 deletions pipes/tmp_move_changed_data.pipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
NODE events_old_to_new_changed
SQL >
select
timestamp,
session_id,
action,
toLowCardinality('100') version,
payload
from live.demo_analytics_events
where session_id = 'f0713d85-e780-4ab4-9974-057914b758ff'

TYPE MATERIALIZED
DATASOURCE demo_analytics_events
7 changes: 7 additions & 0 deletions pipes/tmp_move_unchanged_data.pipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NODE events_old_to_new_unchanged
SQL >
select * from live.demo_analytics_events
where session_id != 'f0713d85-e780-4ab4-9974-057914b758ff'

TYPE MATERIALIZED
DATASOURCE demo_analytics_events