diff --git a/.tinyenv b/.tinyenv index bcb7623..eeddaab 100644 --- a/.tinyenv +++ b/.tinyenv @@ -1 +1 @@ -VERSION=0.0.0 +VERSION=0.0.2 diff --git a/datasources/demo_analytics_events.datasource b/datasources/demo_analytics_events.datasource index 9002f59..d298fab 100644 --- a/datasources/demo_analytics_events.datasource +++ b/datasources/demo_analytics_events.datasource @@ -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`, diff --git a/deploy/cd-deploy.sh b/deploy/cd-deploy.sh new file mode 100644 index 0000000..5ad39e7 --- /dev/null +++ b/deploy/cd-deploy.sh @@ -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 \ No newline at end of file diff --git a/pipes/tmp_move_changed_data.pipe b/pipes/tmp_move_changed_data.pipe new file mode 100644 index 0000000..4826c52 --- /dev/null +++ b/pipes/tmp_move_changed_data.pipe @@ -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 \ No newline at end of file diff --git a/pipes/tmp_move_unchanged_data.pipe b/pipes/tmp_move_unchanged_data.pipe new file mode 100644 index 0000000..11e13f6 --- /dev/null +++ b/pipes/tmp_move_unchanged_data.pipe @@ -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 \ No newline at end of file