-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add auxiliary etl query table #993
Conversation
…that are run as part of the regular ETL process (#988).
@@ -78,6 +78,18 @@ CREATE TABLE etl.etl_records ( | |||
PRIMARY KEY (id) | |||
); | |||
|
|||
CREATE TABLE etl.post_etl_queries ( | |||
cdr_date DATE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we record the date of the check as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made it a TIMESTAMPTZ
rather than a DATE
column because there is no harm in having the more precise info about when the check was run.
Codecov Report
@@ Coverage Diff @@
## master #993 +/- ##
==========================================
- Coverage 100% 93.36% -6.64%
==========================================
Files 1 137 +136
Lines 92 6892 +6800
Branches 7 699 +692
==========================================
+ Hits 92 6435 +6343
- Misses 0 332 +332
- Partials 0 125 +125
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #993 +/- ##
==========================================
- Coverage 100% 93.36% -6.64%
==========================================
Files 1 137 +136
Lines 92 6892 +6800
Branches 7 699 +692
==========================================
+ Hits 92 6435 +6343
- Misses 0 332 +332
- Partials 0 125 +125
Continue to review full report at Codecov.
|
Closes #988
I have:
Description
This PR adds a table
etl.post_etl_queries
to record the outcome of queries run as part of the regular ETL process. I'm happy to tweak the name and structure of the table if we think something else is more appropriate, suggestions are welcome.For the time being I have kept the data types for all columns (except
cdr_date
) asTEXT
. Going forward one could imagine using enums forcdr_type
and in particular fortype_of_query_or_check
(so that we enforce consistency in this column, which would help with querying the table). In the future we may also be more specific with the data type of theoutcome
column (e.g. use int/float/boolean/text depending on the actual query it records) but until the details become clearer and we split this auxiliary table into separate ones (probably as part of #640) this seemed to be the most generically useful approach.