Menu

#6 Substituting parameters in check files

open
nobody
None
5
2012-09-23
2012-09-23
ape
No

Something that would be incredibly useful would the the ability to pass parameters to DB Sanity which it would then substitute into the check files.

For example, say I'm doing a daily load into a database and want to check if today's load passed the DB Sanity suite. I could do something like:

./dbsanity ... myproject -D date=2012-09-23

In the tests XML I could write

...
<sql>SELECT foo FROM bar WHERE something_not_sane AND load_date=${date}</sql>
...

There may be other places it would be useful too:

<values expression="rank" list="1, 2, 3, ${another.valid.value}" />

Or:

<numberSize expression="delivery_time" min="1" max="${current.max}" />

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.