Skip to content

Commit 39a1bab

Browse files
authored
Merge pull request #55 from Sage-Bionetworks/snow-71-update-fileupload-table2
Update FILEUPLOAD table in synapse_raw
2 parents b43d046 + 9df014b commit 39a1bab

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
USE SCHEMA {{database_name}}.synapse_raw; --noqa: JJ01,PRS,TMP
2+
3+
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.';
4+
5+
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.';
6+
COMMENT ON COLUMN FILEUPLOAD.user_id IS 'The id of the user who requested the upload.';
7+
COMMENT ON COLUMN FILEUPLOAD.project_id IS 'The unique identifier of the project where the uploaded entity resides. Applicable only for FileEntity and TableEntity.';
8+
COMMENT ON COLUMN FILEUPLOAD.file_handle_id IS 'The unique identifier of the file handle.'
9+
COMMENT ON COLUMN FILEUPLOAD.association_object_id IS 'The unique identifier of the related FileEntity or TableEntity (without the ``syn`` prefix).'
10+
COMMENT ON COLUMN FILEUPLOAD.association_object_type IS 'The type of Synapse object that wraps the file, e.g., FileEntity, TableEntity.'
11+
COMMENT ON COLUMN FILEUPLOAD.stack IS 'The stack (prod, dev) on which the upload request was processed.'
12+
COMMENT ON COLUMN FILEUPLOAD.instance IS 'The version of the stack that processed the upload request.'
13+
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.';

0 commit comments

Comments
 (0)