-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel17_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 REL17",
  description="Data was generated from file metadata information from the GDC legacy archive release 17.1, June 2019. More details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-170",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("source", "gdc"), ("reference_genome_0", "hg19"), ("status", "archived"), ("category", "metadata")]
);

INSERT INTO `isb-cgc.GDC_metadata.rel17_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', '92f90abb-8f19-4582-9ca9-077496a5099b', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, 'ab35c9f9-3040-424d-a89f-dff3a1365bc6', '1a2c1ffc-b1b7-48a0-a94a-ecd67bdfe211', 'TCGA-DD-A3A4-11A-11D-A22F-10', 'aliquot', 'ab35c9f9-3040-424d-a89f-dff3a1365bc6', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-DD-A3A4-11A-11D-A22F-10_IonTorrent_validation.tar.bz2', 243005, '92f90abb-8f19-4582-9ca9-077496a5099b', NULL, NULL, NULL, '7ace8b9f3047bf7ffa50acdcbd0eced9', '53f7005f-ca4c-4dc1-abc0-5b203efe059e;650f570a-763c-4a2f-ab8e-b875ee287712;b0a6cf21-0ac4-46d5-aff7-400fb3101dec', 'db161f92-2c57-4e67-add8-da9803e5934e_analysis.xml;db161f92-2c57-4e67-add8-da9803e5934e_experiment.xml;db161f92-2c57-4e67-add8-da9803e5934e_run.xml', '2516;32667;74856', NULL, NULL, 'live', 'db161f92-2c57-4e67-add8-da9803e5934e', NULL, 'file', '2017-03-05T18:47:49.005683-06:00'), ('legacy', '7a6cde07-0e8c-491e-b308-a21f4090a3c7', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '68015cc7-d3a1-4c90-b8fb-5d14143d9960', '90611290-e44c-438e-91aa-f3b83dae3b71', 'TCGA-DD-A1EB-01A-11D-A12Z-10', 'aliquot', '68015cc7-d3a1-4c90-b8fb-5d14143d9960', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-DD-A1EB-01A-11D-A12Z-10_IonTorrent_validation.tar.bz2', 499347, '7a6cde07-0e8c-491e-b308-a21f4090a3c7', NULL, NULL, NULL, '6463aec273d12374ff066f3d8cbf548b', '04f2395e-b508-4e2a-910b-e4c298d53460;914180d0-b0a2-448b-ab3b-dd9b262a5287;d7fca106-b5b8-4fd0-8c74-5f1d44b17581', '89a06ab3-254a-47d8-9e0d-aea393e0c36b_analysis.xml;89a06ab3-254a-47d8-9e0d-aea393e0c36b_experiment.xml;89a06ab3-254a-47d8-9e0d-aea393e0c36b_run.xml', '4771;51859;152682', NULL, NULL, 'live', '89a06ab3-254a-47d8-9e0d-aea393e0c36b', NULL, 'file', '2017-03-05T11:18:26.999142-06:00'), ('legacy', '023f1b05-eb81-4aa5-a653-9c0a6fc35c64', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '1b1b1af0-b19b-4086-b1b7-669fa0b88235', '10979b91-1258-4439-954b-14d3e99d3b0f', 'TCGA-DD-A11B-10A-01D-A12Z-10', 'aliquot', '1b1b1af0-b19b-4086-b1b7-669fa0b88235', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-DD-A11B-10A-01D-A12Z-10_IonTorrent_validation.tar.bz2', 268369, '023f1b05-eb81-4aa5-a653-9c0a6fc35c64', NULL, NULL, NULL, '9d542e1e21cbb3107cbcdde39a7f8866', '0fad20b7-2461-4637-9bd8-0b0f67185946;b3854a80-6d52-4509-8871-2875240802fa;cd8688c1-0f3c-4629-9b97-87b0093a4023', '92f9c1ac-d3cf-4cad-a474-a3de3f28df0d_analysis.xml;92f9c1ac-d3cf-4cad-a474-a3de3f28df0d_experiment.xml;92f9c1ac-d3cf-4cad-a474-a3de3f28df0d_run.xml', '2516;33043;75232', NULL, NULL, 'live', '92f9c1ac-d3cf-4cad-a474-a3de3f28df0d', NULL, 'file', '2017-03-05T11:22:29.164094-06:00'), ('legacy', '60e66e5d-2279-46d3-b03b-a337d5284f5d', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '7e589ee1-ffcc-448a-a275-829ca26a597e', '0e3769b2-9456-4937-bd2b-27960a8ab40c', 'TCGA-CC-A5UC-10A-01D-A28X-10', 'aliquot', '7e589ee1-ffcc-448a-a275-829ca26a597e', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-CC-A5UC-10A-01D-A28X-10_IonTorrent_validation.tar.bz2', 272740, '60e66e5d-2279-46d3-b03b-a337d5284f5d', NULL, NULL, NULL, '17fa1f9a3856a60770f05c24a8f83eaa', NULL, NULL, NULL, NULL, NULL, 'live', 'c042cd9b-0dd0-44d0-828f-8ca2821e9c3b', NULL, 'file', '2017-03-04T20:45:58.658405-06:00'), ('legacy', '5267477a-f60b-4c25-9293-8372d3868bbf', 'controlled', 'phs000178', NULL, NULL, NULL, NULL, '4fd3ed02-7b66-47bf-8b92-31fee1093a87', 'c34592de-1c9f-4df8-8565-e1ed94a51992', 'TCGA-K7-A5RG-10A-01D-A28X-10', 'aliquot', '4fd3ed02-7b66-47bf-8b92-31fee1093a87', NULL, 'Liver Hepatocellular Carcinoma', 'Liver Hepatocellular Carcinoma', 'phs000178', 'TCGA', 'TCGA-LIHC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-K7-A5RG-10A-01D-A28X-10_IonTorrent_validation.tar.bz2', 272648, '5267477a-f60b-4c25-9293-8372d3868bbf', NULL, NULL, NULL, 'f96d2f854a0f46e346f6a330c75d6fab', '62c02919-f420-406e-969f-cb766294e15c;b5a7c090-32ce-4d14-a257-278419037f30;c0880576-c8b8-408d-a64e-500a40e85587', 'a17c7d82-66b9-4ebe-8f37-879b8382691b_analysis.xml;a17c7d82-66b9-4ebe-8f37-879b8382691b_experiment.xml;a17c7d82-66b9-4ebe-8f37-879b8382691b_run.xml', '2516;33244;76031', NULL, NULL, 'live', 'a17c7d82-66b9-4ebe-8f37-879b8382691b', NULL, 'file', '2017-03-05T10:38:33.898633-06:00');