-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel23_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 REL23",
  description="Data was generated from file metadata information from the GDC legacy archive release 23, downloaded April 2020. \nMore details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-230\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.rel23_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', '9f665067-9e3d-4cf3-a5c1-71bf9aed9c6f', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '222a2e5b-9d55-4477-8a54-7776bd44f8a7', '07943d6c-20fe-4b85-9c02-3b7eab4069c1', 'TCGA-KN-8423-01A-11D-2310-10', 'aliquot', '222a2e5b-9d55-4477-8a54-7776bd44f8a7', NULL, 'Kidney Chromophobe', 'Kidney Chromophobe', 'phs000178', 'TCGA', 'TCGA-KICH', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-KN-8423-01A-11D-2310-10_IonTorrent_validation.tar.bz2', 216528, '9f665067-9e3d-4cf3-a5c1-71bf9aed9c6f', NULL, NULL, NULL, '9a32cc2fa180ebf8a6a219c1f1e33bc8', NULL, NULL, NULL, NULL, NULL, 'live', 'dc30ab49-0a88-4b10-bc73-54937515673b', NULL, 'file', '2017-03-05T09:50:44.209498-06:00'), ('legacy', 'd0dde9d2-a15c-41f1-b414-90e2519b1ee4', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '455fd7d4-5ff4-423f-83ce-4630aef89bb7', '322f0b01-2118-4dbe-aba1-3875a54ee71b', 'TCGA-KN-8428-01A-11D-2310-10', 'aliquot', '455fd7d4-5ff4-423f-83ce-4630aef89bb7', NULL, 'Kidney Chromophobe', 'Kidney Chromophobe', 'phs000178', 'TCGA', 'TCGA-KICH', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-KN-8428-01A-11D-2310-10_IonTorrent_validation.tar.bz2', 216454, 'd0dde9d2-a15c-41f1-b414-90e2519b1ee4', NULL, NULL, NULL, '16151362602e85adbe760c1b8831e2e0', '7330704c-329d-4fe9-9147-441bcdc4a849;bc1d193e-8457-4948-8762-fb31a6dbda5d;fc0f4f9f-3a70-48a8-a5cf-8f6e5651060a', '4ac69a90-a0d4-459b-9876-229de2d31a17_analysis.xml;4ac69a90-a0d4-459b-9876-229de2d31a17_experiment.xml;4ac69a90-a0d4-459b-9876-229de2d31a17_run.xml', '2516;33043;75326', NULL, NULL, 'live', '4ac69a90-a0d4-459b-9876-229de2d31a17', NULL, 'file', '2017-03-05T10:58:14.757612-06:00'), ('legacy', 'd873806a-03d7-48ef-8447-e46b2ac49f7a', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, 'dc04b82c-e1e8-4917-ba19-c2fea4a1b69a', '04adced3-96c5-4ec2-8e06-293544f0c3d7', 'TCGA-KN-8419-11A-01D-2310-10', 'aliquot', 'dc04b82c-e1e8-4917-ba19-c2fea4a1b69a', NULL, 'Kidney Chromophobe', 'Kidney Chromophobe', 'phs000178', 'TCGA', 'TCGA-KICH', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-KN-8419-11A-01D-2310-10_IonTorrent_validation.tar.bz2', 219596, 'd873806a-03d7-48ef-8447-e46b2ac49f7a', NULL, NULL, NULL, '267dd3f3e89110f3b0daa3f0a9561079', NULL, NULL, NULL, NULL, NULL, 'live', 'a952c6fc-ccc7-40d0-8518-ce4a29748784', NULL, 'file', '2017-03-05T15:46:38.221013-06:00'), ('legacy', '11b6c62e-f394-406b-8452-8161d42e6335', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '56a82a56-0241-4d3d-9de2-696b0c36df91', '1c00925b-7328-4db0-b930-04aab2d80719', 'TCGA-BW-A5NP-01A-11D-A27I-10', 'aliquot', '56a82a56-0241-4d3d-9de2-696b0c36df91', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-BW-A5NP-01A-11D-A27I-10_IonTorrent_validation.tar.bz2', 251594, '11b6c62e-f394-406b-8452-8161d42e6335', NULL, NULL, NULL, 'f1f78af7049a4714fe18a7b342e709e5', NULL, NULL, NULL, NULL, NULL, 'live', 'bbe94730-036b-4d6e-8949-4f058e7a6b47', NULL, 'file', '2017-03-05T12:40:24.187360-06:00'), ('legacy', '0a27cc28-f8f4-45a8-82b2-ae18112b47c6', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '1b326242-4be6-4f05-b5fb-07ed76b49850', '6fbe0c9d-a6ae-4737-8e50-926b0b027cdb', 'TCGA-GJ-A6C0-10A-01D-A30V-10', 'aliquot', '1b326242-4be6-4f05-b5fb-07ed76b49850', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-GJ-A6C0-10A-01D-A30V-10_IonTorrent_validation.tar.bz2', 256801, '0a27cc28-f8f4-45a8-82b2-ae18112b47c6', NULL, NULL, NULL, '033ebb2a32dc7374cd24827508520a6c', '01c4da0b-d50d-42f2-a543-d1b824e9ead7;10b807fb-c3ab-4bb7-99e3-daf20e108139;39eb1f5f-a12e-40cf-a377-75f7f4b49776', 'dff007a0-606d-4a09-beea-cdfba451d624_analysis.xml;dff007a0-606d-4a09-beea-cdfba451d624_experiment.xml;dff007a0-606d-4a09-beea-cdfba451d624_run.xml', '2516;32864;75651', NULL, NULL, 'live', 'dff007a0-606d-4a09-beea-cdfba451d624', NULL, 'file', '2017-03-05T09:53:00.539003-06:00');