Skip to content

Commit 185b4e9

Browse files
authored
Merge pull request #331 from ooni/faulty-measurements-table
Add creation of faulty measurements table
2 parents 05f362e + e598680 commit 185b4e9

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

scripts/cluster-migration/schema.sql

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,20 @@ ORDER BY (probe_asn, probe_cc, domain)
214214
SETTINGS index_granularity = 8192;
215215

216216
ALTER TABLE event_detector_changepoints ON CLUSTER oonidata_cluster ADD COLUMN `block_type` String;
217+
218+
-- faulty measurements
219+
CREATE TABLE IF NOT EXISTS faulty_measurements ON CLUSTER oonidata_cluster
220+
(
221+
`ts` DateTime64(3, 'UTC'),
222+
`type` String,
223+
-- geoip lookup result for the probe IP
224+
`probe_cc` String,
225+
`probe_asn` UInt32,
226+
-- JSON-encoded details about the anomaly
227+
`details` String
228+
)
229+
ENGINE = ReplicatedReplacingMergeTree (
230+
'/clickhouse/{cluster}/tables/ooni/faulty_measurements/{shard}',
231+
'{replica}'
232+
)
233+
ORDER BY (ts, type, probe_cc, probe_asn);

0 commit comments

Comments
 (0)