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

INSERT INTO `isb-cgc.GDC_metadata.rel16_fileData_active` (dbName, file_gdc_id, access, acl, analysis_input_file_gdc_ids, analysis_workflow_link, analysis_workflow_type, 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', '333d1f3e-0e61-42c2-8908-865cedc62dfe', 'open', 'open', NULL, NULL, NULL, '778ce436-a825-4689-81c1-b7c965404163', 'bf371520-600a-4644-8f73-792b4bbbefb9', 'TCGA-61-2095-11A-01-BS1', 'slide', '778ce436-a825-4689-81c1-b7c965404163', 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-2095-11A-01-BS1.bf371520-600a-4644-8f73-792b4bbbefb9.svs', 41427477, '333d1f3e-0e61-42c2-8908-865cedc62dfe', NULL, NULL, NULL, '913f781ea4e56090ebde8df0195b9271', NULL, 'released', 'TCGA-61-2095-11A-01-BS1_slide_image', 'slide_image', '2018-11-30T05:02:52.836756+00:00'), ('active', 'e018b176-08f6-48ec-8af4-dd9423b14e77', 'open', 'open', NULL, NULL, NULL, '5d8abed4-62b3-4e17-a8ce-9f6028e97103', 'c071ae8f-1a61-4e9b-bb18-c5bc3643dc2e', 'TCGA-59-2372-01A-01-BS1', 'slide', '5d8abed4-62b3-4e17-a8ce-9f6028e97103', 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-59-2372-01A-01-BS1.c071ae8f-1a61-4e9b-bb18-c5bc3643dc2e.svs', 109067695, 'e018b176-08f6-48ec-8af4-dd9423b14e77', NULL, NULL, NULL, 'b71d4fd983cee25b6f71a5394b0a384b', NULL, 'released', 'TCGA-59-2372-01A-01-BS1_slide_image', 'slide_image', '2018-11-30T05:02:52.836756+00:00'), ('active', '529ce636-0ac1-4efb-b54c-5f7e6ea253a3', 'open', 'open', NULL, NULL, NULL, 'c88502e9-0bc6-47c3-adc4-d98b63c7797b', '6aeea3ef-442f-444f-ae40-95243d2f8c60', 'TCGA-61-2613-01A-01-TS1', 'slide', 'c88502e9-0bc6-47c3-adc4-d98b63c7797b', 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-2613-01A-01-TS1.6aeea3ef-442f-444f-ae40-95243d2f8c60.svs', 129496551, '529ce636-0ac1-4efb-b54c-5f7e6ea253a3', NULL, NULL, NULL, 'b14732c0b3e51693307acfac111c0c83', NULL, 'released', 'TCGA-61-2613-01A-01-TS1_slide_image', 'slide_image', '2018-11-30T05:02:52.836756+00:00'), ('active', 'f9f428f5-ed02-44f0-8b3d-71f8dd2b254b', 'open', 'open', NULL, NULL, NULL, '6485b68f-caa7-45cd-9bc5-78c2add8191d', '6f3b37f7-9bef-4866-bb07-dbb60257d37c', 'TCGA-13-0762-01A-01-BS1', 'slide', '6485b68f-caa7-45cd-9bc5-78c2add8191d', 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-0762-01A-01-BS1.6f3b37f7-9bef-4866-bb07-dbb60257d37c.svs', 71897395, 'f9f428f5-ed02-44f0-8b3d-71f8dd2b254b', NULL, NULL, NULL, 'd806437c6c176b8b7e79a1ccbf220ebf', NULL, 'released', 'TCGA-13-0762-01A-01-BS1_slide_image', 'slide_image', '2018-11-30T05:02:52.836756+00:00'), ('active', '5b4c964a-7cca-4ced-9048-6c1c3f45f6c8', 'open', 'open', NULL, NULL, NULL, '5e18b17d-4626-4b6d-8ac6-e560cee0376c', '08bb7421-dfee-4e8f-8bdb-74a1626872f1', 'TCGA-24-1419-01A-01-BS1', 'slide', '5e18b17d-4626-4b6d-8ac6-e560cee0376c', 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-1419-01A-01-BS1.08bb7421-dfee-4e8f-8bdb-74a1626872f1.svs', 186318403, '5b4c964a-7cca-4ced-9048-6c1c3f45f6c8', NULL, NULL, NULL, '06222f7e92f2ff543243cbb8c7e99b7f', NULL, 'released', 'TCGA-24-1419-01A-01-BS1_slide_image', 'slide_image', '2018-11-30T05:02:52.836756+00:00');