The fix was to remove the use of isValid and add a database name to the DB_URL so that the table is persisted across connections.
isValid
DB_URL