Skip to content
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

Update FILEUPLOAD table in synapse_raw #55

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
USE SCHEMA {{database_name}}.synapse_raw; --noqa: JJ01,PRS,TMP

ALTER TABLE FILEUPLOAD SET COMMENT = 'This table contains upload records for FileEntity (e.g. a new file creation, upload or update to an existing file) and TableEntity (e.g. an appended row set to an existing table, uploaded file to an existing table). The events are recorded only after the file or change to a table is successfully uploaded.';

COMMENT ON COLUMN FILEUPLOAD.timestamp IS 'The time when the upload event is pushed to the queue, after a successful upload of a file or change in the existing table.';
COMMENT ON COLUMN FILEUPLOAD.user_id IS 'The id of the user who requested the upload.';
COMMENT ON COLUMN FILEUPLOAD.project_id IS 'The unique identifier of the project where the uploaded entity resides. Applicable only for FileEntity and TableEntity.';
COMMENT ON COLUMN FILEUPLOAD.file_handle_id IS 'The unique identifier of the file handle.'
COMMENT ON COLUMN FILEUPLOAD.association_object_id IS 'The unique identifier of the related FileEntity or TableEntity (without the ``syn`` prefix).'
COMMENT ON COLUMN FILEUPLOAD.association_object_type IS 'The type of Synapse object that wraps the file, e.g., FileEntity, TableEntity.'
COMMENT ON COLUMN FILEUPLOAD.stack IS 'The stack (prod, dev) on which the upload request was processed.'
COMMENT ON COLUMN FILEUPLOAD.instance IS 'The version of the stack that processed the upload request.'
COMMENT ON COLUMN FILEUPLOAD.record_date IS 'The data is partitioned for fast and cost effective queries. The timestamp field is converted into a date and stored in the record_date field for partitioning. The date should be used as a condition (WHERE CLAUSE) in the queries.';