-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from Sage-Bionetworks/snow-71-update-fileuploa…
…d-table2 Update FILEUPLOAD table in synapse_raw
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
synapse_data_warehouse/synapse_raw/tables/V2.19.5__add_file_upload_comments.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.'; |