-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
Description
Following #778 and the additional tightening up of the SQLAdapter in #1047, we believe we can implement Diamond's desires for a single big table by providing an alternative implementation of the SQLAdapter. We would like an adapter that stores all bluesky run data into a single long but not wide table
From Diamond's perspective, we have been thinking about the Big Table differently, which I am writing here for completeness. From the very beginnings of testing, value is a JSONB field, which (from some simple experimentation) seems to work OK
The Big Table
uid run_uid stream field_name seq_num value 42 . . . . . 43 . . . . . 44 . . . . . CREATE TABLE points(uid SERIAL PRIMARY KEY, run_id CHAR(32), axis Char(32), val JSONB); INSERT INTO points (run_id, axis, val) VALUES('qwert', 'x', '1.5'); INSERT INTO points (run_id, axis, val) VALUES('qwert', 'robot', '"foo"'); INSERT INTO points (run_id, axis, val) VALUES('qwert', 'shutter', 'true'); SELECT * FROM points WHERE val @@ '$ <3';
Originally posted by @DiamondJoseph in #778
danielballan