Skip to content

Commit fa93046

Browse files
committed
Add comments to certifiedquiz_latest table and columns
1 parent 104a96f commit fa93046

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
USE SCHEMA {{database_name}}.synapse; --noqa: JJ01,PRS,TMP
2+
3+
COMMENT ON TABLE CERTIFIEDQUIZ_LATEST IS 'This table contain snapshots of submissions of user verification data by ACT. Snapshots are taken when a submission is created or updated. Note: Snapshots are also taken periodically and independently of the changes. The snapshot_timestamp records when the snapshot was taken.';
4+
COMMENT ON COLUMN CERTIFIEDQUIZ_LATEST.change_type IS 'The change type is always as CREATE since each instance of a user submitting a quiz results in a new submission of the quiz.';
5+
COMMENT ON COLUMN CERTIFIEDQUIZ_LATEST.change_timestamp IS 'The time when the user submitted the quiz.';
6+
COMMENT ON COLUMN CERTIFIEDQUIZ_LATEST.snapshot_timestamp IS 'The time when the snapshot was taken (It is usually after the change happened).';
7+
COMMENT ON COLUMN CERTIFIEDQUIZ_LATEST.response_id IS 'The unique identifier of a response wherein a user submitted a set of answers while participating in the quiz.';
8+
COMMENT ON COLUMN CERTIFIEDQUIZ_LATEST.user_id IS 'The unique identifier of the user who submitted the quiz.';
9+
COMMENT ON COLUMN CERTIFIEDQUIZ_LATEST.passed IS 'If true, the user passed the quiz.';
10+
COMMENT ON COLUMN CERTIFIEDQUIZ_LATEST.passed_on IS 'The date on which the user submit the quiz, regardless of whether user passed or failed the test.';
11+
COMMENT ON COLUMN CERTIFIEDQUIZ_LATEST.stack IS 'The stack (prod, dev) on which the quiz record was processed.';
12+
COMMENT ON COLUMN CERTIFIEDQUIZ_LATEST.instance IS 'The version of the stack that processed the quiz record.';
13+
COMMENT ON COLUMN CERTIFIEDQUIZ_LATEST.revoked IS 'If true, the record was revoked by an ACT member.';
14+
COMMENT ON COLUMN CERTIFIEDQUIZ_LATEST.revoked_on IS 'The date/time when the record was revoked, can be null if the record was never revoked.';
15+
COMMENT ON COLUMN CERTIFIEDQUIZ_LATEST.certified IS 'If true the user is certified through this record, can be true iif passed is true and revoked is false.';
16+
COMMENT ON COLUMN CERTIFIEDQUIZ_LATEST.snapshot_date IS 'The data is partitioned for fast and cost effective queries. The snapshot_timestamp field is converted into a date and stored in the snapshot_date field for partitioning. The date should be used as a condition (WHERE CLAUSE) in the queries.';
17+

0 commit comments

Comments
 (0)