-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel22_fileData_active`
(
  dbName STRING OPTIONS(description="Referring to the default/main database at the GDC. In this table, this field is always current."),
  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-f91c8f407ba4"),
  `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"),
  analysis_input_file_gdc_ids STRING OPTIONS(description="GDC file UUIDs for input file(s)"),
  analysis_workflow_link STRING OPTIONS(description="Link to GDC workflow on github"),
  analysis_workflow_type STRING OPTIONS(description="Workflow name eg  STAR 2-Pass  "),
  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 submitter 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 phs000188"),
  project_disease_type STRING OPTIONS(description="The type of disease studied by the project; eg. 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."),
  created_datetime STRING OPTIONS(description="Timestamp of creation, eg 2016-10-27T21:58:12.297090-05:10"),
  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"),
  downstream_analyses__output_file_gdc_ids STRING OPTIONS(description="Semicolon-separated list of GDC file UUIDs"),
  downstream_analyses__workflow_link STRING OPTIONS(description="Name of GDC workflow, eg VarScan2 Annotation (if applicable, NULL where no information is available)"),
  downstream_analyses__workflow_type STRING OPTIONS(description="Name of GDC workflow, eg VarScan2 Annotation (if applicable, NULL where no information is available)"),
  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"),
  platform STRING OPTIONS(description="Platform used to generate this data, eg  Illumina  , or  Affymetrix SNP 6.10"),
  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_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 ACTIVE REL22",
  description="Data was generated from file metadata information from the GDC active archive release 22, downloaded Jan 22, 2020. \nMore details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-220\nThis table has been deprecated, please see isb-cgc-bq.GDC_case_file_metadata.fileData_active_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.rel22_fileData_active` (dbName, file_gdc_id, access, acl, analysis_input_file_gdc_ids, analysis_workflow_link, analysis_workflow_type, 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, created_datetime, data_category, data_format, data_type, downstream_analyses__output_file_gdc_ids, downstream_analyses__workflow_link, downstream_analyses__workflow_type, experimental_strategy, file_name, file_size, file_id, index_file_gdc_id, index_file_name, index_file_size, md5sum, platform, file_state, file_submitter_id, file_type, updated_datetime) VALUES ('active', 'c39008b5-6b6a-4558-879c-880de20631ef', 'open', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'c7c3fe4a-327a-4b7e-a259-989b72971209', 'c2b7d619-b5ba-4879-92d9-9fd7dc6694ff', 'TCGA-23-1031-01A-01-BS1', 'slide', 'c7c3fe4a-327a-4b7e-a259-989b72971209', NULL, 'Ovarian Serous Cystadenocarcinoma', 'Ovarian Serous Cystadenocarcinoma', 'phs000178', 'TCGA', 'TCGA-OV', '2018-02-23T15:24:13.037200-06:00', 'Biospecimen', 'SVS', 'Slide Image', NULL, NULL, NULL, 'Tissue Slide', 'TCGA-23-1031-01A-01-BS1.c2b7d619-b5ba-4879-92d9-9fd7dc6694ff.svs', 78968705, 'c39008b5-6b6a-4558-879c-880de20631ef', NULL, NULL, NULL, '5351c1c57c22fb695303d11e225236f2', NULL, 'released', 'TCGA-23-1031-01A-01-BS1_slide_image', 'slide_image', '2019-11-06T22:06:17.852704+00:00'), ('active', 'c7de2ad6-519f-4cfe-9e8b-2eaaf85aec58', 'open', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '499a9b57-ee1a-4012-bbab-c6ad955b5e0a', '41335e52-92cb-47c1-b5d6-cfaf07041b09', 'TCGA-24-1551-01A-01-BS1', 'slide', '499a9b57-ee1a-4012-bbab-c6ad955b5e0a', NULL, 'Ovarian Serous Cystadenocarcinoma', 'Ovarian Serous Cystadenocarcinoma', 'phs000178', 'TCGA', 'TCGA-OV', '2018-02-23T15:24:13.037200-06:00', 'Biospecimen', 'SVS', 'Slide Image', NULL, NULL, NULL, 'Tissue Slide', 'TCGA-24-1551-01A-01-BS1.41335e52-92cb-47c1-b5d6-cfaf07041b09.svs', 119708583, 'c7de2ad6-519f-4cfe-9e8b-2eaaf85aec58', NULL, NULL, NULL, 'd0fc1bb0cfe76540ab8df678e93a124b', NULL, 'released', 'TCGA-24-1551-01A-01-BS1_slide_image', 'slide_image', '2019-11-06T22:06:17.852704+00:00'), ('active', '3768b1d9-170f-42f6-98c8-da1ce335dc8a', 'open', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '29dccd25-4c4a-463b-a353-38a193337f38', '75a754e9-5c31-4b53-b8a9-fe6deec738ab', 'TCGA-13-1405-01A-01-BS1', 'slide', '29dccd25-4c4a-463b-a353-38a193337f38', NULL, 'Ovarian Serous Cystadenocarcinoma', 'Ovarian Serous Cystadenocarcinoma', 'phs000178', 'TCGA', 'TCGA-OV', '2018-02-23T15:24:13.037200-06:00', 'Biospecimen', 'SVS', 'Slide Image', NULL, NULL, NULL, 'Tissue Slide', 'TCGA-13-1405-01A-01-BS1.75a754e9-5c31-4b53-b8a9-fe6deec738ab.svs', 345038501, '3768b1d9-170f-42f6-98c8-da1ce335dc8a', NULL, NULL, NULL, 'b8e3f215547570641c9d1a13742a728e', NULL, 'released', 'TCGA-13-1405-01A-01-BS1_slide_image', 'slide_image', '2019-11-06T22:06:17.852704+00:00'), ('active', '20dad207-cf12-4e02-955c-57f37b5694b5', 'open', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0e1598d8-cbe5-4113-95f1-4bcda061239b', '37bc8232-0f2b-4d01-b6a2-9ce4059d88dc', 'TCGA-29-1702-01A-01-BS1', 'slide', '0e1598d8-cbe5-4113-95f1-4bcda061239b', NULL, 'Ovarian Serous Cystadenocarcinoma', 'Ovarian Serous Cystadenocarcinoma', 'phs000178', 'TCGA', 'TCGA-OV', '2018-02-23T15:24:13.037200-06:00', 'Biospecimen', 'SVS', 'Slide Image', NULL, NULL, NULL, 'Tissue Slide', 'TCGA-29-1702-01A-01-BS1.37bc8232-0f2b-4d01-b6a2-9ce4059d88dc.svs', 232163911, '20dad207-cf12-4e02-955c-57f37b5694b5', NULL, NULL, NULL, '07637c49b376eb0c9125f0cdbc72d226', NULL, 'released', 'TCGA-29-1702-01A-01-BS1_slide_image', 'slide_image', '2019-11-06T22:06:17.852704+00:00'), ('active', '644bfcab-96c6-4331-9d41-665a7633b3d6', 'open', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '20c6be4d-7baf-4ea0-93e2-a5212f2e9b9c', '50693f43-010a-441d-adfd-65de5ba5b75f', 'TCGA-61-2012-11A-01-BS1', 'slide', '20c6be4d-7baf-4ea0-93e2-a5212f2e9b9c', NULL, 'Ovarian Serous Cystadenocarcinoma', 'Ovarian Serous Cystadenocarcinoma', 'phs000178', 'TCGA', 'TCGA-OV', '2018-02-23T15:24:13.037200-06:00', 'Biospecimen', 'SVS', 'Slide Image', NULL, NULL, NULL, 'Tissue Slide', 'TCGA-61-2012-11A-01-BS1.50693f43-010a-441d-adfd-65de5ba5b75f.svs', 50732343, '644bfcab-96c6-4331-9d41-665a7633b3d6', NULL, NULL, NULL, '21e09342f359841233fde5a19f126a48', NULL, 'released', 'TCGA-61-2012-11A-01-BS1_slide_image', 'slide_image', '2019-11-06T22:06:17.852704+00:00');