-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel24_fileData_legacy`
(
  dbName STRING OPTIONS(description="Referring to the default/main database at the GDC. In this table, this field is always legacy."),
  file_gdc_id STRING OPTIONS(description="Unique GDC identifier for this file (corresponds to the file_barcode)  --  this can be used to access more information from the GDC data portal like this: https://portal.gdc.cancer.gov/files/c21b332c-06c6-4403-9032-f91c8f407ba5"),
  `access` STRING OPTIONS(description="Data accessibility policy (open or controlled)"),
  acl STRING OPTIONS(description="Access Control List -- if access is controlled, this field contains the dbGaP accession, eg phs000179"),
  archive_gdc_id STRING OPTIONS(description="GDC archive UUID"),
  archive_revision INT64 OPTIONS(description="Archive revision number"),
  archive_state STRING OPTIONS(description="Archive state"),
  archive_submitter_id STRING OPTIONS(description="Original archive sumbitter name, eg  nationwidechildrens.org_BRCA.bio.Level_1.56"),
  associated_entities__case_gdc_id STRING OPTIONS(description="GDC case uuid for associated case(s)"),
  associated_entities__entity_gdc_id STRING OPTIONS(description="GDC entity uuid for associated entity(ies)"),
  associated_entities__entity_submitter_id STRING OPTIONS(description="Submitter id for associated entity(ies)"),
  associated_entities__entity_type STRING OPTIONS(description="Associated entity type, eg   aliquot   or   case  "),
  case_gdc_id STRING OPTIONS(description="GDC unique identifier"),
  project_dbgap_accession_number STRING OPTIONS(description="Program dbGaP accession number, eg phs000189"),
  project_disease_type STRING OPTIONS(description="The type of disease studied by the project; e.g. Sarcoma,  Breast Invasive Carcinoma,Acute Lymphoblastic Leukemia, etc"),
  project_name STRING OPTIONS(description="Project Name; frequently the same as or similar to the project disease type eg   Acute Lymphoblastic Leukemia - Phase II   or   Breast Invasive Carcinoma   etc"),
  program_dbgap_accession_number STRING OPTIONS(description="Program dbGaP accession number, eg phs000178"),
  program_name STRING OPTIONS(description="Program name, eg TCGA or TARGET"),
  project_short_name STRING OPTIONS(description="Project name abbreviation; the program name appended with a project name abbreviation; eg. TCGA-OV, etc."),
  center_type STRING OPTIONS(description="One of CGC, GSC, BCR, COM (or null)"),
  center_code STRING OPTIONS(description="TCGA codes for the Professional Organization or Group (Center) which has submitted the data, more info: https://gdc.cancer.gov/resources-TCGA-users/TCGA-code-tables/center-codes"),
  center_name STRING OPTIONS(description="Center name, eg BCM, BI, WUGSC "),
  center_short_name STRING OPTIONS(description="Center abbreviation, eg WUSM"),
  created_datetime STRING OPTIONS(description="Timestamp of creation, eg 2016-10-27T21:58:12.297090-05:11"),
  data_category STRING OPTIONS(description="Category description of the underlying data, eg Clinical, Raw Sequencing Data, Simple Nucleotide Variation, Transcriptome Profiling  , etc"),
  data_format STRING OPTIONS(description="File format of the underlying data, eg BCR XML, BAM"),
  data_type STRING OPTIONS(description="Experimental source of the data type, eg Tissue slide image, RNA-Seq"),
  experimental_strategy STRING OPTIONS(description="Experimental strategy used to generate data (where applicable) e.g. WXS, RNA-Seq"),
  file_name STRING OPTIONS(description="Name of file at the GDC"),
  file_size INT64 OPTIONS(description="The size of the file measured in bytes"),
  file_id STRING OPTIONS(description="GDC file identifier. This is a duplicate of file_gdc_id field found in some tables. "),
  index_file_gdc_id STRING OPTIONS(description="Where available, GDC file uuid for index file "),
  index_file_name STRING OPTIONS(description="Where available, GDC file name for index file "),
  index_file_size INT64 OPTIONS(description="Where available, size of the index file in bytes "),
  md5sum STRING OPTIONS(description="Md5sum for GDC data file"),
  metadata_file_id STRING OPTIONS(description="GDC file UUID for metadata (eg mage-tab) file"),
  metadata_file_name STRING OPTIONS(description="Name of GDC metadata file"),
  metadata_file_size STRING OPTIONS(description="Size of metadata file"),
  metadata_file_type STRING OPTIONS(description="Type of metadata file, eg mage-tab"),
  platform STRING OPTIONS(description="Platform used to generate this data, eg  Illumina  , or  Affymetrix SNP 6.11"),
  file_state STRING OPTIONS(description="File state -- either live or submitted"),
  file_submitter_id STRING OPTIONS(description="Original submitter file ID (eg CGHub analysis_id)"),
  file_tags STRING OPTIONS(description="Semicolon-delimited list of file tags, eg  coverage  , or  hg19;nocnv  , etc"),
  file_type STRING OPTIONS(description="File Type  -- eg aligned_reads, simple_somatic_mutation, gene_expression, etc"),
  updated_datetime STRING OPTIONS(description="Timestamp of latest update, eg 2017-03-04T16:37:26.081298-06:00")
)
OPTIONS(
  friendly_name="FILE DATA LEGACY REL24",
  description="Data was generated from file metadata information from the GDC legacy archive release 24, downloaded May, 2020. \nMore details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-240\nThis table has been deprecated, please see isb-cgc-bq.GDC_case_file_metadata.fileData_legacy_current for the most current table.",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("source", "gdc"), ("status", "deprecated"), ("category", "metadata")]
);

INSERT INTO `isb-cgc.GDC_metadata.rel24_fileData_legacy` (dbName, file_gdc_id, access, acl, archive_gdc_id, archive_revision, archive_state, archive_submitter_id, associated_entities__case_gdc_id, associated_entities__entity_gdc_id, associated_entities__entity_submitter_id, associated_entities__entity_type, case_gdc_id, project_dbgap_accession_number, project_disease_type, project_name, program_dbgap_accession_number, program_name, project_short_name, center_type, center_code, center_name, center_short_name, created_datetime, data_category, data_format, data_type, experimental_strategy, file_name, file_size, file_id, index_file_gdc_id, index_file_name, index_file_size, md5sum, metadata_file_id, metadata_file_name, metadata_file_size, metadata_file_type, platform, file_state, file_submitter_id, file_tags, file_type, updated_datetime) VALUES ('legacy', '5213a6c4-54d6-4b6d-8d07-d1f3a683cffe', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '1043bc90-72c9-48c9-ae24-f617d0485e78', '22ec33a5-0591-489b-acaa-9a7dae5f9f59', 'TCGA-DD-A4NF-01A-11D-A27I-10', 'aliquot', '1043bc90-72c9-48c9-ae24-f617d0485e78', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-DD-A4NF-01A-11D-A27I-10_IonTorrent_validation.tar.bz2', 275318, '5213a6c4-54d6-4b6d-8d07-d1f3a683cffe', NULL, NULL, NULL, '662cd190d123f50b3727ccca0e270542', '179481db-1cd5-46f5-9525-1b2108ebfba5;4a5acf87-503a-4b1b-8c17-1cc84d1ac6f4;fc8221b0-7f41-47e9-b836-1bfe7ad9cab6', 'b1c7676d-5803-4458-b98b-c7cb05eade28_analysis.xml;b1c7676d-5803-4458-b98b-c7cb05eade28_experiment.xml;b1c7676d-5803-4458-b98b-c7cb05eade28_run.xml', '2516;33445;76830', NULL, NULL, 'live', 'b1c7676d-5803-4458-b98b-c7cb05eade28', NULL, 'file', '2017-03-05T00:20:14.696060-06:00'), ('legacy', '473b6e5d-9582-4eb2-87e9-0966e2ec9929', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, 'c6a74db2-cf97-4c7b-be8c-557ee27e1d43', '00fb960e-81b6-45ea-bf27-b39c7dcdce6a', 'TCGA-RC-A6M3-01A-11D-A32G-10', 'aliquot', 'c6a74db2-cf97-4c7b-be8c-557ee27e1d43', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-RC-A6M3-01A-11D-A32G-10_IonTorrent_validation.tar.bz2', 269456, '473b6e5d-9582-4eb2-87e9-0966e2ec9929', NULL, NULL, NULL, 'b5cb8a8ccf9e328cc840f7e38d2591d0', '0f167854-6415-4c92-b6a4-60760ffd2bb9;d8a24ffd-8e16-4509-8d8d-b269ddc44245;e7b76660-6e1d-4821-bd89-4b32eb2cd236', 'f78d908a-3086-428f-9bff-5511fa9fc197_analysis.xml;f78d908a-3086-428f-9bff-5511fa9fc197_experiment.xml;f78d908a-3086-428f-9bff-5511fa9fc197_run.xml', '2516;33445;76830', NULL, NULL, 'live', 'f78d908a-3086-428f-9bff-5511fa9fc197', NULL, 'file', '2017-03-05T10:40:31.049555-06:00'), ('legacy', '337de68e-ae8e-4785-a4ea-489e433dd7ca', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, 'b4a0bf74-1381-4c17-b97d-206810d9e59a', '34739bd6-b3be-441d-8cdb-e4233bf14080', 'TCGA-KL-8343-01A-11D-2310-10', 'aliquot', 'b4a0bf74-1381-4c17-b97d-206810d9e59a', NULL, 'Kidney Chromophobe', 'Kidney Chromophobe', 'phs000178', 'TCGA', 'TCGA-KICH', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-KL-8343-01A-11D-2310-10_IonTorrent_validation.tar.bz2', 219533, '337de68e-ae8e-4785-a4ea-489e433dd7ca', NULL, NULL, NULL, 'b4693cfd4f76c287e4dc66d279aa28b4', NULL, NULL, NULL, NULL, NULL, 'live', 'cc33b23e-8512-48ff-b13b-ad42d6e3665b', NULL, 'file', '2017-03-05T12:52:49.387701-06:00'), ('legacy', '9b5b9e8b-dc09-4a63-8340-ec435bf5dace', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '81eddcda-0069-4652-9dc6-8aac89cba1ff', '1ba1022c-bdf7-464b-a527-f69dd5bac5be', 'TCGA-K7-A6G5-01A-11D-A30V-10', 'aliquot', '81eddcda-0069-4652-9dc6-8aac89cba1ff', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-K7-A6G5-01A-11D-A30V-10_IonTorrent_validation.tar.bz2', 251119, '9b5b9e8b-dc09-4a63-8340-ec435bf5dace', NULL, NULL, NULL, 'faf08864d271aa8a1ea7d96783621598', '1a6aa4ab-2b8e-4560-9457-ad39b9420ace;23feb1d8-0926-4b55-a2d0-f7a3434bb402;83c51f03-138a-4d59-a0ae-701bd49e6759', 'ae5da950-1d57-4be0-96f5-4244ee743b07_analysis.xml;ae5da950-1d57-4be0-96f5-4244ee743b07_experiment.xml;ae5da950-1d57-4be0-96f5-4244ee743b07_run.xml', '2516;32864;75651', NULL, NULL, 'live', 'ae5da950-1d57-4be0-96f5-4244ee743b07', NULL, 'file', '2017-03-05T10:58:14.757612-06:00'), ('legacy', 'a37a999d-3d36-44bf-87b8-fc118e0714cd', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '0ef95351-0133-4f34-a59c-90934fb161f8', 'ef36ae28-ea74-4d7d-9fe3-df3b7ee12a58', 'TCGA-DD-A11D-01A-11D-A12Z-10', 'aliquot', '0ef95351-0133-4f34-a59c-90934fb161f8', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-DD-A11D-01A-11D-A12Z-10_IonTorrent_validation.tar.bz2', 496795, 'a37a999d-3d36-44bf-87b8-fc118e0714cd', NULL, NULL, NULL, '69bed4ff865ba216f6d470a0ac6fd6b1', NULL, NULL, NULL, NULL, NULL, 'live', '15ce0c14-5714-4bdb-b062-2e7a324ce395', NULL, 'file', '2017-03-05T11:41:19.414807-06:00');