Urgent.News

What's breaking now, across thousands of outlets.

Tech

377 SQL checks on 4.6 million generated rows: what they caught

In part 1 I showed the method: write every rule about your data as a sentence, then one SQL query that counts the rows breaking it. The rule holds when the query returns 0. I promised to run it at scale. So I did: 377 checks across 13 generated databases, 4,594,497 rows in total. Today every one of those queries returns 0. Getting there took several fixes, and this post covers the ones I'd never…

In this story, the author demonstrates how to write rules for data as sentences, then create SQL queries that count the number of rows breaking those rules. The author ran 377 checks across 13 generated databases, covering a total of 4,594,497 rows. After several fixes, all 377 queries returned 0, indicating the data was consistent. The author shares three key lessons learned from this process:

1. Per-row rules can't see issues like a large share of rows clustering around a specific date. Adding shape checks can help identify such problems.

2. Checking for a minimum number of rows per table can catch cases where generated data appears unrealistic, even if individual rows are valid.

3. Writing down rules explicitly, such as naming a column correctly, helps ensure the checks catch intended issues.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Why Does 0.1 + 0.2 Not Equal 0.3 in Python?

Open Python and type this: print ( 0.1 + 0.2 ) You'd expect 0.3 . Python gives you this: 0.30000000000000004 And it gets stranger: print ( 0.1 + 0.2 == 0.3 ) False If you're learning to code, this is…

  • Python displays 0.30000000000000004 instead of 0.3 when adding 0.1 and 0.2
  • Computers use binary system, unable to precisely represent decimal numbers like 0.1
  • Strategies to handle floating-point issues: rounding, tolerance comparison, using Decimal module

Online multiplayer with no game server: WebRTC invite links and a browser as referee

PlayTrova is a free games site I run as a fully static Next.js site, with no backend at all. I still wanted the board games to have the one feature families actually ask for: send a link, play…

  • PlayTrova offers turn-based board games without backend or accounts
  • WebRTC invite links enable online multiplayer gaming
  • Deterministic games use seed and short move strings for networking

More from Thursday 5 November →