-- DBMS: bigquery
CREATE TABLE `isb-cgc.GDC_metadata.rel13_fileData_current`
(
  dbName STRING OPTIONS(description="Referring to the default/main database at the GDC. In this table, this field is always current."),
  file_id STRING OPTIONS(description="GDC file identifier. This is a duplicate of file_gdc_id field found in some tables. "),
  `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_files__file_id 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_id STRING OPTIONS(description="Associated Case ID"),
  associated_entities__entity_id STRING OPTIONS(description="Associated entity UUID"),
  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  "),
  cases__case_id STRING OPTIONS(description="Associated entity case UUID"),
  cases__project__dbgap_accession_number STRING OPTIONS(description="DbGaP accession number for the project"),
  cases__project__disease_type STRING OPTIONS(description="Project Disease Type"),
  cases__project__name STRING OPTIONS(description="Study name of the project"),
  cases__project__program__dbgap_accession_number STRING OPTIONS(description="DbGaP accession number for the program"),
  cases__project__program__name STRING OPTIONS(description="Program Name"),
  cases__project__project_id STRING OPTIONS(description="Project ID"),
  created_datetime STRING OPTIONS(description="Timestamp of creation, eg 2016-10-27T21:58:12.297090-05:02"),
  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="File format of the underlying data, eg BCR XML, BAM"),
  downstream_analyses__output_files__file_id 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"),
  id STRING OPTIONS(description="GDC file identifier. This is a duplicate of file_gdc_id field found in some tables."),
  index_files__file_id STRING OPTIONS(description="BAM or VCF index file GDC file UUID"),
  index_files__file_name STRING OPTIONS(description="BAM or VCF index file name"),
  index_files__file_size INT64 OPTIONS(description="BAM  or VCF index file size"),
  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.2"),
  state STRING OPTIONS(description="File state -- either submitted or released"),
  submitter_id STRING OPTIONS(description="This can be used to identify a corresponding entry in the submitter's records. The GDC requires that submitter_id be unique for each entity within a project: the tuple (combination) of [ project_id, submitter_id ] is a unique key."),
  type STRING OPTIONS(description="Description of the data, e.g. clinical_supplement, aligned_reads"),
  updated_datetime STRING OPTIONS(description="Timestamp of latest update, eg 2017-03-04T16:37:26.081298-06:00")
)
OPTIONS(
  friendly_name="FILE DATA ACTIVE REL13",
  description="Data was generated from file metadata information from the GDC active archive release 13 October 2018. More details:https://docs.gdc.cancer.gov/Data/Release_Notes/Data_Release_Notes/#data-release-130",
  labels=[("access", "open"), ("data_type", "file_metadata"), ("source", "gdc"), ("reference_genome_0", "hg38"), ("status", "archived"), ("category", "metadata")]
);

INSERT INTO `isb-cgc.GDC_metadata.rel13_fileData_current` (dbName, file_id, access, acl, analysis__input_files__file_id, analysis__workflow_link, analysis__workflow_type, associated_entities__case_id, associated_entities__entity_id, associated_entities__entity_submitter_id, associated_entities__entity_type, cases__case_id, cases__project__dbgap_accession_number, cases__project__disease_type, cases__project__name, cases__project__program__dbgap_accession_number, cases__project__program__name, cases__project__project_id, created_datetime, data_category, data_format, data_type, downstream_analyses__output_files__file_id, downstream_analyses__workflow_link, downstream_analyses__workflow_type, experimental_strategy, file_name, file_size, id, index_files__file_id, index_files__file_name, index_files__file_size, md5sum, platform, state, submitter_id, type, updated_datetime) VALUES ('current', '33b90217-200d-445c-8dfd-811661a314ed', 'open', 'open', NULL, NULL, NULL, '6c43727d-631a-40fb-b1a1-242a12889eaa', '149f133d-6e85-4a1b-b6dd-e3a64c82a7e1', 'TCGA-04-1369-01A-01-BS1', 'slide', '6c43727d-631a-40fb-b1a1-242a12889eaa', 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-04-1369-01A-01-BS1.149f133d-6e85-4a1b-b6dd-e3a64c82a7e1.svs', 202032625, '33b90217-200d-445c-8dfd-811661a314ed', NULL, NULL, NULL, '7d5c00415c110855f45fc39025bb28c5', NULL, 'released', 'TCGA-04-1369-01A-01-BS1_slide_image', 'slide_image', '2018-09-11T22:50:30.258384+00:00'), ('current', '5d95f806-3106-42fd-9f71-c18da8b9cfb2', 'open', 'open', NULL, NULL, NULL, '460616ec-f66f-483b-88c1-757edd86261d', '8c7be673-e292-4596-b2e7-7b0691de0755', 'TCGA-29-1783-01A-01-BS1', 'slide', '460616ec-f66f-483b-88c1-757edd86261d', 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-1783-01A-01-BS1.8c7be673-e292-4596-b2e7-7b0691de0755.svs', 243540671, '5d95f806-3106-42fd-9f71-c18da8b9cfb2', NULL, NULL, NULL, '9407c1bda6c17dad0d5ea7d84a3bacaa', NULL, 'released', 'TCGA-29-1783-01A-01-BS1_slide_image', 'slide_image', '2018-09-11T22:50:30.258384+00:00'), ('current', '087d23fc-1f9d-4164-8039-412436355d97', 'open', 'open', NULL, NULL, NULL, 'fdf83fdf-dfbb-4306-9a1b-b4487d18b402', '4cbf84a4-9b8f-4448-a066-3978b5fca0aa', 'TCGA-23-1120-01A-02-BS2', 'slide', 'fdf83fdf-dfbb-4306-9a1b-b4487d18b402', 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-1120-01A-02-BS2.4cbf84a4-9b8f-4448-a066-3978b5fca0aa.svs', 156022163, '087d23fc-1f9d-4164-8039-412436355d97', NULL, NULL, NULL, 'f04a21235474c9209d5f2d9cef68b76f', NULL, 'released', 'TCGA-23-1120-01A-02-BS2_slide_image', 'slide_image', '2018-09-11T22:50:30.258384+00:00'), ('current', '3f432b8c-5c49-4e2f-b0d4-b55aa93adfa7', 'open', 'open', NULL, NULL, NULL, 'a8c4a333-6b67-44c8-9000-516f8ccea788', 'bed2de0b-65ae-49a2-8fc6-a1ad85be2972', 'TCGA-24-2271-01A-01-BS1', 'slide', 'a8c4a333-6b67-44c8-9000-516f8ccea788', 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-2271-01A-01-BS1.bed2de0b-65ae-49a2-8fc6-a1ad85be2972.svs', 126641871, '3f432b8c-5c49-4e2f-b0d4-b55aa93adfa7', NULL, NULL, NULL, '72598c5c2d3e4b5d68c286343b443be0', NULL, 'released', 'TCGA-24-2271-01A-01-BS1_slide_image', 'slide_image', '2018-09-11T22:50:30.258384+00:00'), ('current', '1c55509f-d4d7-4b52-8cca-f707407defdd', 'open', 'open', NULL, NULL, NULL, '6d10d4ee-6331-4bba-93bc-a7b64cc0b22a', '27aaf831-a80b-4a55-a239-3a24caca9c28', 'TCGA-04-1331-01A-01-BS1', 'slide', '6d10d4ee-6331-4bba-93bc-a7b64cc0b22a', 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-04-1331-01A-01-BS1.27aaf831-a80b-4a55-a239-3a24caca9c28.svs', 67013105, '1c55509f-d4d7-4b52-8cca-f707407defdd', NULL, NULL, NULL, 'd00776aadb1cd8b9a1d8a89d44b5dcdb', NULL, 'released', 'TCGA-04-1331-01A-01-BS1_slide_image', 'slide_image', '2018-09-11T22:50:30.258384+00:00');