ccao-data / data-architecture

Codebase for CCAO data infrastructure construction and management
https://ccao-data.github.io/data-architecture/
5 stars 3 forks source link

Add new test to make sure tieback PINs don't contain hyphens #357

Closed jeancochrane closed 2 months ago

jeancochrane commented 3 months ago

The 14-digit PINs contained in the iasworld.pardat.tieback column should not contain any hyphens. Let's add a test to that column to make sure this is the case.

There are two ways we could define this test:

  1. Test to make sure the tieback column is 14 digits long using the column_length generic test
  2. Test to make sure the tieback column does not contain any hyphens using the expression_is_true generic test with an expression of "not like '%-%'"

I tested both options via quick and dirty queries in Athena and they return the same number of rows, so I think either approach is fine.