chore: Add validation queries for default timestamp records
Added queries to identify and sample records with default timestamp (1970-01-01 00:00:00) which resulted from invalid MySQL dates during migration. These records need date recovery from the MySQL source. Queries: - Count records with default timestamp in both tables - Sample first 10 records from rawdatacor with default timestamp These will help quantify the scope of date recovery work needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -88,3 +88,23 @@ SELECT
|
|||||||
FROM elabdatadisp
|
FROM elabdatadisp
|
||||||
GROUP BY unit_name, tool_name_id, node_num, event_date, event_time
|
GROUP BY unit_name, tool_name_id, node_num, event_date, event_time
|
||||||
HAVING COUNT(*) > 1;
|
HAVING COUNT(*) > 1;
|
||||||
|
|
||||||
|
-- 10. Identify records with invalid/default timestamps (1970-01-01)
|
||||||
|
-- These need date recovery from MySQL
|
||||||
|
SELECT
|
||||||
|
'rawdatacor with default timestamp' as table_name,
|
||||||
|
COUNT(*) as record_count
|
||||||
|
FROM rawdatacor
|
||||||
|
WHERE event_timestamp = '1970-01-01 00:00:00'
|
||||||
|
UNION ALL
|
||||||
|
SELECT
|
||||||
|
'elabdatadisp with default timestamp' as table_name,
|
||||||
|
COUNT(*) as record_count
|
||||||
|
FROM elabdatadisp
|
||||||
|
WHERE event_timestamp = '1970-01-01 00:00:00';
|
||||||
|
|
||||||
|
-- Sample records with default timestamp (first 10 from rawdatacor)
|
||||||
|
SELECT id, unit_name, tool_name_id, event_timestamp, measurements
|
||||||
|
FROM rawdatacor
|
||||||
|
WHERE event_timestamp = '1970-01-01 00:00:00'
|
||||||
|
LIMIT 10;
|
||||||
|
|||||||
Reference in New Issue
Block a user