Re:Literate SQL
by mshenfield on Sunday June 25, 2017 @07:21PM
(#14632801)
It took me a second, but I can see why this would be handy. Whether you just use it in a with, or create a view from it, you have a single definition of the query that anyone can use. And you can test the INCLUDEd query. Neat.
Re:Literate SQL
by mistermann on Sunday June 25, 2017 @12:04PM
(#14630648)
It warms my heart to see people in the wild doing smart things like this (after getting laughed at by moron managers who wouldn't authorize any good ideas like this for years).
With all that together, I can trust analysts to update complex data assets and I can ask them to take any data issue investigation they've done and turn it into a re-usable test. Tests end up looking like:
It has made a huge difference in how we write SQL.