This table holds all of the files that are accessible in NGAS, with file-specific data about them.  It is not meant to hold any data about the scientific contents of the files.

Definition:

     Column     |           Type           | Collation | Nullable |                Default

----------------+--------------------------+-----------+----------+----------------------------------------
 file_id        | integer                  |           | not null | nextval('files_file_id_seq'::regclass)
 file_path      | character varying        |           |          |
 ngas_id        | character varying        |           |          |
 filegroup      | integer                  |           | not null |
 filename       | character varying        |           | not null |
 filesize       | bigint                   |           | not null |
 format         | character varying        |           | not null |
 type           | character varying        |           | not null |
 checksum       | character varying        |           |          |
 checksum_type  | character varying        |           |          |
 ingestion_time | timestamp with time zone |           |          |
Indexes:
    "file_id" PRIMARY KEY, btree (file_id)
    "files_filegroup" btree (filegroup)
Foreign-key constraints:
    "filegroups_files_fk" FOREIGN KEY (filegroup) REFERENCES filegroups(filegroup_id) ON UPDATE CASCADE ON DELETE CASCADE
Referenced by:
    TABLE "calibration_tables" CONSTRAINT "files_calibration_tables_fk" FOREIGN KEY (file_id) REFERENCES files(file_id) ON UPDATE CASCADE ON DELETE CASCADE
    TABLE "images" CONSTRAINT "files_images_fk" FOREIGN KEY (file_id) REFERENCES files(file_id) ON UPDATE CASCADE ON DELETE CASCADE
    TABLE "subscans" CONSTRAINT "files_subscans_fk" FOREIGN KEY (file_id) REFERENCES files(file_id) ON UPDATE CASCADE ON DELETE CASCADE
    TABLE "workflow_input_files" CONSTRAINT "files_workflow_input_files_fk" FOREIGN KEY (file_id) REFERENCES files(file_id) ON UPDATE CASCADE ON DELETE SET NULL
    TABLE "image_products" CONSTRAINT "image_products_files_file_id_fk" FOREIGN KEY (product_file_id) REFERENCES files(file_id) ON UPDATE CASCADE ON DELETE CASCADE
    TABLE "image_products" CONSTRAINT "image_products_product_file_id_fkey" FOREIGN KEY (product_file_id) REFERENCES files(file_id)


Columns:

file_id: an auto-generated id to uniquely identify the file.

file_path: originally meant to state where in the file tree built at download this file should be place, but was never used for that purpose.  Currently holds the same value as ngas_id.

ngas_id: the uniquely identifying id given to the file by NGAS, and used to retrieve it.

filegroup: the id of the filegroup that the file is in.  See Filegroups Table.

filename: the string to name the file at download.

filesize: the data size of the file on disc, in bytes.

format: the data format of the file.

type: the data type of the file, eg. 'cal' for calibration tables, 'raw' for raw data.

checksum: a checksum of the file, to verify the download.  Only present for some files.

checksum_type: the checksum algorithm used, eg. MD5.

ingension_time: the date and time of when the file was ingested into the archive.

  • No labels