-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel19_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 REL19",
  description="Data was generated from file metadata information from the GDC active archive release 19, downloaded October 16, 2019. \nMore details: https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-190",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("source", "gdc"), ("reference_genome_0", "hg38"), ("status", "archived"), ("category", "metadata")]
);

INSERT INTO `isb-cgc.GDC_metadata.rel19_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', '519f9eae-50e7-4531-bb5e-0e66e5959f73', 'open', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '49e5ee61-a1c9-4038-84ac-92683e573a65', 'dd2cb54e-ffc1-4ba7-a776-9aa12827fae2', 'TCGA-23-2641-01A-01-BS1', 'slide', '49e5ee61-a1c9-4038-84ac-92683e573a65', 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-2641-01A-01-BS1.dd2cb54e-ffc1-4ba7-a776-9aa12827fae2.svs', 87153181, '519f9eae-50e7-4531-bb5e-0e66e5959f73', NULL, NULL, NULL, '04989c86c35187c0dbace7d85d352b22', NULL, 'released', 'TCGA-23-2641-01A-01-BS1_slide_image', 'slide_image', '2019-09-11T19:36:13.073133+00:00'), ('active', 'eb41c7ed-2c0b-40ae-8815-b33e43080067', 'open', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '8ae56ffc-960c-46c2-bd6c-1dcff33875d0', '2f9967b6-cb04-4d01-ad90-52c30ee97836', 'TCGA-13-1817-02A-01-BS1', 'slide', '8ae56ffc-960c-46c2-bd6c-1dcff33875d0', 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-1817-02A-01-BS1.2f9967b6-cb04-4d01-ad90-52c30ee97836.svs', 342448307, 'eb41c7ed-2c0b-40ae-8815-b33e43080067', NULL, NULL, NULL, '0009878566e534f7acf1f04ae6a70997', NULL, 'released', 'TCGA-13-1817-02A-01-BS1_slide_image', 'slide_image', '2019-09-11T19:36:13.073133+00:00'), ('active', '40b1c3e5-deed-4b4d-bdd1-777f409f4f62', 'open', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'eb7c3b35-7a5e-4621-b31f-9775c51f9a23', 'a353a944-d562-4992-bea2-6c23d01c685a', 'TCGA-61-2098-01A-01-TS1', 'slide', 'eb7c3b35-7a5e-4621-b31f-9775c51f9a23', 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-2098-01A-01-TS1.a353a944-d562-4992-bea2-6c23d01c685a.svs', 174546649, '40b1c3e5-deed-4b4d-bdd1-777f409f4f62', NULL, NULL, NULL, 'e9248f47bc5dc183524e116afd85a8e0', NULL, 'released', 'TCGA-61-2098-01A-01-TS1_slide_image', 'slide_image', '2019-09-11T19:36:13.073133+00:00'), ('active', '6c660c56-c691-4fd3-b89b-1de9c9346e64', 'open', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '82093ed9-a3c8-4e34-931f-4ec7ae745711', '2fd7c3b6-e8fe-4542-b392-811c192282ae', 'TCGA-13-1512-01A-01-TS1', 'slide', '82093ed9-a3c8-4e34-931f-4ec7ae745711', 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-1512-01A-01-TS1.2fd7c3b6-e8fe-4542-b392-811c192282ae.svs', 546655333, '6c660c56-c691-4fd3-b89b-1de9c9346e64', NULL, NULL, NULL, '1aede8f8287804efec8c0850ade54930', NULL, 'released', 'TCGA-13-1512-01A-01-TS1_slide_image', 'slide_image', '2019-09-11T19:36:13.073133+00:00'), ('active', '712277f0-4977-4cd8-a13e-e1f94080e63f', 'open', 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '7922df77-f09a-488c-a1be-58646ceb9b3e', '412d99bf-a807-48b1-879f-5e710d665eca', 'TCGA-42-2582-01A-01-BS1', 'slide', '7922df77-f09a-488c-a1be-58646ceb9b3e', 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-42-2582-01A-01-BS1.412d99bf-a807-48b1-879f-5e710d665eca.svs', 126499717, '712277f0-4977-4cd8-a13e-e1f94080e63f', NULL, NULL, NULL, 'b429568067af934820963b1a8f98dfae', NULL, 'released', 'TCGA-42-2582-01A-01-BS1_slide_image', 'slide_image', '2019-09-11T19:36:13.073133+00:00');